排序功能的增长顺序? [英] Sorting the order of growth of the functions?

查看:78
本文介绍了排序功能的增长顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请按从最快到最慢的增长率订购以下功能:

Please order the function belows by growth rate from fastest to slowest:

  • n ^ 10
  • 2 ^ n
  • nlog(n)
  • 10 ^ 6

我的答案是:

  • 2 ^ n
  • n ^ 10
  • nlog(n)
  • 10 ^ 6

我的答案正确吗?

推荐答案

这似乎是正确的.作为教育方式,请考虑当您输入不同的n值(使用10的近似幂而不是精确值)时会发生什么:

That seems about right. As way of education, consider what happens when you feed in different n values (using rough powers of 10 rather than exact values):

 n      2^n       n^10    n log n   10^6
 ----   -------   -----   -------   ----
    1   10^0.3    10^0    10^0      10^6
   10   10^3      10^10   10^1      10^6
  100   10^30     10^20   10^2      10^6
 1000   10^301    10^30   10^3      10^6
10000   10^3010   10^40   10^4      10^6

因此,就它们增长的速度而言,您的列表是正确的.

So, in terms of how fast they grow, you're list is correct.

  • 10 6 根本没有增长.
  • n log n每一步将其十进制功率增加一.
  • n 10 每步增加十倍功率.
  • 2 n 将其10乘幂乘以10.
  • 106 doesn't grow at all.
  • n log n increases its power-of-ten by one for each step.
  • n10 increases its power-of-ten by 10 for each step.
  • 2n multiplies its power-of-ten by ten each step.

这篇关于排序功能的增长顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