Download Counting and Probability: Factorials, Permutations, and Combinations and more Slides Engineering Mathematics in PDF only on Docsity!
Counting & Probability
BASIC COUNTING FUNCTIONS
• The 24 permutations of 1,2,3,4 in
lexicographical order (a.k.a the “dictionary
order”) :
Falling factorial
• 5 people enter a queue in a random manner, and the queue
size is only 3. How many different patterns can we observe?
- There are five combinations for the first position.
- After the first person has arrived, there are four combinations
for the second position.
- After the first and second persons have arrived, there are three
combinations for the third position.
• Answer = (5)(4)(3) = 60.
• Notation: (n)k = (n)(n-1)(n-2)…(n-k+1).
• (n)k is called the “falling factorial”, the “Pochhammer
symbol”, or “descending factorial”.
• When k=n, (n) n reduces to n!.
http://en.wikipedia.org/wiki/Pochhammer_symbol
Counting when order is irrelevant
• In how many ways can we choose 2 ice-cream
toppings out of 10 ice-cream toppings?
• Let’s call the 10 toppings A to J.
• There are 45 choices:
AB, AC, AD, AE, AF, AG, AH, AI, AJ,
BC, BD, BE, BF, BG, BH, BI, BJ, CD,
CE, CF, CG, CH, CI, CJ, DE, DF, DG,
DH, DI, DJ, EF, EG, EH, EI, EJ, FG,
FH, FI, FJ,GH, GI, GJ, HI, HJ, IJ.
Binomial coefficient
• We use the symbol to stand for the
number of ways we can choose k objects out
of n distinguishable objects.
• Example:
• It is pronounced as “n choose k”.
• Other notations : nCk, Cnk
http://en.wikipedia.org/wiki/Binomial_coefficient
Model of Balls and Bins
• Throw k balls into n bins. The n bins are
distinguishable
– The balls may be distinguishable or indistinguishable.
– There may be at most one ball per bin, or no such
restriction.
• Task: Count the total number of combinations in
each case
May be more than one ball per bin
• Throw k balls into n bins. The n bins are
distinguishable
– Balls are distinguishable
– Balls are indistinguisable
Throwing k Balls into n Bins
Balls Bins At most one ball per bin
May be more than one ball per bin
Distinguishable Distinguishable
Indistinguishable Distinguishable
Occupancy problem
• The number on the lower right corner of the
table is the solution to the so called
occupancy problem.
• Example: n=3, k = 2. There are 6 combinations
http://en.wikipedia.org/wiki/Occupancy_theorem
The questions on the board
- Paint the faces of a cube by six different
colours, so that each face has one and
only one colour. How many different
ways can we paint the cube?
- There are eight persons and six
different types of drinks. Each person
want to buy one drink. In how many
ways can they purchase?
- There are five beads of different
colours. In how many ways can we put
them together to form a bracelet?
A
B
C
Terminologies
• The end result of a random experiment is called an
outcome.
- A random experiment may be throwing a pair of dice, or
checking whether it is sunny or raining today.
• The set of all possible outcomes is called the sample
space of the random experiment.
- Each element in the sample space is an outcome.
- We usually use the Greek letter for the sample space.
• An event is a set of outcomes.
• A probability measure assigns a real number to each
event.
- The probability of an event E is denoted by Pr( E ).
Venn diagram
Sample space
Event E 1
E 1 = { 1 , 3 }
Event E 2
E 2 = { 2 , 3 , 5 }
E 1 c= { 2 , 4 , 5 } (^) E 2 c^ = { 1 , 4 }
Superscript c^ stands for set complement.