更改

添加15字节 、 2021年1月26日 (二) 20:38
第270行: 第270行:  
A nonlinear lower bound of <math>\Omega(n\log n)</math> is known for the number of comparisons needed for a sorting algorithm. Thus the best sorting algorithms are optimal, as their complexity is <math>O(n\log n).</math> This lower bound results from the fact that there are  ways of ordering  objects. As each comparison splits in two parts this set of  orders, the number of  of comparisons that are needed for distinguishing all orders must verify <math>2^N>n!,</math> which implies <math>N =\Omega(n\log n),</math> by Stirling's formula.
 
A nonlinear lower bound of <math>\Omega(n\log n)</math> is known for the number of comparisons needed for a sorting algorithm. Thus the best sorting algorithms are optimal, as their complexity is <math>O(n\log n).</math> This lower bound results from the fact that there are  ways of ordering  objects. As each comparison splits in two parts this set of  orders, the number of  of comparisons that are needed for distinguishing all orders must verify <math>2^N>n!,</math> which implies <math>N =\Omega(n\log n),</math> by Stirling's formula.
   −
O < math > Omega (n log n) </math > 的一个非线性下界是已知的一个排序算法所需的比较次数。因此,最好的排序算法是最优的,因为它们的复杂度是 < math > o (n log n) </math > 这个下限是由于存在对象排序的方法这一事实造成的。当每个比较被分成两部分时,区分所有比较序列所需的比较数量必须验证 < math > 2 ^ n > n!,这意味着 < math > n = Omega (n log n) ,</math > 由 Stirling 的公式。
+
<math>\Omega(n\log n)</math>的一个非线性下界是已知的'''<font color="#ff8000">排序算法 sorting algorithm</font>'''所需的比较次数。由于{{mvar|n}}个对象有{{math|''n''!}}种排序方式,当它们的复杂度是<math>O(n\log n).</math>时,最好的排序算法都是最优的。当每个比较被分成两部分时,区分所有比较序列所需的比较数量必须验证 < math > 2 ^ n > n!,这意味着 < math > n = Omega (n log n) ,</math > 由 Stirling 的公式。
     
307

个编辑