Вы находитесь на странице: 1из 7

1

Math 103
Statistics and
Probability
Combinatorics
CJD
Fundamentals
Experiment : Any process that generates a set of data.
Observations : The recorded information as a result of an experiment
Sample Space S : The set of all possible outcomes of an experiment.
Sample Point : A particular outcome in the sample space.
Event : A subset of a sample space.
Simple Event : An event with only one element (sample point).
Compound Event : The union of simple events.
Null Space : Subset of sample space containing no elements.
CJD
Example
Experiment: Toss a coin thrice.
First Toss Second Toss Third Toss
Tree Diagram for listing all sample points of sample space S
H
T
T
T
T
T
T
T
H
H
H
H
H
H
S = { HHH, HHT, HTH, HTT, THH, THT, TTH, TTT }
CJD
Example (cont)
S
H2
= Event when exactly two heads appear
= { HHT, HTH, THH }
S
1H
= Event when the first toss results in a head
= { HHH, HHT, HTH, HTT }
S
H
= Event when all heads appear (a simple event)
= { HHH }
Venn Diagram
HHH
HHT
HTH
HTT
THH
TTT
THT
TTH
S
S
H
S
1H
S
H2
2
CJD
S
H2
= { HHT, HTH, THH }
S
1H
= { HHH, HHT, HTH, HTT }
S
H
= { HHH }
Intersection : contains all sample points common to both events.
A = S
H2
S
1H
= { HHT, HTH }
Mutually Exclusive Events : cannot occur simultaneously.
B = S
H2
S
H
= (SH2 and SH are mutually exclusive)
Union : contains all sample points from first OR second set.
C = S
H2
S
1H
= {HHT, HTH, THH, HHH, HTT}
Complement : contains sample points not in given set
D = S
1H
= S S
1H
= { TTT , TTH, THT, THH }
Operations on Events

