
Explanation:
Let's analyze the asymptotic behavior of the three functions:
For large n:
Let's prove this mathematically:
Comparing h(n) and f(n):
h(n) = n^{log n} = (2^{log n})^{log n} = 2^{(log n)^2}
f(n) = 2^n
h(n) = n^{log n} = (2^{log n})^{log n} = 2^{(log n)^2}
f(n) = 2^n
For large n, n grows much faster than (log n)^2, so 2^n grows much faster than 2^{(log n)^2}. Therefore: h(n) = O(f(n))
Comparing g(n) and f(n): Using Stirling's approximation: n! ≈ √(2πn)(n/e)^n For n ≥ 4, n! > 2^n (can be proven by induction) Therefore: g(n) = Ω(f(n)) (g(n) grows at least as fast as f(n), actually much faster)
A) f(n) = o(g(n)); g(n) = o(h(n)) ❌
B) f(n) = Ω(g(n)); g(n) = O(h(n)) ❌
C) g(n) = O(f(n)); h(n) = O(f(n)) ❌
D) h(n) = O(f(n)); g(n) = Ω(f(n)) ✅
E) Nenhuma das anteriores ❌ Since option D is correct, this is false.
Option D is correct because:
Ultimate access to all questions.
No comments yet.
Considere as seguintes funções:
f(n) = 2^n
g(n) = n!
h(n) = n^{log n}
f(n) = 2^n
g(n) = n!
h(n) = n^{log n}
Assinale a alternativa correta a respeito do comportamento assintótico de f(n), g(n) e h(n).
A
f(n) = o(g(n)); g(n) = o(h(n)).
B
f(n) = Ω(g(n)); g(n) = O(h(n)).
C
g(n) = O(f(n)); h(n) = O(f(n)).
D
h(n) = O(f(n)); g(n) = Ω(f(n)).
E
Nenhuma das anteriores.