You are on page 1of 48

Combinatorial Mathematics

Lesson 7b
FACTORIAL

L7b -- Combinatorial Mathematics 2


The Notation of Factorial
Factorial
---- the product of the first n positive
integers
i.e. n! = n(n-1)(n-2)(n-3)….
0!is defined to be 1.
i.e. 0!= 1
The
Counting
Principle
Counting Outcomes
Have you ever seen or heard the Subway or
Starbucks advertising campaigns where
they talk about the 10,000 different
combinations of ways to order a sub or
drink?

L7b -- Combinatorial Mathematics 5


Counting Outcomes
Have you ever seen or heard the Subway or
Starbucks advertising campaigns where
they talk about the 10,000 different
combinations of ways to order a sub or
drink?
When companies like these make
these claims they are using all the
different condiments and ways to
serve a drink.
L7b -- Combinatorial Mathematics 6
Counting Outcomes
- These companies can use (2) ideas related
to combinations to make these claims:

(1) TREE DIAGRAMS

(2) THE FUNDAMENTAL


COUNTING PRINCIPLE

L7b -- Combinatorial Mathematics 7


Counting Outcomes
(1) TREE DIAGRAMS

A tree diagram is a diagram used to show


the total number of possible outcomes in
a probability experiment.

L7b -- Combinatorial Mathematics 8


Counting Outcomes
(2) THE COUNTING PRINCIPLE

The Counting Principle uses multiplication of


the number of ways each event in an
experiment can occur to find the number
of possible outcomes in a sample space.

L7b -- Combinatorial Mathematics 9


Counting Outcomes
Example 1: Tree Diagrams.
A new polo shirt is released in 4 different
colors and 5 different sizes. How many
different color and size combinations are
available to the public?

Colors – (Red, Blue, Green, Yellow)


Styles – (S, M, L, XL, XXL)

L7b -- Combinatorial Mathematics 10


A Different Way
Example 1: The Counting Principle.
A new polo shirt is released in 4 different
colors and 5 different sizes. How many
different color and size combinations are
available to the public?

Colors – (Red, Blue, Green, Yellow)


Styles – (S, M, L, XL, XXL)

L7b -- Combinatorial Mathematics 11


Counting Outcomes

Example 1: The Fundamental Counting


Principle.
Answer.

Number of Number of Number of


Possible Styles Possible Sizes Possible Comb.

4 x 5 = 20

L7b -- Combinatorial Mathematics 12


Counting Outcomes
 Tree Diagrams and The Fundamental
Counting Principle are two different
algorithms for finding sample space of a
probability problem.

 However, tree diagrams work better for


some problems and the fundamental
counting principle works better for other
problems.

L7b -- Combinatorial Mathematics 13


So when should I use a tree diagram or the
fundamental counting principle?
- A tree diagram is used to:
(1) show sample space;
(2) count the number of preferred outcomes.

- The fundamental counting principle can be


used to:
(1) count the total number of outcomes.

L7b -- Combinatorial Mathematics 14


Counting Outcomes
Example 2: Tree Diagram.
Tamara spins a spinner two
times. What is her probability
of spinning a green on the
first spin and a blue on the second spin?

You use a tree diagram because you want a


specific outcome … not the TOTAL number of
outcomes.
L7b -- Combinatorial Mathematics 15
Counting Outcomes
Example 2: Tree Diagram.
Tamara spins a spinner two
times. What is her probability
of spinning a green on the
first spin and a blue on the second spin?

L7b -- Combinatorial Mathematics 16


Counting Outcomes
Example 3: The Counting Principle.
If a lottery game is made up of three digits
from 0 to 9, what is the total number of
outcomes?

You use the Counting Principle because you


want the total number of outcomes. How
many possible digits are from 0 to 9?

L7b -- Combinatorial Mathematics 17


Counting Outcomes
Example 3: The Fundamental Counting
Principle.
If a lottery game is made up of three digits
from 0 to 9, what is the total number of
possible outcomes?
# of Possible # of Possible # of Possible # of Possible
Digits Digits Digits Outcomes

10 x 10 x 10 = 1000

What chance would you have to win if you played one time?
L7b -- Combinatorial Mathematics 18
Guided Practice: Tree or Counting Principle?

