Okay, let's go through each conjecture.
a. f(n) = O(g(n)) implies g(n) = O(f(n)).
Disprove.
This statement suggests a symmetric relationship for O-notation, which is incorrect. O-notation is an upper bound.
- Counterexample: Let f(n) = n and g(n) = n².
- Check premise: Is f(n) = O(g(n))? Is n = O(n²)?
Yes, because n ≤ 1 * n² for all n ≥ 1. So, there exist c=1, n₀=1 such that f(n) ≤ c * g(n) for n ≥ n₀.
- Check conclusion: Is g(n) = O(f(n))? Is n² = O(n)?
No. For n² = O(n) to be true, there would need to exist constants c > 0 and n₀ such that n² ≤ c * n for all n ≥ n₀. This simplifies to n ≤ c, which is false as n can grow indefinitely.
- Thus, the conjecture is false.
b. f(n) + g(n) = Θ(min{f(n), g(n)}).
Disprove.
The sum of two functions is typically dominated by the larger of the two, not the smaller.
- Counterexample: Let f(n) = n and g(n) = n². (Both are asymptotically positive).
- LHS: f(n) + g(n) = n + n². We know n + n² = Θ(n²) (since n² is the dominant term).
- RHS: min{f(n), g(n)} = min{n, n²}. For n ≥ 1, min{n, n²} = n. So, Θ(min{f(n), g(n)}) = Θ(n).
- Comparison: Is Θ(n²) = Θ(n)? No. For example, n²/n = n, which is not bounded by constants.
- Thus, the conjecture is false.
c. f(n) = O(g(n)) implies lg f(n) = O(lg g(n)), where lg g(n) ≥ 1 and f(n) ≥ 1 for all sufficiently large n.
Prove.
-
Given: f(n) = O(g(n)). This means there exist constants c > 0 and n₀ such that for all n ≥ n₀, 0 < f(n) ≤ c * g(n).
-
Given: f(n) ≥ 1 and lg g(n) ≥ 1 for sufficiently large n (say, for n ≥ n₁). The condition lg g(n) ≥ 1 implies g(n) ≥ 2.
-
Let n₂ = max(n₀, n₁). For n ≥ n₂, all conditions hold:
1 ≤ f(n) ≤ c * g(n)
g(n) ≥ 2 (so lg g(n) is well-defined and positive).
lg f(n) is well-defined and non-negative.
-
Taking base-2 logarithms (lg) of f(n) ≤ c * g(n):
lg(f(n)) ≤ lg(c * g(n))
lg(f(n)) ≤ lg(c) + lg(g(n))
-
Case 1: c ≥ 1. Then lg(c) ≥ 0.
Since lg g(n) ≥ 1 for n ≥ n₂, we have lg(c) = (lg(c) / lg g(n)) * lg g(n) ≤ lg(c) * lg g(n) (because lg(c)/lg g(n) ≤ lg(c) if lg g(n) ≥ 1).
So, lg(f(n)) ≤ lg(c) * lg g(n) + lg(g(n)) = (lg(c) + 1) * lg(g(n)).
Let c' = lg(c) + 1. This is a positive constant. So, lg(f(n)) ≤ c' * lg(g(n)), which means lg(f(n)) = O(lg g(n)).
-
Case 2: 0 < c < 1. Then lg(c) < 0.
lg(f(n)) ≤ lg(c) + lg(g(n)).
Since lg(c) is negative, lg(f(n)) < lg(g(n)).
Since we also know lg f(n) ≥ lg(1) = 0 (because f(n) ≥ 1), we have 0 ≤ lg(f(n)) < lg(g(n)).
This implies lg(f(n)) ≤ 1 * lg(g(n)).
So, lg(f(n)) = O(lg g(n)) with constant 1.
-
In both cases, lg f(n) = O(lg g(n)).
-
Thus, the conjecture is true.
d. f(n) = O(g(n)) implies 2^(f(n)) = O(2^(g(n))).
Disprove.
Exponential functions are highly sensitive to changes in the exponent.
- Counterexample: Let f(n) = 2n and g(n) = n. (Both are asymptotically positive).
- Check premise: Is f(n) = O(g(n))? Is 2n = O(n)?
Yes, because 2n ≤ 2 * n for all n ≥ 1. So, c=2, n₀=1.
- Check conclusion: Is 2^(f(n)) = O(2^(g(n)))? Is 2^(2n) = O(2^n)?
2^(2n) = (2^n)² . For (2^n)² = O(2^n) to be true, there would need to exist constants k > 0 and n₀ such that (2^n)² ≤ k * 2^n for all n ≥ n₀.
This simplifies to 2^n ≤ k. This is false, as 2^n grows indefinitely and cannot be bounded by a constant k.
- Thus, the conjecture is false.
e. f(n) = O((f(n))^2).
Disprove.
This is not true if f(n) can be a positive function that approaches 0.
- Counterexample: Let f(n) = 1/n. (f(n) is asymptotically positive as f(n) > 0 for n ≥ 1).
- LHS: f(n) = 1/n.
- RHS: (f(n))² = (1/n)² = 1/n². We are checking if f(n) = O(1/n²).
- Check: Is 1/n = O(1/n²)?
For this to be true, there must exist constants c > 0 and n₀ such that 1/n ≤ c * (1/n²) for all n ≥ n₀.
Multiplying by n² (which is positive for n ≥ 1): n ≤ c.
This is false, as n can grow indefinitely and cannot be bounded by a constant c.
- Thus, the conjecture is false.
(Note: If we had the additional constraint that f(n) ≥ 1 for sufficiently large n, then (f(n))² ≥ f(n), so f(n) ≤ 1 * (f(n))², making f(n) = O((f(n))²) true. But the problem only states "asymptotically positive".)
f. f(n) = O(g(n)) implies g(n) = Ω(f(n)).
Prove.
This is a standard property often called "transpose symmetry" for O and Ω.
- Given: f(n) = O(g(n)).
- By definition, this means there exist constants c₁ > 0 and n₀ such that for all n ≥ n₀, 0 ≤ f(n) ≤ c₁ * g(n).
- Since f(n) and g(n) are asymptotically positive, for n ≥ n₀ (and potentially some larger n₁ if c₁*g(n) was 0 for some g(n)=0 case, but asymptotic positivity covers this), we have f(n) > 0 and g(n) > 0.
- From f(n) ≤ c₁ * g(n), and knowing c₁ > 0:
We can divide by c₁: (1/c₁) * f(n) ≤ g(n).
- Let c₂ = 1/c₁. Since c₁ > 0, c₂ is also > 0.
- So, we have g(n) ≥ c₂ * f(n) for all n ≥ n₀.
- This is precisely the definition of g(n) = Ω(f(n)).
- Thus, the conjecture is true.
g. f(n) = Θ(f(n/2)).
Disprove.
This is true for many polynomial or logarithmic functions (e.g., n^k, log n), but not for all functions, especially very rapidly growing ones like exponentials.
- Counterexample: Let f(n) = 2^n. (f(n) is asymptotically positive).
- f(n/2) = 2^(n/2).
- Check: Is 2^n = Θ(2^(n/2))?
For this to be true, there must exist positive constants c₁, c₂ and n₀ such that for all n ≥ n₀:
c₁ * 2^(n/2) ≤ 2^n ≤ c₂ * 2^(n/2).
Consider the lower bound: c₁ * 2^(n/2) ≤ 2^n.
Dividing by 2^(n/2) (which is positive): c₁ ≤ 2^n / 2^(n/2) = 2^(n - n/2) = 2^(n/2).
Is c₁ ≤ 2^(n/2) for some constant c₁? Yes, this part holds as 2^(n/2) grows.
Consider the upper bound: 2^n ≤ c₂ * 2^(n/2).
Dividing by 2^(n/2): 2^(n/2) ≤ c₂.
This is false, as 2^(n/2) grows indefinitely and cannot be bounded above by a constant c₂.
- Since we cannot find such a c₂, the statement 2^n = Θ(2^(n/2)) is false.
- Thus, the conjecture is false.
h. f(n) + o(f(n)) = Θ(f(n)).
Prove.
Let h(n) = o(f(n)).
By definition of little-o, for every constant ε > 0, there exists an n₀ such that for all n ≥ n₀, 0 ≤ h(n) < ε * f(n) (since f(n) is asymptotically positive, f(n) > 0 for large n, so |f(n)| = f(n), and |h(n)| can be taken as h(n) if we assume o(f(n)) is also positive, or ensure 0 ≤ h(n)). More generally, |h(n)| < ε |f(n)|. Since f(n) > 0, |h(n)| < ε f(n). This means -ε f(n) < h(n) < ε f(n).
We need to show that there exist positive constants c₁, c₂ and n₁ such that for all n ≥ n₁:
c₁ * f(n) ≤ f(n) + h(n) ≤ c₂ * f(n).
-
Upper bound (O-notation):
f(n) + h(n)
Choose ε = 1. Then for n ≥ some n₀', h(n) < 1 * f(n). (Assuming h(n) ≥ 0. If h(n) can be negative, then h(n) < ε f(n)).
So, f(n) + h(n) < f(n) + 1 * f(n) = 2 * f(n).
Thus, f(n) + h(n) ≤ 2 * f(n) (taking c₂ = 2, or c₂ = 1+ε for any chosen ε). This shows f(n) + o(f(n)) = O(f(n)).
-
Lower bound (Ω-notation):
f(n) + h(n)
From the definition of o(f(n)), we have |h(n)| < ε * f(n) for any ε > 0 for n ≥ n₀(ε).
This implies -ε * f(n) < h(n) < ε * f(n).
So, f(n) + h(n) > f(n) - ε * f(n) = (1 - ε) * f(n).
Choose a specific ε, for example, ε = 1/2 (so 0 < ε < 1).
Then for n ≥ n₀(1/2), f(n) + h(n) > (1 - 1/2) * f(n) = (1/2) * f(n).
Let c₁ = 1/2. Then c₁ > 0.
So, f(n) + h(n) ≥ (1/2) * f(n). This shows f(n) + o(f(n)) = Ω(f(n)).
Since f(n) + o(f(n)) = O(f(n)) and f(n) + o(f(n)) = Ω(f(n)), it follows that f(n) + o(f(n)) = Θ(f(n)).
- Thus, the conjecture is true.