34.2 Math Problems Out of Nowhere
A Math Problem
Is N!\in \Omega((\frac{N}{2})^\frac{N}{2})Prove your answer. [Recall that ∈ Ω can be informally be interpreted to mean >=. In other words, does factorial grow at least as quickly as (\frac{N}{2})^\frac{N}{2}?
10!
- 10 * 9 * 8 * 7 * 6 * … * 1
55
- 5 * 5 * 5 * 5 * 5
for large N, therefore
Another Math Problem
Given: N!>(\frac{N}{2})^\frac{N}{2}, which we used to prove our answer to the previous problem. Show that log(N!) \in \Omega(N * logN). [Recall: log means an unspecified base]
We have that
- Taking the log of both sides, we have that .
- Bringing down the exponent we have that .
- Discarding the unnecessary constant, we have .
- From there, we have that . [since is the same thing asymptotically as ]
In other words, grows at least as quickly as .
Last Math Problem
In the previous problem, we showed that log(N!) \in \Omega(N * logN). Now show that N*logN \in \Omega(log(N!)).
Proof:
- Therefore
Omega and Theta
Given N*logN \in \Omega(log(N!)) and log(N!) \in \Omega(N * logN). Which of the following can we say?
A. N*logN \in \Theta(log(N!))
B. log(N!) \in \Theta(N * logN)
C. Both A and B
D. Neither
Answer: C. Both A and B
Summary
We’ve shown that .
- In other words, these two functions grow at the same rate asymptotically.
As for why we did this, we will see in a little while…