PPT

advertisement
MAT 2720
Discrete Mathematics
Section 6.8
The Pigeonhole Principle
http://myhome.spu.edu/lauw
Goals

The Pigeonhole Principle (PHP)
• First Form
• Second Form
The Pigeonhole Principle (First
Form)
If n pigeons fly into k pigeonholes and k<n,
some pigeonhole contains at least two
pigeons.
1st
x1
3rd
2nd
x2
x3
x4
k - th
xn
Example 1
Prove that if five cards are chosen from an
ordinary 52- card deck, at least two cards
are of the same suit.
Example 1
Prove that if five cards are chosen from an
ordinary 52- card deck, at least two cards
are of the same suit.
Hearts
Spades
C1
C2
C4
Clubs
Diamonds
C3
C5
Example 1
Prove that if five cards are chosen from an
ordinary 52- card deck, at least two cards
are of the same suit.
We can think of the 5 cards as 5 pigeons and the 4
suits as 4 pigeonholes.
By the PHP, some suit ( pigeonhole) is assigned to at
least two cards ( pigeons).
Example 1
Prove that if five cards are chosen from an
ordinary 52- card deck, at least two cards
are of the same suit.
Formal Solutions:
The Pigeonhole Principle
(Second Form)
If f : X  Y and X  Y ,
then x1 , x2  X such that x1  x2 and f ( x1 )  f ( x2 ).
x1
x2
X
Y
Example 2
If 20 processors are interconnected,
show that at least 2 processors are directly
connected to the same number of
processors.
MAT 2720
Discrete Mathematics
Section 7.2
Solving Recurrence
Relations
http://myhome.spu.edu/lauw
Goals

Recurrence Relations (RR)
• Definitions and Examples
• Second Order Linear Homogeneous RR with
constant coefficients

Classwork
*Additional Materials…


We will cover some additional materials
that may not make senses to all of you.
They are for educational purposes only,
i.e. will not appear in the HW/Exam
2.5 Example 3
Fibonacci Sequence is defined by
f0  0, f1  1
f n  f n1  f n2 n  2
Show that
f n  2n , n 
2.5 Example 3
Fibonacci Sequence is an example of RR.
f0  0, f1  1
f n  f n1  f n2 n  2
Initial Conditions
RR
Recurrence Relations (RR)
Given a sequence an 
an  f  a0 , a1 , a2 ,
is called a RR
, an 1 
Example 1:
Population Model (1202)



Suppose a newly-born pair of rabbits, one
male, one female, are put in a field. Rabbits
are able to mate at the age of one month so
that at the end of its second month a female
can produce another pair of rabbits.
Suppose that our rabbits never die and that
the female always produces one new pair
(one male, one female) every month from the
second month on.
How many pairs will there be in one year?
Visa Card Commercial
Illustrations
Example 1:
Population Model (1202)
Example 2(a)


A person invests $ 1000 at 12 percent
interest compounded annually.
If An represents the amount at the end of n
years, find a recurrence relation and initial
conditions that define the sequence {An}.
Example 2(b)


A person invests $ 1000 at 12 percent
interest compounded annually.
Find an explicit formula for An.
Example 2(c)*

RR is closed related to recursions /
recursive algorithms
Example 2(c)*


RR is closed related to recursions /
recursive algorithms
Recursions are like mentally ill people….
Example 1
Fibonacci Sequence
f0  0, f1  1
f n  f n1  f n2 n  2
How to find an explicit formula?
Definitions
Second Order Linear Homogeneous RR with
constant coefficients
an  c1an1  c2an2
Example 3
Solve an  5an1  6an2 ; a0  7, a1  16
Recall Example 2

A person invests $ 1000 at 12 percent
interest compounded annually.
An  1.12  An 1
An  1.12  A0
n
In the form of t
n
Depends on
Initial Conditions
Example 3
Solve an  5an1  6an2 ; a0  7, a1  16
From last the example, it makes sense
to attempt to look for solutions of the
form
n
an  kt
Where t is a constant.
Expectations

You are required to clearly show how the
system of equations are being solved.
Verifications

How do I check that my formula is
(probably) correct?
Generalized Method

The above method can be generalized to
more situations and by-pass some of the
steps.
Theorem
Second Order Linear Homogeneous RR with
constant coefficients
an  c1an1  c2an2
Characteristic Equation t 2  c t  c
1
2
1. Distinct real roots t1,t2 : an  b  t1n  d  t2n
2. Repeated root t : a  b  t n  d  n  t n
n
Example 4
Solve
an  4an1  4an2 ; a0  1, a1  4
*The Theorem looks familiar?

Where have you seem a similar
theorem?
Download