(1) How many outfits are possible from a pair of


jean or khaki shorts and a choice of yellow,
white, or blue shirt?

(2) Scott has 5 shirts, 3 pairs of pants, and 4


pairs of socks. How many different outfits can
Scott choose with a shirt, pair of pants, and pair
of socks?

L7b -- Combinatorial Mathematics 19


Example 1
• You are purchasing a new car. Using the following
manufacturers, car sizes and colors, how many
different ways can you select one manufacturer,
one car size and one color?

Manufacturer: Ford, GM, Chrysler


Car size: small, medium
Color: white(W), red(R), black(B), green(G)

L7b -- Combinatorial Mathematics 20


Solution
• There are three choices of manufacturer, two
choices of car sizes, and four colors. So, the
number of ways to select one manufacturer, one
car size and one color is:

3 ●2●4 = 24 ways.

L7b -- Combinatorial Mathematics 21


Ex. 2 Using the Fundamental Counting Principle

• The access code for a car’s security system consists


of four digits. Each digit can be 0 through 9. How
many access codes are possible if each digit can be
repeated?

L7b -- Combinatorial Mathematics 22


PERMUTATION AND COMBINATION

L7b -- Combinatorial Mathematics 23


Permutations
Fundamental counting principle:
m1*m2*m3*…mk
• At a restaurant, one can choose from 6 salads, 3
meats, 4 vegetables, and 2 desserts. How many
different salad-meat-vegetable-dessert
combinations?

6*3*4*2 = 144

L7b -- Combinatorial Mathematics 25


Permutations
• A permutation is an ordered arrangement of the
elements of some set S
– Let S = {a, b, c}
– c, b, a is a permutation of S
– b, c, a is a different permutation of S
• An r-permutation is an ordered arrangement of r
elements of the set
– A♦, 5♥, 7♣, 10♠, K♠ is a 5-permutation of the set of cards
• The notation for the number of r-permutations: P(n,r)
– The poker hand is one of P(52,5) permutations

L7b -- Combinatorial Mathematics 26


Permutations
• Number of poker hands (5 cards):
– P(52,5) = 52*51*50*49*48 = 311,875,200
• Number of (initial) blackjack hands (2 cards):
– P(52,2) = 52*51 = 2,652
• r-permutation notation: P(n,r)
– The poker hand is one of P(52,5) permutations

P(n, r )  n(n 1)(n  2)...(n  r  1)


n!

(n  r )!

L7b -- Combinatorial Mathematics 27


r-permutations example
• How many ways are there for 5 people in this class
to give presentations?

• There are 27 students in the class


– P(27,5) = 27*26*25*24*23 = 9,687,600
– Note that the order they go in does matter in this
example!

L7b -- Combinatorial Mathematics 28


Permutation formula proof
• There are n ways to choose the first element
– n-1 ways to choose the second
– n-2 ways to choose the third
–…
– n-r+1 ways to choose the rth element

• By the product rule, that gives us:


P(n,r) = n(n-1)(n-2)…(n-r+1)

L7b -- Combinatorial Mathematics 29


Permutations vs. r-permutations
• r-permutations: Choosing an ordered 5 card hand is
P(52,5)
– When people say “permutations”, they almost always
mean r-permutations
• But the name can refer to both

• Permutations: Choosing an order for all 52 cards is


P(52,52) = 52!
– Thus, P(n,n) = n!

L7b -- Combinatorial Mathematics 30


• How many permutations of {a, b, c, d, e, f, g} end
with a?
– Note that the set has 7 elements

• The last character must be a


– The rest can be in any order
• Thus, we want a 6-permutation on the set {b, c, d,
e, f, g}
• P(6,6) = 6! = 720
L7b -- Combinatorial Mathematics 31
• How many ways are there to sit 6 people around a circular table, where
seatings are considered to be the same if they can be obtained from each
other by rotating the table?

• First, place the first person in the north-most chair


– Only one possibility
• Then place the other 5 people
– There are P(5,5) = 5! = 120 ways to do that
• By the product rule, we get 1*120 =120

• Alternative means to answer this:


• There are P(6,6)=720 ways to seat the 6 people around the table
• For each seating, there are 6 “rotations” of the seating
• Thus, the final answer is 720/6 = 120

