Professional Documents
Culture Documents
Discrete Mathematics II
Course Instructors:
Dr. Victor T. Odumuyiwa
Dr. Ufuoma C. Ogude
•Lectures:
– E 304, Wednesday 10:00 am to 11:00 am
– Lab 203, Thursday 10:00 am to 12:00 am
Course Outline
We study topics in such areas as:
Sets and logic
proof techniques
discrete probability,
NP-Completeness.
Course Material
Textbook
Discrete Mathematics
and Its Applications
by Kenneth H. Rosen
element.
regardless of order.
5! 5!
5 C3
3! (5 3)! 3!2!
5 * 4 * 3 * 2 * 1 5 * 4 20
10
3 * 2 *1* 2 *1 2 *1 2
Combinations
Practice:
5! 5! 5 * 4
5 C3 10
3! (5 3)! 3!2! 2 * 1
Combinations
Practice:
A basketball team consists of two
centers, five forwards, and four
guards. In how many ways can the
coach select a starting line up of
one center, two forwards, and two
guards?
Combinations
Practice: A basketball team consists of two centers, five forwards,
and four guards. In how many ways can the coach select a
starting line up of one center, two forwards, and two
guards?
Center: Forwards: Guards:
2! 5! 5 * 4 4! 4 * 3
2 C1 25 2
C 10 4 C2 6
1!1! 2!3! 2 * 1 2!2! 2 * 1
2 C1 * 5 C 2 * 4 C 2
n n!
r r!( n r )!
Pascal’s Triangle
Beginning with row 0 and place 0, the number 20 appears in row 6, place 3. In
CafeOBJ we can check this.
red combCalc(6,3) . – gives 20
red combCalc(7,4) . – gives 35
red combCalc(7,3) . – gives 35
Special Combinations of a Set
n n
1 1 Examples in CafeOBJ
n
red combCalc(2,0) . -- 1
red combCalc(5,5) . -- 1
red combCalc(5,1) . -- 5
n
red combCalc(5,4) . -- 5
n
n n
1 n 1
Generally we label N choose R as:
Calculating n "n choose k".
8 8 7 k
28 n n!
2 1 2 Simplifying
9 98 7 6 r r!( n r )!
126
4 1 2 3 4
12 12 11 10 9 8
792
5 1 2 3 4 5
Combinations of a Set
• (16.10) The number of r-combinations of n elements
is n n!
r r!( n r )!
• A student has to answer 6 out of 9 questions on an
exam. How many ways can this be done?
9 9! 9 8 7 6! 9 8 7
84
6
6!3! 6!3! 3 2 1
Combinations with repetitions of a Set
• An r-combination with repetitions of a set S of
size n is a bag of size r all of whose elements
are in S. An r-combination of a set is a subset
of that set;
• An r-combination with repetition of a set is a
bag, since its elements need not be distinct.
Combinations with repetitions of a Set
• (16.12) The number of r-combinations with
repetition of a set of size n is:
n r 1
Repetitions
r Combination
size
size
Combinations with repetitions of a Set
• Suppose 7 people each gets either a burger, a
cheese burger, or fish (3 choices). How many
different orders are possible? The answer is the
number of 7-combinations with repetition of a
set of 3 elements.
3 7 1 9!
36
7 7!2!
Permutations of a bag
How many outcomes have one Head?
Permutation of a bag with 1 Head and four Tails.
5!
5
1!4!
Permutations of a bag
• How many outcomes contain at most one Head?
• One Head
5!
5
1!4!
• No Heads 5!
1
0!5!
• At most one Head 1 + 5 = 6 (rule of sums)
• Note 0!=1
Combinations of Set
• A chairman has to select a committee of 5 from a
facility of 25. How many possibilities are there?
25 25!
53130
5 5!20are
• How many possibilities ! there if the chairman
should be on the committee?
24 24!
10626
4 4!20!