Reputation: 9
What is the Big-O, Big-Omega and Theta (Θ) notation for the function, 5 + 2sin(n)
Upvotes: 1
Views: 128
Reputation: 4495
Since 5 + 2sin(n) is bounded by a constant value both above a below, it holds that 5 + 2sin(n) = O(1). It also holds that it is Ω(1). Since it is both, it is also Θ(1).
You can show this more formally by finding the values between which your function is bounded, and using the definitions of Big-O and Big-Omega.
Upvotes: 2