prove of disprove f(n)+g(n) =Θ(min(f(n),g(n))).
时间: 2023-12-03 19:13:36 浏览: 96
We will prove that f(n) g(n) =Θ(min(f(n),g(n))) is true.
To prove this, we need to show that there exist positive constants c1, c2, and n0 such that for all n≥n0:
c1 * min(f(n), g(n)) ≤ f(n) * g(n) ≤ c2 * min(f(n), g(n))
Let's start with the left-hand side of the inequality:
c1 * min(f(n), g(n)) ≤ f(n) * g(n)
We can assume without loss of generality that f(n) ≤ g(n). Therefore, min(f(n), g(n)) = f(n). We can rewrite the above inequality as:
c1 * f(n) ≤ f(n) * g(n)
Dividing both sides by f(n), we get:
c1 ≤ g(n)
Since g(n) is a positive function, we can choose c1 to be a positive constant less than or equal to g(n) for all n. Therefore, the left-hand side of the inequality holds.
Now, let's move on to the right-hand side of the inequality:
f(n) * g(n) ≤ c2 * min(f(n), g(n))
Again, we can assume without loss of generality that f(n) ≤ g(n). Therefore, min(f(n), g(n)) = f(n). We can rewrite the above inequality as:
f(n) * g(n) ≤ c2 * f(n)
Dividing both sides by f(n), we get:
g(n) ≤ c2
Since g(n) is a positive function, we can choose c2 to be a positive constant greater than or equal to g(n) for all n. Therefore, the right-hand side of the inequality holds.
Thus, we have shown that there exist positive constants c1, c2, and n0 such that for all n≥n0:
c1 * min(f(n), g(n)) ≤ f(n) * g(n) ≤ c2 * min(f(n), g(n))
Therefore, we can conclude that f(n) g(n) =Θ(min(f(n),g(n))).
阅读全文