06 Handout 1
06 Handout 1
Counting Techniques
Multiplication Principle of Counting
The multiplication principle of counting states that: If there are n1 possible number of outcomes/ways for
event 𝐸1; and n2 possible number of outcomes/ways for event 𝐸2, then the possible number of outcomes/ways
for both events is (n1 ∗ n2) number of outcomes/ways. The multiplication principle of counting only works
when all choices are independent of each other.
Example:
How many lunches are possible consisting of a main entrée, fruit, and drink if one can select from
the following?
• a pizza, a sub sandwich, or chicken nuggets as main entrée.
• a banana, apple, orange, or grapes as fruit; and
• milk or apple juice as drink.
Solution:
To find the number of lunches that can be serve with three main entrées, four fruits and two drinks,
the events are described as follows:
• 𝐸1 is for main entrées: Since we have three main entrées (pizza, sub sandwich and
chicken nuggets) we can have n(𝐸1) = 3.
• 𝐸2 is for fruits: Since we have four fruits (banana, apple, orange and grapes) we can have
n(𝐸2) = 4.
• 𝐸3 is for drinks: Since we have two drinks (milk and apple juice) we can have n(𝐸3) = 2.
# of main entrées # of fruits # of drinks Total # of different
x x =
𝐸1 𝐸2 𝐸3 combinations 𝐸
3 x 4 x 2 = 24
There are a total of24 meals available.
Permutation
A counting technique which refers to the arrangement (or ordering) of a set of objects, from first to last, where
the order in which the objects are selected does matter. In a permutation n different object taken r at a time
(where r is a subset of n), an event cannot repeat.
𝒏!
𝒏 𝑷𝒓 =
(𝒏 − 𝒓)!
Where:
n is the number of objects to choose from
r is the number of objects selected
Example:
There are 12 puppies for sale at the local pet shop. Four are brown, four are black, three are spotted,
and one is white. What is the probability that all the brown puppies will be sold first?
Solution:
Since the order that the puppies are sold is important, this problem relates to permutation.
Determine n and r
• n is 12; since there are 12 puppies.
• r is 4; since there are 4 varieties of puppies to choose from (brown, black, spotted,
white)
A. The number of possible outcomes in the sample space is the number of permutations of 12 puppies
taken 4 at a time.
12! 12!
𝒏 𝑷𝒓 = = = 11,880
(12 − 4)! 8!
There are four brown puppies that can be sold first. Thus, to find the number of ways to get the 4
brown puppies in their specific positions, the events are described as follows:
• 𝐸1 is for first puppy position: Since we have any of the four puppies in the first puppy
position, we can have n(𝐸1) = 4.
• 𝐸2 is for second puppy position: Since we have any of the remaining three puppies in the
second puppy position, we can have n(𝐸2) = 3.
• 𝐸3 is for third puppy position: Since we have either of the remaining two puppies in the
third puppy position, we can have n(𝐸3) = 2.
• 𝐸4 is for fourth puppy position: Since we have one remaining puppy in the fourth puppy
position we can have n(𝐸4) = 1.
B. Once an event occurs in a permutation with n objects taken all at a time where some items consist of
look-alikes/duplicates and rest are all different, it can occur again.
𝒏!
𝒏 𝑷𝒓 =
𝒏𝟏 ! × 𝒏𝟐 ! … × 𝒏𝟑 !
Where:
n is the total number of objects
n1 is the first kind
nr is the last kind
Example:
A box of floor tiles contains the following in random order:
• 5 blue (bl) tiles
• 2 gold (gd) tiles
• 2 green (gr) tiles in random order.
The desired pattern is bl, gd, bl, gr, bl, gd, bl, gr, and bl. If we selected a permutation of these tiles at
random, what is the probability that we would be choose the correct sequence?
Solution:
Determine n, n1, n2, n3, n4
• n = 9; since there is a total of 9 tiles
• n1 = 5; since blue occurs 5 times
• n2 = 2; since gold occurs 2 times
• n3 = 2; since green occurs 2 times
𝟗! 𝟑𝟔𝟐, 𝟖𝟖𝟎
𝒏 𝑷𝒓 = = = 𝟕𝟓𝟔
𝟓! × 𝟐! × 𝟐! 𝟒𝟖𝟎
bl gd bl gr bl gd bl gr bl
Thus, the probability that a permutation of these tiles selected will be in the chosen sequence is 1
divided by the permutation representing the 756 possible orderings.
1 1
𝑃(𝐸) = = = 0.00132 = 0.132%
𝑛 𝑃𝑟 756
C. In a permutation with n different objects taken all at a time, n = r.
𝒏 𝑷𝒏 = 𝒏!
Where:
n (left of P) is the number of objects to arrange
n (right of P) is the number of positions available for the objects to fill
n! is read as “n factorial”
Example:
Ramon has five books on the floor, one for each of his classes:
• Algebra
• Chemistry
• English
• Spanish
• History
Ramon is going to put the books on a shelf. If he picks the books up at random and places them in a
row on the same shelf, what is the probability that his English, Spanish, and Algebra will be the
leftmost books on the shelf followed by the 2 other books?
Solution:
Step 1
o Determine how many book arrangements meet the conditions.
o Determine n(left) and n(right) for placing the 3 leftmost books:
• n(left) = 3; since there are 3 different books (English, Spanish and Algebra) to arranged
• n(right) = 3; since there are 3 positions available for the 3 different books to place on the
shelf
𝟑 𝑷𝟑 = 𝟑! = 𝟑 × (𝟑 − 𝟏) × (𝟑 − 𝟐) = 𝟔 𝒘𝒂𝒚𝒔
o Determine n(left) and n(right) for placing the other 2 books:
• n(left) = 2; since there are 2 other books to arranged
• n(right) = 2; since there are 2 positions available for the 2 other books to place on the shelf
after the other 3 books
𝟐 𝑷𝟐 = 𝟐! = 𝟐 × (𝟐 − 𝟏) = 𝟐 𝒘𝒂𝒚𝒔
Step 2
o Use the multiplication principle of counting to find the number of successes
# of placement for the # of placement for the Total # of
3 leftmost books x other 2 books x successes
𝐸1 𝐸2 𝐸
6 x 2 = 12
Step 3
o Find the total number of possible 5-book arrangements.
o Determine n(left) and n(right) for 5-book arrangements:
• n(left) = 5; since there are 5 books to arranged
• n(right) = 5; since there are 5 positions available for placing the books on the shelf
𝟓 𝑷𝟓 = 𝟓! = 𝟓 × (𝟓 − 𝟏) × (𝟓 − 𝟐) × (𝟓 − 𝟑) × (𝟓 − 𝟒) = 𝟏𝟐𝟎 𝒘𝒂𝒚𝒔
Step 4
Combination
A selection of objects from a collection in any order as oppose to permutations which deal with the ordered
arrangements of objects.
In a combination in which r objects can be selected from a set of n objects, the selection rules are:
o the order of selection does not matter (the same objects selected in different orders are regarded as the
same combination);
o each object can be selected only once; this implies that you are not allowed any repeat numbers.
𝒏!
𝑪(𝒏, 𝒓)( 𝒏𝒓) =
𝒓! (𝒏 − 𝒓)!
Where:
n is the size of the full set
r is the number of selected set
(n-r) is the number of set that was left
Example:
A high school is planning to put on a “A Chorus Line” musical. There are 20 singers auditioning for
the musical. The director is looking for two singers who could sing a good duet. What is the
probability that Kevin and Phoebe are the two singers who are selected by the director?
Solution:
This question involves a combination because the order of the two students selected does not
matter.
o Determine n and r:
n = 20; since there are 20 singers auditioning for the musical
r = 2; 2 singers will be chosen among 20 singers
𝟐𝟎! 𝟐𝟎!
𝑪(𝒏, 𝒓)( 𝒏𝒓) = = = 𝟏𝟗𝟎
𝟐! (𝟐𝟎 − 𝟐)! 𝟐! (𝟏𝟖)!
The probability of one of the selections (Kevin and Phoebe) would be 1 divided by the combination.
1
𝑃(𝐸) = = 0.00526 = 0.526%
190
Probability
Probability is used to describe the phenomenon of chance or randomness of events to occur. It does not deal
with guarantees, but with the likelihood of an occurrence of an event.
Based on examining past data and using logical and mathematical equations involving the data to determine
the likelihood of an independent event occurring.
Experiments
- refers to a situation involving chance or probability that produces an event.
- Example: tossing a coin, rolling a die,
Sample space (S)
- refers to set of all possible outcomes of an experiment, that is, any subset of the sample space.
- Example: S (tossing a coin) = {head, tail}
S (rolling a die) = {1, 2, 3, 4, 5, 6}
Event (E)
- refers to one or more of the possible outcomes of a single trial of an experiment. When one event
occurs, it is simple event. When two or more events occur in a sequence, it is compound event.
Simple Event: Probability of getting a Head (H) when a coin is tossed; Probability of getting 1 when a
die is thrown
Compound Event: When two coins are tossed, probability of getting a Head (H) in the first toss and
getting a Tail (T) in the second toss.
Probability Formula:
Probability of an event happening
𝑛 (𝐸)
𝑷(𝑬) =
𝑛 (𝑆)
P(E) – Experiments refers a situation involving chance or probability that produces an event.
n(S) – Sample space: refers to set of all possible outcomes of an experiment, that is, any subset of the
sample space.
n(E) – Event refers to one or more of the possible outcomes of a single trial of an experiment. When
one event occurs, it is simple event. When two or more events occur in a sequence, it is compound
event.
Mutually Exclusive Events
- When one event occurs, the other cannot, and vice versa (i.e., they have no outcomes in
common)
Not Mutually Exclusive Events
- The probability that A or B will occur is the sum of the probabilities of the two (2) events minus
the probability that both will occur.
Independent Events
- Whatever happens in one event has absolutely nothing to do with what will happen next
because:
▪ The two events are unrelated
▪ An event is repeated with an item whose numbers will not change (e. g., spinners or
dice)
▪ The same activity is repeated, but the item that was removed is REPLACE.
Dependent Events
- What happens or whatever is the result of the second event depends upon or will change
because of what happened first.
Conditional Probability
- The probability that B will occur given that A has occurred is called the conditional probability
of B given A and is written P(B|A). Answers the question: “What is the chance of an event B
happening, given that event A has already happened?”
Sample Problems:
1. A manufacturer inspects 50 computer monitors and finds that 45 have no defects. What is the
probability that a monitor chose at random has no defects?
Solution:
45
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑐ℎ𝑜𝑜𝑠𝑖𝑛𝑔 𝑎 𝑚𝑜𝑛𝑖𝑡𝑜𝑟 𝑤𝑖𝑡ℎ 𝑛𝑜 𝑑𝑒𝑓𝑒𝑐𝑡𝑠 = = 0.9 = 90%
50
2. A survey was taken on 30 classes at a school to find the total number of left-handed students in each
class. The table below shows the results:
No. of Left-handed students (X) 0 1 2 3 4 5
Frequency (no. of classes) 1 2 5 12 8 2
A class was selected at random. Find the probability that the class has 2 left-handed students.
Solution: The number of possible outcomes is 30.
5 5 1
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑓𝑖𝑛𝑑𝑖𝑛𝑔 𝑎 𝑐𝑙𝑎𝑠𝑠 ℎ𝑎𝑣𝑖𝑛𝑔 2 𝑙𝑒𝑓𝑡 − ℎ𝑎𝑛𝑑𝑒𝑑 𝑠𝑡𝑢𝑑𝑒𝑛𝑡𝑠 = ÷ =
30 5 6
𝑃(𝑋 = 2) = 0.16666 = 16.67%
Sample Problems
1. A sock drawer contains one pair of socks with each of the following colors: blue, brown, red, white
and black. If you grab a pair without looking, what is the probability that you pick red, replace it,
pick another, and still get red?
1
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑔𝑒𝑡𝑡𝑖𝑛𝑔 𝑟𝑒𝑑 =
5
After returning the sock, and picking another:
1
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑔𝑒𝑡𝑡𝑖𝑛𝑔 𝑟𝑒𝑑 𝑎𝑔𝑎𝑖𝑛 =
5
1 1 1
𝑷(𝒓𝒆𝒅 𝒕𝒉𝒆𝒏 𝒓𝒆𝒅) = 𝑥 = = 𝟎. 𝟎𝟒 = 𝟒%
5 5 25
1
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑔𝑒𝑡𝑡𝑖𝑛𝑔 𝑟𝑒𝑑 =
5
2. There are 6 black pens and 8 blue pens in a jar. What is the probability that you will get a black one
then another black pen without replacing the first one?
6 3
𝑃(𝑏𝑙𝑎𝑐𝑘, 𝑓𝑖𝑟𝑠𝑡 𝑝𝑖𝑐𝑘) = =
14 7
𝑜𝑛 𝑡ℎ𝑒 𝑠𝑒𝑐𝑜𝑛𝑑 𝑝𝑖𝑐𝑘, 𝑜𝑛𝑙𝑦 5 𝑏𝑙𝑎𝑐𝑘 𝑝𝑒𝑛𝑠 𝑎𝑛𝑑 8 𝑏𝑙𝑢𝑒 𝑝𝑒𝑛𝑠 𝑟𝑒𝑚𝑎𝑖𝑛 𝑖𝑛 𝑡ℎ𝑒 𝑗𝑎𝑟
5
𝑃(𝑏𝑙𝑎𝑐𝑘, 𝑠𝑒𝑐𝑜𝑛𝑑 𝑝𝑖𝑐𝑘) =
13
3 5 15
𝑃(𝑏𝑙𝑎𝑐𝑘 𝑎𝑛𝑑 𝑏𝑙𝑎𝑐𝑘) = 𝑥 = = 𝟎. 𝟏𝟔𝟒𝟖𝟑 = 𝟏𝟔. 𝟒𝟖𝟑%
7 13 91
References:
Johnsonbaugh, R. (2018). Discrete mathematics. Pearson
Rosen, K. H. (2019). Discrete Mathematics and Its Applications. McGraw-Hill Education.
Rosenberg, A. L., & Trystram, D. (2021). Understand Mathematics, Understand Computing. Springer
Publishing.