How are T(n) and Theta(f(n)) different? [duplicate] - algorithm

This question already has answers here:
What is the difference between Θ(n) and O(n)?
(9 answers)
What is a plain English explanation of "Big O" notation?
(43 answers)
Closed 8 years ago.
When people explain Theta notation, they just start talking about a function T(n) without explaining what it is. Is it just a given function?
Why is it Theta(f(n)) instead of Theta(n)? Where did the f(n) come from? f(n) is usually a given function, then what is T(n)? Are they both? This is also not commonly explained.
All the explanations I find are all explained mathematically, but with consistent failure properly define things, and instead just start talking about things out of the blue.
Thanks,
- A confused student

Related

How does bigO(5*2^n + 1000n^100) become bigO(2^n)? [duplicate]

This question already has answers here:
What is a plain English explanation of "Big O" notation?
(43 answers)
Closed 5 years ago.
I have just started "Cracking the Coding Interview" by Gayle Macdowell. In this BigO topic, It says we should drop the non-dominant term.
O(n^2 + n) becomes O(n^2) and O(n + log n) becomes O(n).
Well, I understand that. If we suppose the value of n to be some large number then we can ignore the smaller result since, it will be comparatively much more smaller than the larger one.
But, in this case how can O(5*2^n + 1000n^100) become O(2^n)) ?
Isn't n^100 dominant than 2 ^n ?
n^100, or n raised to any constant, does not dominate 2^n.

Prove an algorithm which takes (n+1)^5 steps is O(n^5)? [duplicate]

This question already has answers here:
Big O, how do you calculate/approximate it?
(24 answers)
Closed 6 years ago.
Find out the c and n0.
Please explain with the steps.
limit as n --> infinity of (n+1)^5 / n^5 = 1.
This is neither 0 nor infinity, so they have the same complexity. This complexity is traditionally written as O(n^5).
This does assume that each step is constant for whatever you are measuring.

What is the difference between O(n) and O(n) with tilde [duplicate]

This question already has answers here:
What does Õ (omicron tilde) mean in complexity Õ(n) vs O(n) [closed]
(2 answers)
Closed 7 years ago.
I have come across saying that O(n) with tilde hides polylog(n)factors and an additive polylog(n) term.
What exactly these terms mean ?
This would probably mean that there is c > 0 such that f(n) <= n (log n)^c.
Note however that definitions of these kind of things may fluctuate.
Duplicate with What does Õ (omega tilde) mean in complexity Õ(n) vs O(n)

Big O notation using the recursion method [duplicate]

This question already has answers here:
Big O of Recursive Methods
(2 answers)
Closed 8 years ago.
How to find the Big O for the following recursive function using the recursive method:
T(n)=(n-1)T(n-1)+(n-1)T(n-2)
Anyway, I tried to solve this case using the classic recursive relation methodology.
It's all about observing if a pattern exists:
Very expensive algorithm (Enemies of computer science are factorial and exponential orders of growth).

log base 2 equals log base 3 when analyzing time complexity? [duplicate]

This question already has answers here:
Is Big O(logn) log base e?
(7 answers)
Closed 8 years ago.
Most solutions to Exercise 4.4.6 of Intro. to Algorithms 3rd edition say,
n*log3(n) = Big omega of (n*lg(n)).
Dose it mean log3(n) is equivalent to log2(n) when we are discussing time complexity of algorithms?
Thanks
As far as big-Oh notation is concerned, the base of the logarithms doesn't make any real difference, because of this important property, called Change of Base.
According to this property, changing the base of the logarithm, in terms of big-oh notation, only affects the complexity by a constant factor.
So, yes. In terms of big-Oh notation, log3(n) is equivalent to log2(n).

Resources