1comb Lecture3 Estimate
1comb Lecture3 Estimate
4 Estimates
Hence, heading for an estimate instead of the exact value save us lots of work
and considerably enlarge the range of problems we are able to cope with.
[Example 3.4.1] The following sum appears quite often in mathematics and computer
science:
n
1 1 1 1
n ∑
Hn = 1 + + + ⋯ + =
2 3 i=1
n
k−1 1
∑
Observe that x ≤ | Gk | max Gk = 2 = 1 and
x∈Gk
2k−1
k−1 1 1
∑
x ≥ | Gk | min Gk > 2 = .
x∈G
2 k 2
k
n ⌊log2 n⌋+1
1
∑i ∑
Therefore, we get Hn = ≤ 1 ≤ log2 n + 1 and
i=1 k=1
⌊log2 n⌋+1
1 1
∑
Hn > ≥ ⌊log2 n⌋
k=1
2 2
We can conclude that Hn does grow to infinity but slowly as the logarithm function.
We can conclude that Hn does grow to infinity but slowly as the logarithm function.
2 2
Ex) 10n + 5n = O(n )
2 3 8 5
(7n + 6n + 2)(n − 3n + 2 ) = O(n ).
After some practicing, one can write estimates without too much thinking,
by quickly spotting the ‘main terms’ in an expression. Such insight is usually
based on a use of the following simple rules.
α β
(1) n = O(n ) whenever α ≤ β.
C n
(2) n = O(a ) for any a > 1.
C α
(3) (ln n) = O(n )
Using the symbol O(), we can also write a more exact comparison of two function.
For example,
f(n) = g(n) + O( n) means that
f is the same as g up to an ‘error’ of the order n
(2)
2
n n
Ex) = + O(n).
2
We define most common symbols below
f(n)
- f(n) = o(g(n)) if lim =0
n→∞ g(n)
f(n)
- f(n) ∼ g(n) if lim =1
n→∞ g(n)
But one might think that the values of the factorial are too large
to have any significance in the real world.
100
For example, 70! > 10 .
n n−1
∏ ∏
n! ≤ n≤n n! ≥ 2≥2 .
1≤i≤n 2≤i≤n
( 2 )
n
n/2 n + 1
Gauss had a better idea : n ≤ n! ≤ (Theorem 3.5.2)
( 2 )
n
n+1
x
[Fact 3.5.4] For every real x, 1 + x ≤ e .
(e) (e)
n n
n n
[Theorem 3.5.5] Let n ∈ ℕ. e ≤ n! ≤ en
(e)
n
n
More precisely , we know n! ∼ 2πn (right is called Stirling’s formula)
( 2 )
n
n+1
So, lim = 0.
n→∞ n!
(e) (e)
n n
n n
[Theorem 3.5.5] Let n ∈ ℕ. e ≤ n! ≤ en
(e)
n
n
PF) First prove by induction on n that n! ≤ en . True when n = 1.
Assume n ≥ 2.
( e )
n−1
n−1
n! = n(n − 1)! ≤ ne(n − 1)
[ (e) ] ( n )
n n
n n−1
= en e
( n )
n
n−1
It suffices to show that e ⋅ ≤1
(e) (e)
n n
n n
[Theorem 3.5.5] Let n ∈ ℕ. e ≤ n! ≤ en
( n )
n
n−1
PF) Claim that e ⋅ ≤1
1 − 1n
We know 1 − ≤ e
n
( n)
n
1
≤ e (e ) = 1, as required.
1
n
−n
Thus, e 1 −
(e)
n
n
We conclude n! ≤ en .
(e) (e)
n n
n n
[Theorem 3.5.5] Let n ∈ ℕ. e ≤ n! ≤ en
(e)
n
n
PF) We prove by induction on n that e ≤ n! . True when n = 1.
Assume that n ≥ 2.
( e ) [ (e) ] ( n )
n−1 n n−1
n−1 n n−1
n! = n(n − 1)! ≥ n ⋅ e = e e
( n )
n−1
n−1
It suffices to show that e ≥ 1.
( n )
n−1
n−1
Claim that e ≥ 1.
n−1
n−1
(e )
n−1
( )
1 1 1 1
e n =e ≥e = e ⋅ = 1.
n−1 1+ 1 1
n−1 e
n−1
(e)
n
n
We conclude that e ≤ n!.
3.6 Estimates: binomial coefficients
(k) (k)
n n k
From the definition of , we have ≤n .
(k) ( k )
k
n n n−i n
A lower bound is ≥ , as ≥ .
k−i k
Quite good lower and upper bounds can be obtained from Stirling’s formula.
But these bounds are somewhat cumbersome for calculation, and
we have not proved Stirling’s formula.
x k ( 0 ) x k−1 ( 1 ) (k)
n
k 1 n 1 n n (1 + x)
Dividing by x , we get + + ⋯ + ≤
xk
Replacing the coefficients by 1, we get a smaller value. So,
( n)
n
k
By Fact 3.5.4, we get 1 + ≤ (e ) = e .
k/n n k
| A1 ∪ ⋯ ∪ An | = | A1 | + . . . − | A1 ∩ A2 | − . . .
(2) (3) ( j)
j j j−1 j
x contributes : j − + ⋯ + (−1) . By the binomial coefficient, this is 1.