CJD
Exercise
Experiment : Roll a pair of dice. (one red, one white)
What is the sample space?
Find A = event of getting a total of more than 10 dots.
Find B = event of getting an odd sum
Find C = event of getting the same number of dots on each die
Find the intersection of A and B
Find the intersection of B and C
Find the union of B and C
Find the complement of the intersection of A and B
CJD
Combinatorics
Combinatorial Reasoning underlies analysis
in computer science (like algorithms),
discrete operations, research problems and
finite probability.
Systematic analysis of different possibilities
Exploration of logical structure of a problem
Ingenuity
We are primarily concerned with
Counting Techniques.
CJD
Counting Principles
The Addition Principle
If there are n
1
different objects in the first set, n
2
objects in
the second, , n
m
objects in the k
th
set,
and if the different sets are disjoint (i.e. mutually exclusive or
pairwise intersections are empty),
Then the number of ways to select an object from one of
the m sets is n
1
+n
2
++n
k
.
The Multiplication Principle:
If a first operation can be performed in n
1
ways, and for
each of these a second operation can be performed in n
2
ways, , and for each way to perform the first (k-1)
operations, the k
th
operation can be performed in n
k
ways.
Then the number of ways to perform the k operations is
n
1
n
2
n
k
.
3
CJD
Addition Principle Example
200 students take Calculus, 500 take Statistics and 150
take both, how many (distinct) students are in these two
classes?
Solution 1: Use Inclusion-Exclusion formula from Discrete Math.
Solution 2 :
Addition rule cannot be applied directly because the sets are
not disjoint. So, categorize the data
200 150 = 50 are in Calculus but not in Statistics
500 150 = 350 are in Statistics but not in Calculus
150 are in Calculus and Statistics.
These 3 events are disjoint the addition principle applies.
So the answer is
50 + 350 + 150 = 550
n (A B) = n (A) + n (B) n (A B)
CJD
Experiment : Roll a pair of dice. (one red, one white)
How many outcomes are there?
How many outcomes are there with no doubles (different
value on the two dice) ?
Multiplication Principle Example
6 outcomes on each die. 6 x 6 = 36 outcomes
Think of rolling the dice in succession, say the red first.
The red die can take any of 6 outcomes,
The white die can take any of 5 value except the one on red.
So there are 6 x 5 ways = 30 outcomes
CJD
Exercise
How many even 4-digit numbers greater than 8000 can be
formed using the digits 1, 2, 3, 6, 7 and 9 if each digit can be
used at most once ?
Solution:
The first digit must be 9 so the number is bigger than 8000.
The fourth digit must be 2 or 6 only two choices.
The third digit can be any of 4 choices.
The second digit can be any of 3 choices.
So there are 1x3x4x2 = 24 such numbers
CJD
More Multiplication Exercises
1. A multiple choice exam has 10 questions with 4 choices each.
In how many ways can the exam be answered if each question is
answered with one of the choices ?
Answer : 4 4 4 4 4 4 4 4 4 4 = 4
10
ways
3. How many subsets does a set of 10 elements have ?
Answer: For each subset, an element of the set may or
may not be included.
So there are 2 2 2 2 2 2 2 2 2 2 = 2
10
ways.
2. How many bit strings are there with 10 bits ?
Answer: Each bit may be 0 or 1.
So there are 2 2 2 2 2 2 2 2 2 2 = 2
10
ways.
4
CJD
Addition and Multiplication Example
There are 5 different computer books, 6 different math
books, and 8 different literature books.
How many ways are there to pick an (unordered) pair
of two books not in the same category ?
Solution:
If computer and math are chosen, 5x6 = 30 ways
If computer and literature, 5x8 = 40 ways
If math and literature, 6x8 = 48 ways.
These 3 types of selection are disjoint,
So there are 30 + 40 + 48 = 118 ways in all.
CJD
Permutations
Permutation is the arrangement of all or part
of a set of objects into distinguishable
sequences.
Each unique ordering is called a permutation.
The ordering of the objects matters !!!
CJD
Permutation Example
How many different three digit numbers can
we make from 7, 8, and 9 if we use each
number only once?
We have three numbers to choose from to place in
the hundreds place.
After this, we have two left to put in the tens place.
Lastly we have one number left over to put in the
ones place.
3 2 1 = 6 ways
These numbers are:
987 978 897 879 789 798
CJD
Factorial
Factorial : The operation of repeatedly multiplying a
number times the next lower integer until reaching 1.
n! = n (n-1) (n-2) 1
For convenience, define 0! = 1
In previous example, the number of ways is 3! = 6.
How many three-digit numbers with distinct digits can be
formed using the digits 6,7,8,9 and 0 ?
Answer :
5 4 3 = 60
Calculator exercise on Factorials
5
CJD
Permutation Formula
The number of permutations of r objects from n distinct objects
In earlier example, P(5,3) = 5! / 2!
= (5 4 3 2 1) / (2 1)
= 5 4 3 = 60
)! (
!
) , (
r n
n
P r n P
r n

= =
Example : How many ways are there to elect the president,
vice president, secretary and treasurer of an organization
with 50 members if all elected officers are different people?
Answer : P(50,4) = 50 49 48 47 = 5,527,200 ways
Calculator exercise on Permutations
CJD
Permutations in a Circle
How many ways are there to seat 12 guests in a
circular table with 12 equally spaced chairs ?
Assume 2 circular permutations are the same if one is a
result of a rotation of the other.
Solution :
Fix one guest in a chair and arrange the other in
11! ways.
The number of permuations of n distinct objects
arranged in a circle is ( n 1 ) !
CJD
Combinations
Combination is the number of ways of
selecting r objects from n objects without
regard to ordering
Each unique selection is called a
combination.
Ordering of the selection does NOT matter !!!
CJD
Combination Example
Example: 5 bowlers must enter a tournament with 3 primary
players and 2 alternates. How many possible team
combinations could there be?
That is, how many ways can 3 players be selected from 5?
Selecting the 3 automatically selects the 2 alternates.
Solution :
The first player can be chosen in 5 ways, the second
in 4 ways, and the third in 3 ways = 5 4 3 = 60 ways.
But the ordering is not important.
After the 3 have been chosen, we must remove the
ordering of 3 players.
There are 3 2 1 = 6 such orderings.
So there are 60 / 6 = 10 ways to field the team into the
tournament.
6
CJD
Combination Formula
The number of permutations of r objects from n distinct objects
)! ( !
!
) , (
r n r
n
r
n
C r n C
r n

= =
In earlier example, C(5,3) = 5! / 3! 2!
= (5 4 3 2 1) / ((3 2 1)(2 1))
= 5 4 / 2 1 = 10
Calculator exercise on Combinations
CJD
Permutation : Not all objects distinct
The number of distinct permutations of n things of which
n
1
are of a kind, n
2
of a second kind, , n
k
of the k
th
kind
where n= n
1
+ n
2
++ n
k
is
! ! !
!
2 1 2 1 k k
n n n
n
n n n
n
L L
=

This extends the combination formula


from 2 groups (selected and unselected) to k groups.
How many ways to arrange the letters in the word
NAMAMANATA ?
Answer: 10!/(2!5!2!1!) = (10 9 8 7 6)/(2 2) = 7560 ways
CJD
Exercise
How many ways can 3 red, 4 yellow and 2 blue
bulbs be arranged in a string of Christmas lights
with 9 sockets?
Solution : 9! / (3! 4! 2!)
= 9 8 7 6 5 / 3 2 2 = 3 2 7 6 5
= 1260 ways
CJD
r n
C r n C
r
n
r n r
n
r n r
n
= =

) , (
)! ( !
!
) ( ,
Special Case
)! ( !
!
) ( , r n r
n
r n r
n

! ! !
!
2 1 2 1 k k
n n n
n
n n n
n
L L
=

If k=2,
7
CJD
A Combination Application
XX XXX X
Soda Juice Coffee
Select r objects (repetition allowed) from n types of objects
28
2
7 8
6
8 1
=

+
r
n r
Example: How many different orders of 6 drinks if there
are 3 kinds of drinks? (Coffee, Juice, Soda)
Question: How many domino tiles are there?
Each tile is an unordered pair of 0 to 6 dots with doubles allowed.
Answer: 2 selections from 7 objects = C(2+7-1,2)=C(8,2)=28
CJD
Exercises
1. How many ways are there to assign 100 different diplomats to
five different continents?
2. How many ways are there to assign 100 different diplomats to
five different continents if to each continent 20 diplomats must be
assigned ?
3. How many ways can 100 identical diplomatic letters be
sent to five different continents ?
Each diplomat has 5 ways to be assigned, so 5
100
ways
Arrange the diplomats in a row and distribute 20 identical brief
cases for each continent.
So 100!/(20!)
5
ways.
There are 100 orders from 5 different items,
So C(100+5-1,100)=C(104,100)
=104 103 102 101 / 4 3 2 1 = 4,598,126
CJD
Review
Combination : n! / ( r! (n r )! )
Order is not important.
Count all orderings of the same elements as 1 only
Permutation : n! / ( n r)!
Order is important.
Count each ordering separately.
With replacement : n * n *
Next selection is unaffected by previous selection.
Without replacement : n * (n 1) *
Previously selected elements
can not be selected in future selections.
CJD
End

Вам также может понравиться