|||
The proof of time complexity of the algorithm is not reliable
Jiang Yongjiang
Email: accsys@126.com
The polynomial in the algorithm theory is P= ,
Where aiis the coefficient, k is the positive integer, and n is the integer variable.We know that any integer n can be expressed as n =, bjis decimal number.Thus we have
So, the highest order item aknk becomes akbmk10mk.
For example,n=100+3×10m,P=5n+n2,Thus
P = 5(1+3×10m)+ (1+3×10m)2
= 5+15×10m+1+6×10m+9×102m
= 6+21×10m+9×102m.
The highest order n2 becomes 9×102m.
Because Wikipedia says:
"The time complexity of an algorithm is commonly expressed using big O notation, which excludes coefficients and lower order terms."
Therefore we haveO(nk) = O(10mk), where n is variable and m is also.
The time complexity of the algorithm represented by large O is a mistake. The above sentence is the wrong rule.This is the key to the error.
The time complexity of the research algorithm must take all the time of the algorithm into account .
2015-6-16
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-12-28 23:53
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社