MAT214ALecture3 1
MAT214ALecture3 1
Friday 3-1
Spring 2019 10:50 – 12:05 pm
Take Home Quiz on Section 3-3
Questions on Section 3-3 Homework?
Recall:
We finished Section 3-3 Relations
Equivalence Relation: A relation R that is symmetric (order does not matter), transitive and reflexive.
Equivalence relations are useful for situations in mathematics where we want to regard different objects as
"essentially the same.”
Partial Order: A relation R that is asymmetric (order matters), transitive and reflexive. We are comparing any
two elements in the set to determine a sequence or order. Some elements may not be comparable, hence
“partial” order.
Today:
B) Section 6.1 Counting – Basic Principles, Section 6.2 Permutations and Combinations
Some definitions:
A permutation is an ordering of n distinct objects
A combination is an unordered selection (subset) of n distinct objects
Disjoint or mutually exclusive events cannot occur at the same time
Selecting without replacement means you can select or count the object only once.
Rule of Sum
Rule of Product – also called Multiplication Rule, Fundamental Counting Rule
Inclusion-Exclusion Rule
Factorial Rule
r-Permutations P(n,r) or nPr
r-Combinations C(n,r) or nPr
1. Rule of Sum (select without replacement, items are distinct)
If there are n choices for one action, and m choices for another action and the two actions cannot be done at
the same time (disjoint events), then there are n + m ways to choose one of these actions.
Example: Movie theatre is playing 3 comedies, 2 action movies, 4 dramas. If you go to watch single movies
how many choices do you have?- These are disjoint, 3 + 2 + 4 = 9 choices
2. Rule of Product (Fundamental Counting Rule) (may select with or without replacement)
For a sequence of events in which the first event can occur m1 ways and a second event can occur m2 ways,
the third m3 ways, etc. The events together can occur m1 * m2 * m3*…… ways.
#2 From Manhattan, choose from 3 bus services or 3 train services to head to DC.
Example: Use multiplication rule to prove that a set A = {x1, x2, x3, . . . xn} has 2n possible subsets.
P(A) is the power set of set A. This is the set of all possible subsets of A
If we let A = {1, 2, 3}, then P (A) = {∅, {1}, {2}, {3}, {1,2}, {2,3}, {3,1}, {1,2,3}} for 8 or 2 3 subsets (proper or
not)
We can use multiplication rule:
There are 3 elements 1, 2, 3 we can include the element or not include the element in our subset.
So each position has 2 choices: include or not include
(2)(2)(2) = 23 possible subsets.
In general, for a set with n elements, there are 2n possible subsets.
Example: How many strings of length 4 can be made from ABCDE, if repetition is not allowed. We are
choosing without replacement.
(5 choices)(4 choices)(3 choices)(2 choices) = 120 choices
Example: How many 8 bit strings begin with either 101 or 111
1 0 1 ___ ___ ___ ___ ___ + 1 1 1 ___ ___ ___ ___ ___
3. Inclusion – Exclusion Principle for Counting (Adjusts for sets that are not disjoint)
If X and Y are finite sets, then |X∪Y| = |X| + |Y| - |X ∩ Y|
[Recall that | | means number of elements]
The number of elements in X ∪ Y equals the number of elements in X + number elements is Y, but we subtract
any elements that are in both X and Y. That is, we subtract the double count.
This rule adjusts for sets that have elements in common, they are not “disjoint”.
Example: How many 8 bit strings start with 10 or end with 011 or both.
|X∪Y| = |X| + |Y| - |X ∩ Y|
|starts with 10 or end with 011| = |start with 10| + |end with 011| - |start with 10 and end with 011|
Start with 10 and end with 011 is double counted. It satisfies first
and second part of equation. There are 23 ways to construct this -
we need to subtract these.
Example: How many permutations of the letters ABCDEF contain the substring DEF?
Example: How many permutations of the letters ABCDEF contain the substring DEF in any order?
We have four choices A, B, C and DEF, but DEF can be in any order.
There are (3)(2)(1) or 6 orderings of DEF
There are 24 orderings of A, B, C, DEF (previous question)
So there are (6)(24) = 144 orderings of A,B,C and DEF in any order
But what if we don’t want to choose ALL n for our arrangement? Just r of n items?
5. r - Permutations Rule
The number of possible sequences of r items chosen from n different items without replacement.
Permutation Formula:
n is the number of available items
r is the number of items to be selected-without replacement
starts count of number of ways event can occur
n!
n Pr=
The number of permutations of r items selected from n items is (n−r )!
ends count of number of ways event can occur
Example: To win a trifecta bet, you need to specify the horses that finish in the top three spots in the exact
order in which they finish. If eight horses enter the race, how many different ways can they finish in the top
three spots?
P(8, 3) = (8)(7)(6) = 336
Or,
n = 8, r = 3
n! 8! 8!
P(8,3) = = = =336
( n−r ) ! ( 8−3 ) ! 5!
Example: How many ways can we select a chairman, vice-chairman, secretary and treasurer from a group
of 10 people?