L7b -- Combinatorial Mathematics 32


• A baseball team consists of nine players. Find the
number of ways of arranging the first four positions
in the batting order if the pitcher is excluded.

P(8,4) = 1680

L7b -- Combinatorial Mathematics 33


• If 8 basketball teams are in a tournament, find the
number of different ways that first, second, & third
place can be decided, assuming ties are not
allowed.

P(8,3) = 336

L7b -- Combinatorial Mathematics 34


Distinguished Permutations &
Combinations
Permutations vs. Combinations
• Both are ways to count the possibilities
• The difference between them is whether order
matters or not
• Consider a poker hand:
– A♦, 5♥, 7♣, 10♠, K♠
• Is that the same hand as:
– K♠, 10♠, 7♣, 5♥, A♦
• Does the order the cards are handed out matter?
– If yes, then we are dealing with permutations
– If no, then we are dealing with combinations

L7b -- Combinatorial Mathematics 36


Combinations
• What if order doesn’t matter?
• In poker, the following two hands are equivalent:
– A♦, 5♥, 7♣, 10♠, K♠
– K♠, 10♠, 7♣, 5♥, A♦

• The number of r-combinations of a set with n


elements, where n is non-negative and 0≤r≤n is:

n!
C (n, r ) 
r!(n  r )!
L7b -- Combinatorial Mathematics 37
Distinguishable Permutations:
• Of two arrangements of objects, one arrangement
cannot be obtained from the other by rearranging like
objects.
• Thus, BBBWR & BRBWB are distinguishable
permutations.
• If, in a collection of n objects, n are alike of one kind,
n2 are alike of another kind, …,nk are alike of a
further kind, the # of distinguishable permutations is
n!
n1! n 2!...nk!
L7b -- Combinatorial Mathematics 38
• Find the number of distinguishable permutations of
the letters in the word MISSISSIPPI.

L7b -- Combinatorial Mathematics 39


Combinations example
• How many different poker hands are there (5
cards)?
52! 52! 52 * 51* 50 * 49 * 48 * 47!
C (52,5)     2,598,960
5!(52  5)! 5!47! 5 * 4 * 3 * 2 *1* 47!
• How many different (initial) blackjack hands are
there?

52! 52! 52 * 51
C (52,2)     1,326
2!(52  2)! 2!50! 2 *1

L7b -- Combinatorial Mathematics 40


Example
• A little league baseball squad has six outfielders,
seven infielders, five pitchers, and two catchers.
Each outfielder can play any of the three outfield
positions, and each infielder can play any of the
four infield positions. In how many ways can a
team of nine players be chosen?

L7b -- Combinatorial Mathematics 41


A last note on combinations
• An alternative (and more common) way to denote
an r-combination:

n
C (n, r )   
r
• I’ll use C(n,r) whenever possible, as it is easier to
write in PowerPoint

L7b -- Combinatorial Mathematics 42


BINOMIAL THEOREM

L7b -- Combinatorial Mathematics 43


The Binomial Theorem (Binomial
expansion)
(a + b)1 = 1a +1b
coefficient
(a + b)2 = (a + b)(a + b)
=1a2 + 2ab + 1b2
(a + b)3 = (a + b)(a + b)(a + b)
=1a3 + 3a2b +3ab2 +1b3
The Binomial Theorem (Binomial expansion)
(a + b)4 = (a + b)(a + b)(a + b)(a +b)
=1a4 + 4a3b +6a2b2 +4ab3+1b4
Take out the coefficients of each expansion.

1
The Binomial Theorem (Binomial expansion)
Can you guess the expansion of (a + b)5
without timing out the factors ?

+ + + +

(a + b)5 =1a5 + 5a4b +10a3b2 +10a2b3+5ab4+1b4


L7b -- Combinatorial Mathematics 47
The Binomial Theorem (Binomial expansion)
Points to be noticed :
• Coefficients are arranged in a Pascal triangle.
• Summation of the indices of each term is equal to the
power (order) of the expansion.
• The first term of the expansion is arranged in
descending order after the expansion.
• The second term of the expansion is arranged in
ascending order order after the expansion.
• Number of terms in the expansion is equal to the
power of the expansion plus one.

L7b -- Combinatorial Mathematics 48

You might also like