Chapter6 Counting
Chapter6 Counting
Chapter 6
Chapter Summary
● The Basics of Counting
● The Pigeonhole Principle
● Permutations and Combinations
● Binomial Coefficients and Identities
● Generalized Permutations and Combinations
● Generating Permutations and Combinations (not yet
included in overheads)
The Basics of Counting
Section 6.1
Section Summary
● The Product Rule
● The Sum Rule
● The Subtraction Rule
● The Division Rule
● Examples, Examples, and Examples
● Tree Diagrams
Basic Counting Principles: The
Product Rule
The Product Rule: A procedure can be broken down
into a sequence of two tasks. There are n1 ways to do
the first task and n2 ways to do the second task. Then
there are n1·n2 ways to do the procedure.
Solution: Let P be the total number of passwords, and let P6, P7, and P8 be the passwords of
length 6, 7, and 8.
● By the sum rule P = P6 + P7 +P8.
● To find each of P6, P7, and P8 , we find the number of passwords of the specified length
composed of letters and digits and subtract the number composed only of letters. We find that:
Example: How many ways are there to seat four people around a circular table, where
two seatings are considered the same when each person has the same left and right
neighbor?
Solution: Number the seats around the table from 1 to 4 proceeding clockwise. There
are four ways to select the person for seat 1, 3 for seat 2, 2, for seat 3, and one way for
seat 4. Thus there are 4! = 24 ways to order the four people. But since two seatings are
the same when each person has the same left and right neighbor, for every choice for
seat 1, we get the same seating.
Therefore, by the division rule, there are 24/4 = 6 different seating arrangements.
Tree Diagrams
● Tree Diagrams: We can solve many counting problems through the
use of tree diagrams, where a branch represents a possible choice and
the leaves represent possible outcomes.
● Example: Suppose that “I Love Discrete Math” T-shirts come in five
different sizes: S,M,L,XL, and XXL. Each size comes in four colors
(white, red, green, and black), except XL, which comes only in red,
green, and black, and XXL, which comes only in green and black.
What is the minimum number of stores that the campus book store
needs to stock to have one of each size and color available?
● Solution: Draw the tree diagram.
where the inequality ⌈N/k⌉ < ⌈N/k⌉ + 1 has been used. This is a
contradiction because there are a total of n objects.
Solution:
P(100,3) = 100 · 99 · 98 = 970,200
Solving Counting Problems by
Counting Permutations (continued)
Example: Suppose that a saleswoman has to visit eight
different cities. She must begin her trip in a specified city,
but she can visit the other seven cities in any order she
wishes. How many possible orders can the saleswoman
use when visiting these cities?
6! = 6 · 5 · 4 · 3 · 2 · 1 = 720
Combinations
Definition: An r-combination of elements of a set is an
unordered selection of r elements from the set. Thus, an r-
combination is simply a subset of the set with r elements.
● The number of r-combinations of a set with n distinct elements
is denoted by C(n, r). The notation is also used and is
called a binomial coefficient. (We will see the notation again in the
binomial theorem in Section 6.4.)
Example: Let S be the set {a, b, c, d}. Then {a, c, d} is a 3-
combination from S. It is the same as {d, c, a} since the order
listed does not matter.
● C(4,2) = 6 because the 2-combinations of {a, b, c, d} are the six
subsets {a, b}, {a, c}, {a, d}, {b, c}, {b, d}, and {c, d}.
Combinations
Theorem 2: The number of r-combinations of a set
with n elements, where n ≥ r ≥ 0, equals
and
Pascal’s Identity
Pascal’s Identity: If n and k are integers with n ≥ k ≥ 0, then
continued →
Combinations with Repetition
● Some possible ways of
placing the five bills:
solutions.
Combinations with Repetition
Example: Suppose that a cookie shop has four different
kinds of cookies. How many different ways can six
cookies be chosen?
Solution: The number of ways to choose six cookies is
the number of 6-combinations of a set with four
elements. By Theorem 2