在我正在阅读的一篇文章(罗伯特·塞奇威克和凯文·韦恩的算法第四版)中,有following passage :
Increment sequences have been devised [for shellsort] that drive the asymptotic growth of the worst-case number of compares down to N^4/3, N^5/4, N^6/5, ... , but many of these results are primarily of academic interest because these functions are hard to distinguish from one another (and from a constant factor of N ) for practical values of N.
在这种情况下,“N 的常数因子”是什么意思?
最佳答案
序列 N^4/3, N^5/4, N^6/5, ...
接近 N
因为指数越来越接近1
。
这意味着随着接近 N
,“最坏情况比较次数的渐近增长”中的术语彼此越来越接近。实际上,N
可以视为常数因子。
(作者添加了“对于 N
的实际值”的警告,因为对于巨大的值,序列中的术语将可以更长时间地区分。)
关于algorithm - "constant factor of N"的含义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29671853/