algorithm - "constant factor of N"的含义?

标签 algorithm sorting math

在我正在阅读的一篇文章(罗伯特·塞奇威克和凯文·韦恩的算法第四版)中,有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/

相关文章:

java - 基于公共(public)类变量对 2 个类数组进行排序

c++ - scalbn 和 ldexp 有什么区别

algorithm - 在具有 635 个元素的 BST 中查找元素的比较次数?

arrays - 实现智能设计排序

sorting - 如何在Elasticsearch6.8中根据字符串顺序对文档进行排序

3 个停止点之间的 Java 颜色插值

javascript - Javascript 中最大的回文积

Javascript 排序算法

java - 插入或删除到非重叠连续区间集合

c++ - 元素的每一个和的可能性