Professional Documents
Culture Documents
⎧2 + r 0≤r≤5
⎪
- d r = ⎨2 − r r > 5 r is odd
⎪⎩2 / r r > 5 r is even
» Ex 9.1: Deposit $100 at an interest rate of 7% per year, compounded
annually
total amount at the end of each year is a numeric function a
- a = (100, 107, 114.49, 122.50, …), or
- ar = 100(1.07)r r≥0
» Ex 9.2: an aircraft
- spends 10 minutes on the ground before takes off
- climbs up at a uniform speed to 30000 feet in 10 minutes
- flies at the same altitude for 110 minutes
- lands down at a uniform speed in 10 minutes
- altitude of the aircraft, in thousands of feet is a function
cthuang, 2008 1
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
⎧0 0 ≤ r ≤ 10
⎪3(r − 10) 11 ≤ r ≤ 20
⎪⎪
- a r = ⎨30 21 ≤ r ≤ 130
⎪3(130 − r ) 131 ≤ r ≤ 140
⎪
⎪⎩0 r ≥ 141
cthuang, 2008 2
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
⎧0 0≤r≤4
⎪
b = S5a: br = ⎨1 5 ≤ r ≤ 15
⎪⎩2 r ≥ 16
- Ex: a: the altitude of an aircraft (e.g. 9.2)
⎧0 0 ≤ r ≤ 10
⎪3( r − 10) 11 ≤ r ≤ 20
⎪
a r = ⎨30 21 ≤ r ≤ 120
⎪3(130 − r ) 121 ≤ r ≤ 130
⎪0 r ≥ 131
⎩
cthuang, 2008 3
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
cthuang, 2008 4
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
⎧0 0≤r≤2
⎪⎪ 41
cr = ⎨ r =3 ⇐ (2-3 + 5) − 0
⎪8
⎪⎩− 2− r r≥4 ⇐ (2-r + 5) − (2-(r -1) + 5)
cthuang, 2008 5
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
cthuang, 2008 6
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
1
Ex: ar = r + 1 r ≥ 0, br = +7 r≥0
r
- for k = 7 and m = 1, |br| ≤ ar for r ≥ 7
Ö a asymptotically dominates b
1 2 ⎧− 1,000,000 0 ≤ r ≤ 10
Ex: ar = r − 1000 br = ⎨
100 ⎩− 100,000r r > 10
- for k = 106 + 1 and m = 10, |br| ≤ 10ar for r ≥ 106 + 1
Ö a asymptotically dominates b
» b does not dominate a asymptotically
for any choice of k and m, there exists r0 such that
| ar | > m br for r0 ≥ k
0
cthuang, 2008 7
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
cthuang, 2008 8
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
br = 0.05r 2 − r1 / 3 − 9 r≥0
» 7. It is possible that a does not asymptotically dominate b nor does
b asymptotically dominate a
- It is possible that a is not O(b) and b is not O(a).
⎧1 r is even
- Ex: ar = ⎨
⎩0 r is odd
cthuang, 2008 9
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
⎧0 r is even
br = ⎨
⎩1 r is odd
» 8. It is possible that both a and b asymptotically dominate c,
- while a does not asymptotically dominate b, nor does b
asymptotically dominate a
- It is possible that c is both O(a) and O(b),
while a is not O(b) and b is not O(a)
⎧1 r = 3i or 3i + 1
- Ex: ar = ⎨
⎩0 r = 3i + 2
⎧1 r = 3i or 3i + 2
br = ⎨
⎩0 r = 3i + 1
⎧1 r = 3i
cr = ⎨
⎩0 otherwise
» Ex 9.6: Show that for i ≤ j, αri is O(rj)
for k = 1 and m = 1
|ri| ≤ rj for r ≥1
Ö ri is O(rj)
Ö from truth 2, αri is O(rj)
» Ex 9.7: a = α0 + α1r + α2r2 +L+ αnrn, show that a is O(rn)
for i ≤ n, αιri is O(rn)
Ö from truth 4, a is O(rn)
cthuang, 2008 10
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
» O(1)
» O(log n)
» O(n)
» O(n log n)
» O(ni)
» O(αn)
» O(n!)
cthuang, 2008 11
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
» Ex: 1,1,1,1,1,1,0,0,0,0,0, …
» Ex: 3 ,3 ,3 ,, ,…, ,…
- 3 3 3 3
Ö (a close form)
» Generating function representation: possibility of expressing infinite
series in closed forms so that they can be manipulated conveniently
Let , then
- Ex: 7·3 , 0
Ö
- Ex: 3 , 0
Ö
Let , then
- Ex: 2 3 , 0
Ö
Ex:
cthuang, 2008 12
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
2, 0
Ö __________, 1
__________, 2
Let for some constant
-
Ö
- Ex: 1, 0
Ö
- Ex: , 0
Ö
- Ex:
Ö 2 2 , 0
0, odd
Ö Or
2 , even
For , no simple form to express
Let , , then
- Ex:
0, 0 3
Ö
2 , 4
Let , , then
- Ex: 3 , 0
Ö 1 3
cthuang, 2008 13
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
For ∆ , then
For , then
Convolution function
-
- Namely, the coefficient of of
-
- i.e.,
- Ex: 3 , 2 , 0. Let
Ö ,
cthuang, 2008 14
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
cthuang, 2008 15
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
Binomial Coefficients
» Binomial Theorem:
Let x, y be variables, and let n be a nonnegative integer. Then
- ∑ ,
,0 ,1 ,2
, 1 ,
Ex:
-
cthuang, 2008 16
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
Combinatorial argument
- Select r objects from n objects: C(n, r)
z C(n-1, r) ways to select r objects excluding a particular
one
z C(n-1, r-1) ways when this particular objects is always
included
Corollary 3:
- Let n and k be positive integers with . Then
Ö∑ , 2 3
» Def: 1 ∑ ,
Ö 1
cthuang, 2008 17
Discrete Mathematics: Discrete Numeric Functions and Generating Functions
n objects:
cthuang, 2008 18