课程简介及算法分析

来源:互联网 发布:照片相册制作软件 编辑:程序博客网 时间:2024/06/08 06:52

先学课程

-概率论

运行时间(running time)

- 输入(eg 已经排序)

- 输入规模(6和6*10^9)

各种各样的分析:

- 最坏情况分析(worst case)usually

   T(n) = max time   when input =n

- 平均情况(average-case)sometimes

   T(n) = expected time over,应该是期望

    为了求出概率必须做出假设(assumption)

-最好情况分析(best-case)bogus 假象

   cheat

what is the sort worst-case time

-计算机:

相对速度(同一机器)

绝对速度(不同机器)

渐进符号

theta -notation :舍弃低阶常常量

3*n^3 + 90*n^2 -5n  = theta(n^3)



0 0