MHB Is n! in O(4^n) or 4^n in O(n!)?

  • Thread starter Thread starter shamieh
  • Start date Start date
  • Tags Tags
    identities
AI Thread Summary
The discussion centers on the growth rates of n! and 4^n, specifically whether n! is in O(4^n) or 4^n is in O(n!). It is concluded that n! is not in O(4^n), as demonstrated by finding a specific n (like n=10) for which the relationship fails for any constant c. Conversely, it is established that 4^n is indeed in O(n!), supporting the second identity. Participants emphasize the importance of understanding the definitions and negations of big O notation to justify their conclusions. Overall, the consensus is that the second identity holds true while the first does not.
shamieh
Messages
538
Reaction score
0
Which of the following identities are true. Justify your answer.
a)$n! = O(4^n)$
b)$4^n = O(n!)$

I have NO clue what to do here. First I was thinking let $n = 0$ so that $1 = O(1)$ (constant time complexity?)
 
Technology news on Phys.org
It holds that:$$n!=1 \cdot 2 \cdots (n-1) \cdot n \geq 1 \cdot 2 \cdot 3 \cdot 4 \cdot 4 \cdots 4=1 \cdot 2 \cdot 3 \cdot 4^{n-3} \geq \frac{3}{32} \cdot 4^n$$

What can we deduce from that?
 
Here is what I've came up with..

I know that: $f(x) = O(g(x))$ iff $\exists$ positive constants $C$ and $n_0$ $|0 \le f(n) \le c * g(n),$ $\forall$ $n \ge n_0|$

So I found that $n! \notin O(4^n)$ by letting $n = 10$ and letting $c = 1$. Then I found that $4^n \in O(4^n)$ is that the correct way to say it? Basically I found that the second identity is true.
 
shamieh said:
Here is what I've came up with..

I know that: $f(x) = O(g(x))$ iff $\exists$ positive constants $C$ and $n_0$ $|0 \le f(n) \le c * g(n),$ $\forall$ $n \ge n_0|$

So I found that $n! \notin O(4^n)$ by letting $n = 10$ and letting $c = 1$. Then I found that $4^n \in O(4^n)$ is that the correct way to say it? Basically I found that the second identity is true.

I agree that the second identity holds, but the first doesn't.
You can prove that $4^n=O(n!)$ as I did in my previous post.
I think that in order to prove that $n! \notin O(4^n)$ you have to show the negation of the definition you stated.
The negation of $\forall$ is $\exists$ and conversely. So you just have to find a $n$ such that the relation doesn't hold for any $c$.
 
shamieh said:
Then I found that $4^n \in O(4^n)$
This is trivially true because $f(n)\in O(f(n))$ for every $f$: just take $C=1$ and $n_0=0$.

evinda said:
The negation of $\forall$ is $\exists$ and conversely. So you just have to find a $n$ such that the relation doesn't hold for any $c$.
To elaborate on this, the definition of $f(n)\in O(g(n))$ says
\[
\exists C\,\exists n_0\forall n\ge n_0\;f(n)\le Cg(n).
\]
The negation of this is
\[
\forall C\,\forall n_0\,\exists n\ge n_0\;f(n)>Cg(n).
\]
So to prove that $n!\notin O(4^n)$ using the definition, you need to find an $n$ for every $C$ and $n_0$.
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

Replies
0
Views
2K
Replies
1
Views
2K
Replies
2
Views
2K
Replies
15
Views
3K
Replies
8
Views
2K
Replies
5
Views
2K
Replies
5
Views
1K
Back
Top