简体   繁体   English

周期函数的渐近关系

[英]Asymptotic relations for periodic functions

can n^(1 + sin n) be written as O(n^k) where k can be any positive integer greater than or equal to 2(k>=2)? n^(1 + sin n)可以写为O(n^k) ,其中k可以是大于或等于2(k> = 2)的任何正整数? And are asymptotic notations defined only for increasing functions with constant growth rate or they can be applied to wider range like decreasing function or periodic function? 渐近符号是否仅定义为具有恒定增长率的递增函数,或者可以应用于诸如递减函数或周期函数之类的更大范围? More insights about the same are very much welcomed. 非常欢迎有更多关于此的见解。

Yes you can use asymptotic notation for periodic functions, but not for all. 是的,您可以将渐近符号用于周期函数,但不能用于所有函数。
The maximum value of sin(x) is 1 , and minimum value is -1 . sin(x)的最大值是1 ,而最小值是-1

So we can say there's a subset of the natural numbers such that the restriction of f: n -> n (1 + sin n) to it is O(1) 因此我们可以说存在一个自然数子集,因此f:n-> n (1 + sin n)的限制为O(1)

You can use asymptotic relation for periodic functions.Here in your question n^(1 + sin n) = O(n^2) . 您可以将渐近关系用于周期函数。在这里,您的问题n^(1 + sin n) = O(n^2)
We can use f(n)=Θ(g(n)) means we can give both lower bound and upper bound to the function. 我们可以使用f(n)=Θ(g(n))表示我们可以给函数下界和上限。

f(n)=Θ(g(n)) iff
f(n)<=c1.g(n)
f(n)>=c2.g(n)

where c1 and c2 are some constants. 其中c1和c2是一些常数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM