O(n log n) 有简写吗?
我们通常用一个词来描述算法分析中遇到的大多数复杂情况:
O(1)
==“constant”O(log n)
==“logarithmic”O(n)
==“线性”O(n^2)
==“二次”O(n^3)
==“三次”O(2^n)
== “指数”
我们遇到复杂度为 O(n log n)
且具有一定规律性的算法(想想所有以排序复杂度为主的算法)但据我所知,英语中没有一个词可以用来形容这种复杂性。这是我知识上的差距,还是我们英语关于计算复杂性的讨论中真正的差距?
We usually have a single word for most complexities we encounter in algorithmic analysis:
O(1)
== "constant"O(log n)
== "logarithmic"O(n)
== "linear"O(n^2)
== "quadratic"O(n^3)
== "cubic"O(2^n)
== "exponential"
We encounter algorithms with O(n log n)
complexity with some regularity (think of all the algorithms dominated by sort complexity) but as far as I know, there's no single word we can use in English to refer to that complexity. Is this a gap in my knowledge, or a real gap in our English discourse on computational complexity?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
O(n log n)
== "线性计算"似乎是 Robert Sedgewick 在 Algorithms In C 一书中创造的。也称为拟线性或对数线性。然而,线性算术还有一个额外的好处,那就是它不是一个重载的术语(拟线性用于经济学和微分方程,而对数线性用于经济学和回归分析)。
O(n log n)
== "linearithmic"Seems to have been coined by Robert Sedgewick in the book Algorithms In C. Also called quasilinear or loglinear. However, linearithmic has the added bonus of not being an overloaded term (quasilinear is used in economics and differential equations, while loglinear is used in economics and regression analysis).
“en log en”的音节比“exponential”或“logarithmic”少。我想大多数人只是这么说。
"en log en" has fewer syllables than "exponential" or "logarithmic". I think most people just say that.
根据维基百科,您可以将其称为线性运算,对数线性,或拟线性。
According to Wikipedia you can call it linearithmic, loglinear, or quasilinear.
O(2^n)
==“哦,可怕”O(2^n)
== "O Scary"我不相信有这样的术语。
不过,更相关的是这个想法:为什么将指数(11 个字符)称为 O(2^n)(6 个字符)的“简写”?
就我个人而言,我很高兴地说“这个算法以 en log en time 运行”。这是大多数人需要听到的。
I don't believe there is such a term.
More relevant, though, is this thought: Why do you refer to exponential (11 characters) as a "shorthand" for O(2^n) (6 characters)?
Personally, I'm quite happy to say "this algorithm runs in en log en time". It's all most people need to hear.
不,没有与 O(nlogn) 等效的单个单词。你只需要花额外的时间说出整个事情(注意:音节数与“指数”相同)
No there's no single word equivalent for O(nlogn). You just have to spend the extra time saying the whole thing (Note: same number of syllables as "exponential")