算法分析 - 预期增长率

Algorithm analysis - Expected growth rates

本文关键字:增长率 算法分析      更新时间:2023-10-16

>我有一个关于澄清家庭作业的问题。

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 值后的预测运行时间。

虽然这种用法是标准的,但我仍然会和教练核实我是否是你。

理论数字可能是操作或比较或类似的东西的次数。

我想增长率意味着价值增长的速度有多快?n1001000时,理论值比实际测量因子851 167167000/171700 = 973.6增长。