算法分析 - 预期增长率
Algorithm analysis - Expected growth rates
>我有一个关于澄清家庭作业的问题。
http://www.cs.bilkent.edu.tr/~gunduz/teaching/cs201/cs201_homework3.pdf
要查看讲义,请转到第 25 页,共 http://www.scribd.com/nanny24/d/36657378-Data-Structures-and-Algorithm-Analysis-in-C-Weiss 页。
以下是我需要做的,但我不明白这意味着什么。这是否意味着 - 对于算法 1 - 比较实际运行时间与 (n^3 + 3*(n^2) + 2*n)/6, n=数组大小?我不这么认为,但我无法推断出其他任何东西。你能解释一下这是什么吗?
2- Plot the expected growth rates obtained from the theoretical analysis (as given for each solution) by
using the same N values that you used in obtaining your results. Compare the expected growth rates
and the obtained results, and discuss your observations in a paragraph.
编辑2:
Algorithm 1:
n actual running time(ms) (n^3 + 3*(n^2) + 2*n)/6 (I don't know whether the type is millisecond or not)
100 1 171700
1000 851 167167000
因此,考虑到实际运行时间和理论运行时间之间的巨大差异,指导员的意思可能与理论时间复杂度函数不同,理论时间复杂度函数为算法 1 的 (n^3 + 3*(n^2) + 2*n)/6。这是函数:http://www.diigo.com/item/image/2lxmz/m7y3?size=o
是的,您的教师所说的"预期增长率"是指您在理论时间复杂度函数中插入 n 值后的预测运行时间。
虽然这种用法是标准的,但我仍然会和教练核实我是否是你。
理论数字可能是操作或比较或类似的东西的次数。
我想增长率意味着价值增长的速度有多快?当n
从100
到1000
时,理论值比实际测量因子851 167167000/171700 = 973.6
增长。
相关文章:
- 为什么这个运算符<重载函数对 STL 算法不可见?
- (C++)分析树以计算返回错误值的简单算术表达式
- 函数复杂度分析
- 基于ELO的团队匹配算法
- C++选择排序算法中的逻辑错误
- 使用动态分配的数组会导致代码分析发出虚假的C6386缓冲区溢出警告
- 有没有办法将谓词中的元素偏移量传递给 std 算法?
- C++A*算法并不总是在路径中具有目标节点
- 这个算法的运行时间复杂度是多少?你是如何分析的
- QR码生成算法数据掩盖实现案例分析
- 两种算法的Big-O分析
- 字符串算法分析的排列
- TSP 的聚类分析算法
- 分析算法
- 运行算法 PCA(主成分分析)后究竟会发生什么
- 分析涉及按位运算和 2 的幂的算法
- 算法分析 - 预期增长率
- C++:我如何计算一种方法的成本(算法分析)
- 算法运行时间分析
- 算法的复杂度分析