Homework 2 Solutions 50 points Context

advertisement
Homework 2 Solutions
50 points
Context
Define a function f to be admissable iff it is defined on almost all of the nonnegative integers and has positive real values on almost all of the domain. That
is, there is an integer n0 such that f (n) is defined and f (n) > 0 for all integers
n > n0 . Note that for polynomials, this condition requires that the leading
coefficient is a positive number.
Asymptotic Equivalence and Tilde Notation
For admissable functions f and g, define f ∼ g to mean that
f (n)
= 1.
lim
n→∞ g(n)
We show below that ∼ is an equivalence relation. The terminology used for f ∼ g
is that f and g are asymptotically equivalent. We denote by f˜ the asymptotic
equivalence class of f .
Proposition 1. ∼ is an equivalence relation on the set of admissable functions.
To prove Prop 1 we to verify that these three properties hold:
Reflexive: f ∼ f for all f
Proof. For any admissible function f , note that ff (n)
is defined and equal to 1
(n)
using straighforward algebra. Therefore
f (n)
= lim 1 = 1
lim
n→∞
n→∞ f (n)
verifying that f ∼ f .
Symmetric: f ∼ g implies g ∼ f for all f, g
Proof. Suppose that f ∼ g for two admissible functions f and g. Then
f (n)
lim
= 1.
n→∞ g(n)
Note that
g(n)
1
= f (n)
f (n)
g(n)
1
2
and hence that
g(n)
1
1
= lim f (n) = = 1
n→∞ f (n)
n→∞
1
lim
g(n)
which verifies that g ∼ f .
Caution!
It’s important to distinguish the above from the completely falacious argument:
limn→∞ g(n)
1
g(n)
=
= =1
lim
n→∞ f (n)
limn→∞ f (n)
1
Be sure you see why this argument is faulty.
Transitive: f ∼ g and g ∼ h implies f ∼ h, for all f, g, h
Proof. Suppose that f ∼ g and g ∼ h for three admissible functions f , g, and h.
Observe that
f (n)
f (n)g(n)
f (n) g(n)
=
=
×
h(n)
h(n)g(n)
g(n) h(n)
from which it follows that
f (n)
f (n) g(n)
f (n)
g(n)
lim
= lim (
×
) = lim
× lim
=1×1=1
n→∞ h(n)
n→∞ g(n)
n→∞ g(n)
n→∞ h(n)
h(n)
proving that f ∼ h.
Advisory
In general, it is legitimate to make the leap
f (n)
limn→∞ f (n)
=
lim
n→∞ g(n)
limn→∞ g(n)
if and only if it is independently verified (or a given) that
lim f (n)
n→∞
is a finite number and
lim g(n)
n→∞
is a finite non-zero number. Otherwise you end up with undefined expressions
∞ ∞ 0
such as ∞
, 0 , ∞ , and 00 .
3
Proposition 2. Suppose f and g are admissable and
f (n)
lim
= 0.
n→∞ g(n)
Then f + g ∼ g.
Proof. Before taking limits, observe that
f (n) g(n)
f (n)
f (n) + g(n)
=
+
=
+1
g(n)
g(n) g(n)
g(n)
and therefore
f (n) + g(n)
f (n)
f (n)
f (n)
lim (
) = lim (
+1) = lim
+ lim 1 = lim
+1 = 0+1 = 1.
n→∞
n→∞ g(n)
n→∞ g(n)
n→∞
n→∞ g(n)
g(n)
Therefore f + g ∼ g.
Proposition 3. Suppose f and g are admissable and f ∼ g. Then f = Θ(g).
Proof. Using the definition of limit: For any > 0
f (n)
1−<
<1+
g(n)
almost everywhere. Multiplying by g(n) we get
(1 − )g(n) < f (n) < (1 + )g(n)
almost everywhere. Let = 1/2, C1 = 1 − , and C2 = 1 + . Then substituting we
have C1 > 0, C2 > 0, and
C1 g(n) < f (n) < C2 g(n)
almost everywhere, which shows that f = Θ(g).
Exercise 4. Is the following inverse of Proposition 3 true? Suppose f and g are
admissable and f = Θ(g). Then f ∼ Cg for some positive constant C. (true or false)
This is false. For a counterexample, let f (n) = 2 + sin n and g(n) = 1. Then
because sin n takes values in the interval [−1, +1],
1 ≤ f (n) ≤ 3
from which we can conclude that f is admissible and f = Θ(1).
But
f ∼ g.
f (n)
g(n)
= 2 + sin n which has no limit as n → ∞, so we cannot conclude that
4
Exercise 5. Prove true or false:
(a) n log n + log n ∼ n log n
TRUE:
n log n
log n
1
n log n + log n
=
+
=1+
n log n
n log n n log n
n
which trends to 1.
(b) n log n + n ∼ n log n
TRUE:
n log n + n
n log n
n
1
=
+
=1+
n log n
n log n n log n
log n
which trends to 1.
(c) n log n + n log n ∼ n log n
FALSE:
which does not trend to 1.
n log n + n log n
2n log n
=
=2
n log n
n log n
Download