按渐近增长率的非降序列出以下函数。如果两个或多个函数具有相同的渐近增长率,则将它们分组在一起。
g1(n) = n
g2(n) = n^3 +4n
g3(n) = 2n log(以 2 为底) n
g4(n) = 2^n
g5(n) = 3 ^ (3 * log(以 3 为底) n)
g6(n) = 10^n
我一直在网上浏览几个例子,但我不知道如何做到这一点,这对我来说似乎是一个完全陌生的概念。如果有人可以帮助我,我将不胜感激。我如何计算增长率?
您可能会发现这里最有用的许多技术是操作涉及对数和指数的表达式的技巧。
首先,您可能需要回顾一下对数的幂法则:
a logb c = logb ca.
接下来,指数和对数互为倒数:
logb bn = blogb n = n
These rules might help you rewrite g5(n), for example.
这是另一个有用的规则:
(ab)c = abc = (ac)b.
You can actually use the two previous rules to change the bases of exponential functions. For example, suppose you want to compare 2n to 5n. Notice that
5n = (2log2 5)n
= (2n)log2 5.
这是否可以更容易地看出这两个功能中哪一个会增长得更快?
Finally, you might want to use the following fact: all polynomials grow slower than all exponents whose base is greater than 1. This means that nk grows strictly slower than an for any n > 1. Similarly, all polynomials grow strictly faster than all logarithms, so logb n < nk for all k > 0.
使用上述规则,看看是否可以尝试将每个表达式重写为 n 的对数、n 的多项式或 n 的指数。然后,您可以根据对数表达式自身、多项式自身和指数自身对对数表达式进行排序,然后按顺序将它们写出来。
一般来说,这里提到的技术对于未来非常有用。我希望这能让您走上正轨!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)