Is N!∈Ω((2N)2N)Prove your answer. [Recall that ∈ Ω can be informally be interpreted to mean >=. In other words, does factorial grow at least as quickly as (2N)2N?
10!
10 * 9 * 8 * 7 * 6 * … * 1
55
5 * 5 * 5 * 5 * 5
N!>(2N)2N for large N, therefore N!∈Ω((2N)2N)
Another Math Problem
Given: N!>(2N)2N, which we used to prove our answer to the previous problem. Show that log(N!)∈Ω(N∗logN). [Recall: log means an unspecified base]
We have that N!>(2N)2N
Taking the log of both sides, we have that log(N!)>log((2N)2N).
Bringing down the exponent we have that log(N!)>2N∗log((2N)).
Discarding the unnecessary constant, we have log(N!)>Ω(N∗log(2N)).
From there, we have that log(N!)>Ω(N∗log(N)). [since log(2N) is the same thing asymptotically as log(N)]
In other words, log(N!) grows at least as quickly as N∗log(N).
Last Math Problem
In the previous problem, we showed that log(N!)∈Ω(N∗logN). Now show that N∗logN∈Ω(log(N!)).
Proof:
log(N!)=log(N)+log(N−1)+...+log(1)
N∗logN=log(N)+log(N)+...+log(N)
Therefore N∗logN∈Ω(log(N!))
Omega and Theta
Given N∗logN∈Ω(log(N!)) and log(N!)∈Ω(N∗logN). Which of the following can we say?
A. N∗logN∈Θ(log(N!))
B. log(N!)∈Θ(N∗logN)
C. Both A and B
D. Neither
Answer: C. Both A and B
Summary
We’ve shown that N∗logN∈Θ(log(N!)).
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...