0% found this document useful (0 votes)
14 views5 pages

MAT214ALecture3 1

Uploaded by

goflux pwns
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views5 pages

MAT214ALecture3 1

Uploaded by

goflux pwns
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

MAT214A

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.

The inverse of a relation R, denoted R-1 is the set {(y, x) | (x, y) ∈ R}


Unlike functions every relation has an inverse: xR-1y ⇔ yRx.

The composition of relations R1 and R2 denoted R2 ∘ R1


Let R1 be the relation from X  Y and R2 be the relation from Y  Z. The composition of R1 and R2 is defined as:
R2 ∘ R1= { ( x , z )|( x , y )∈ R 1 ,( y , z)∈ R 2 for some y ∈Y }

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.

Example: How many ways to arrange ABC? Choose without replacement.


(3 choices)(2choices)(1 choice)

Example: How many 7 digit phone numbers? Choose with replacement.

Example: Travelling to Washington DC:

#1 Choose from 3 bus services or 2 train services to head from home to Manhattan.

#2 From Manhattan, choose from 3 bus services or 3 train services to head to DC.

How many ways to get to DC?

There are 2+3 ways to get to Manhattan. (Rule of sum) 


From Manhattan, there are, he has 3+3 ways to get to DC. (Rule of sum) 
Hence, he has 5*6=30 ways to get to DC in total. (Rule of product) 

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 ___ ___ ___ ___ ___

(1choice)(1 choice)(1 choice)(2 choices)(2 choices)(2 choices)(2 choices)(2 choices) = 2 5


Same process for second string,
so we have 25 + 25 = 64 possible 8 bit strings that begin with either 101 or 011

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.

|starts with 10 or end with 011| = 26 + 25 - 23 = 64 + 32 – 8 = 88 possible 8 bit strings

Example: Committee is comprised of A, B, C, D, E, F is to select a chair, secretary and treasurer. How


many selections if A, D are both officers?
Chair Secretary Treasurer
A 5 choicees 4 choices
5 choices A 4 choices
5 choices 4 choices A

# of arrangements where A is officer (3)(5)(4) ways. This is same for D.


[# ways A is officer] + [# ways D is officer] – [# ways A and D are officers together, this is double count]
(3 ways A is officer)(5 choices remaining)(4 choices remaining) + (3 ways D is officer)(5 choices
remaining)(4 choices remaining) – (3 ways A is officer)(2 ways D is officer)(4 choices remaining)

(3)(5)(4) + (3)(5)(4) – (3)(2)(4) = 60 + 60 -24 = 96 selections

4. Factorials and Factorial Rule


First the algebra:
The symbol !, denotes the product of decreasing whole numbers.
n! = (n)(n-1)(n-2)(n-3)…(3)(2)(1)
5! = (5)(4)(3)(2)(1)=120

Special rule: 0!=1


Let’s stop and consider why this is true.
4 ! 4∗3∗2∗1
It is true that: 3! = =3∗2∗1=3 !
4 4
3! 3∗2∗1
It is true that: 2! = =2∗1=2!
3 3
2! 2∗1
It is true that 1! = =1=1 !
2 2
Continuing in this pattern:
1! 1
It must be true that 0! = =1=0 !
1 1

The Factorial Rule


Factorial Rule is a special case of the Fundamental Counting Rule ->
A collection of n different things can be arranged in n! ways if we choose all n and choose without
replacement.

Example: How many permutations of the letters ABCDEF contain the substring DEF?

We have four choices A, B, C and DEF


(4) (3) (2) (1) = 24 permutations

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 to arrange ABC?


P(3,3) = (3)(2)(1) = 6
Or,
n=3, r=3
3! 6
P(3,3) = = =6
( 3−3 ) ! 1

Example: How many ways can we select a chairman, vice-chairman, secretary and treasurer from a group
of 10 people?

--------------------------stopped here --------------------------------


6. Combination Rule

You might also like