You are on page 1of 30

Combinatorial Problems

What are Counting Techniques?


• The concept is usually use when the sample
space is too large for any Random Experiment.
• When we try to explore different ways to
arrange/rearrange objects.
• When we want to know how huge is the
domain of possibilities even in assigning simple
tasks to different individuals…
Counting Rules
In order to understand the concept; we can
consider the following case:
• If we have 3 objects A,B,C and we want to
choose 2 objects from 3.
• Then we have 2 Questions before we proceed…
Q1: Is duplication Allowed? (Y/N)
Q2: Is order important (ABBA)? (Y/N)
Counting Rules (Power Principle)
If the answer of both questions is YES, i.e.
Q1: Is duplication Allowed? (Y)
Q2: Is order important(ABBA)? (Y)
Then the group of arrangements should be:
AA AB AC
BA BB BC
CA CB CC
Total WAYS formula will be Nr where N=3 and r=2,
therefore 32=9 Ways, it is known as ‘POWER RULE’.
Counting Rules (Permutations)
If the answer sequence is below:
Q1: Is duplication Allowed? (N)
Q2: Is order important(ABBA)? (Y)
Then the group of arrangements should be:
AB AC
BA BC
CA CB
Total WAYS formula will be NPr= N!/(N-r)! , where
N=3 and r=2, therefore 3P2=6 Ways, it is known as
‘PERMUTATIONS’.
Counting Rules (Combinations)
If the answer sequence is below:
Q1: Is duplication Allowed? (N)
Q2: Is order important(ABBA)? (N)
Then the group of arrangements should be:
AB AC
BC
Total WAYS formula will be NCr= N!/r!(N-r)! , where
N=3 and r=2, therefore 3C2=3 Ways, it is known as
‘COMBINATIONS’.
Counting Rules (Cases)
Solve the following cases with a suitable
counting Rule:
1- How many ways are possible when we have to
decide a Batting order in a cricket team?
Answer is Permutations, because duplication is
not allowed but order matters, therefore:
10P =10! / (10-10)!=3628800 Ways
10
Counting Rules (Cases)
Determine whether the following situations would
require calculating a permutation or a combination:

a) Selecting three students to attend a conference in


Washington, D.C.
combination
b) Selecting a lead and an understudy for a school play.
permutation
c) Assigning students to their seats on the first day of
school.
permutation
Counting Rules (Cases)
• Evaluate:
Answer=720
• A coach must choose five starters from a team
of 12 players. How many different ways can the
coach choose the starters?
Answer=12C5=792
• Which of the following is NOT equivalent to ?
Counting Rules (Cases)
• The local Family Restaurant has a daily breakfast special in which the
customer may choose one item from each of the following groups:
Breakfast
Sandwich Accompaniments Juice
egg and ham breakfast potatoes
orange
egg and bacon apple slices cranberry
egg and cheese fresh fruit cup tomato
pastry apple
grape

a) How many different breakfast specials are possible?


Answer: 3C x 4C x 5C =60 breakfast choices
1 1 1
b) How many different breakfast specials without meat are possible?
Answer: 1C x 4C x 5C =20 meatless breakfast choices
1 1 1
Counting Rules (Cases)
• In How many ways we can design a Car’s Number Plate
if it comprises of 3 Alphabets followed by 3 Numbers?

Answer: 263x103=17576 x 1000=17576000 ways

• What if duplication is not allowed in the same case?


Answer: 26P x 10P = 15600 x 720 = 1123200 ways
3 3
Counting Rules (Cases)
• In How many ways we can set a Password for our
email address if it comprises of 6 letters?
Answer: 266=
• What if it contains 6 letters or numbers or both?
Answer: (26+10)6 =
• What if it contains 6 letters and numbers if duplication
is not allowed?
Answer: 36P6 =
A Probability Density Function (PDF)
• It’s a Mathematical Function which can
generate Probabilities in a Probability A Probability
Distribution. Distribution
• With reference to the previous random
X P(X=x)=
variable examples; we can generate the 2C 2
x/2
same probabilities using a mathematical
0 1/4
function i.e. P(X=x)=nCx/2n.
• If we put n=2 and x=0,1,2, we can 1 2/4
observe the same table.
2 1/4
• For X=0, we can compute;
P(X=0)=2C0/22=1/4 and so on.
Sequence of Bernoulli Trials (By James
Bernoulli) results Binomial Random Experiment
• In Dichotomous type random experiments, we
always encounter the Bernoulli trials (trials having
two possibilities, i.e. Success or Failure)
• If we consider a sequence of ‘n’ Bernoulli trials in
which we are having ‘x’ number of successive trials
i.e.; S,S,F,F,F,S,S,F,S,…….. F.
• So, it must contains ‘x’ successive trials and ‘n-x’
failure trials. Therefore the probabilities of
occurrence of ‘x’ success in ‘n’ trials, we got the
following PDF:
P(X=x)=nCx px (1-p)n-x where X=0,1,2,…n
Where, ‘n ’ showing number of independent trials and
‘p ’ is the proportion of success
Binomial Random Experiment
(An Example) 0.5
P(X=x)

0.4
0.3
0.2
0.1
0
0 1 2 3

• Suppose in a particular Open heart surgery


operation; chances of survival of patient are 70%
(p=0.7) and if 3 patients are being operated through
the same operation, then chances of survival are
given below;
P(X=0)=0.027,P(X=1)=0.189 , P(X=2)=0.441 and
P(X=3)=0.343, these results indicating higher
chances of survival of any two patients among three
and so on
MS-EXCEL Syntax is, =Binomdist(x,n,p,cumul)
Binomial Probability Distribution
(A Case)
• I need to obtain a sample proportion based on a
Hand-Poll consent of the class:
• Tell Me how many of you are Pro-Imran Khan as a
Leader of PTI?
• Based on a Hand-poll result; we can obtain a
sample proportion .
• Now, determine the probability of finding 7 pro-
Imran Khan students if we select 10 Graduate
students at random? P(X=7) where n=10 and p=
P(X=7) = 10C7 x 7 x (1 - )3
Binomial Probability Distribution
(A Case)
• Probability of Finding Atmost 3 pro-Imran Khan
students?
P(X3) = P(X=0)+P(X=1)+P(X=2)+P(X=3)
Which is similar to P(X<4)
• Probability of Finding Atleast 7 pro-Imran Khan
Students?
P(X7)=P(X=7)+P(X=8)+P(X=9)+P(X=10)
Which is similar to P(X>6)
• Probability of Finding 6 to 8 Pro-Imran Khan students?
(If nothing is written then default is inclusive)
P(6 X 8)=P(X=6)+P(X=7)+P(X=8)
Mathematical Expectation
(A Binomial Distribution case)
• As we know the Mean and Variance of any
Probability distribution is:
E(X)= X P(X=x) and V(X)=E(X2) – [E(X)]2
• But Using Binomial PDF, we can compute both
measures in terms of Parameters:
E(X)=np and V(X)=np(1-p)
• Determine the Average number of Pro-Imran
Khan Students in the group of 10.
The Poisson Distribution
• Poisson was the French Mathematician.
• He Worked on the Binomial PDF and
obtained its LIMITING FORM by putting
n and p0.
• Poisson Probability Density function can be
written as: P(X=x)=exp(-) x/x!
ˣ
• Domain for Poisson PDF is 0X
• Where  is the Parameter.
•  showing the rate of occurrence or Average.
The Poisson Distribution
(Working with PDF)
• If the value of Parameter is given i.e. =2, then
find the Probability distribution of X.
X 0 1 2 3 4 5 6 7 8
P(X=x) 0.1353 0.2707 0.2707 0.1804 0.0902 0.0361 0.0120 0.0034 0.0009

• Determine the Probabilities of X using Binomial


PDF with n=50 and p=0.04.
• Did you find any similarity b/w Binomial and
Poission Probabilities??
• Its due to the Asymptotic nature as
E(X)=np=50x0.04=2 which is equals to given .
The Poisson Distribution
(Cases)
• If a secretary is making 2 mistakes per page,
then determine the probability that she will
make no mistake in the next page?
P(X=0) with =2.
• According to the survey, it is found that there
are approx. 4 field mice per acre of land then
determine the probability that on the next
acre of land, there will be atmost 2 field mice
found?
P(X2) with =4.
The Normal (Gaussian) Distribution
(Distribution of a continuous random variable)
• Bell-shaped distribution or curve
• Perfectly symmetrical about the mean.
• Mean = median = mode
• Tails are asymptotic: closer and closer to horizontal
axis but never reach it. Approximate domain
formula is -3  X  +3
The Normal Probability Density Function

• The PDF is written as:

• Where ‘’ and ‘’ are two parameters which are


Mean and Standard Deviation, respectively.
• Simplify the ‘f(X)’ if =0 and =1?
• Simplified form is said to be the Standard Normal
Distribution.
Normal curves and probability
Finding Area Under the Standard Normal
Curve…
• Determine the following Areas/probabilities using the
Standard Normal Table:
1- P(Z1.25) =
2- P(Z< -1.00) =
3- P(Z= -1.00) =
4- P(Z +1.00) =
Solution,
P(Z +1.00) = 1 – P(Z< +1.00)
= 1 – 0.8413 = 0.1587
Theorem: P(Z +1.00) = P(Z  -1.00)
Finding Area Under the Standard Normal
Curve…
• Determine the following Areas/probabilities using the
Standard Normal Table:
5- P(-1.00  Z  +1.00) =
Solution,
P(-1.00  Z  +1.00) = P(Z  +1.00) – P(Z < -1.00)

Theorem:
P(a  Z  b) = P(Z  b) – P(Z < a)

6- P(-2.25  Z  -1.00) =
Observing Quantiles (Inverse
consideration of Standard Normal Table)
• Determine the following Quantiles/Percentage
Points/Z-scores using the Standard Normal Table:
7- P(Z  a) = 0.025
Z 0.09 … 0.06 … 0.00
-3.9
..
-1.9 0.025

Therefore, the answer will be a= -1.96


Observing Quantiles (Inverse
consideration of Standard Normal Table)
8- P(Z  b) = 0.05
Z 0.09 0.05 0.04 … 0.00
-3.9
..
-1.6 0.0495 0.0505

Therefore, b = -[1.6 + (0.04+0.05)/2] = -1.645


Elsewhere we can also consider the nearest value.
Normal Distribution (Cases)
Soft-drink Analysis from HU canteens
• Amount of soft-drink within a glass follows a
Normal Distribution with =220 ml. and =5 ml.
If a student purchases one glass of soft-drink then
determine the probability that he will get less than
215 ml within his glass:
P(X<215) = ??
We must use the z-transformation: Z = (X-)/, so:
P[(X-)/ < (215-220)/5] =
P( Z < - 1.00 ) = 0.1587
Normal Distribution (Cases)
Soft-drink Analysis from HU canteens
P(X<215) = 15.87%
1- There is a 16% chance that he will get less than
215ml within his glass.
2- We are 16% confident that he will get less than
215 ml. within his glass.
3- If 50 students purchasing 50 glasses of soft-drink
then approx. 50 x 0.1587  8 of them will be
having less than 215 ml. within their glasses…
Find: P( 215  X  225 ) = P(X  225) – P(X<215)
Normal Probabilities Using MS-EXCEL
• For any Normal distribution with =250 and
=5, we can obtain the P(X<245) using the
following syntax:
=Normdist(x,,,cumulative)
=Normdist(245,250,5,1)
• And for P(X>255)
=1 - Normdist(255,250,5,1)
We can apply the same scenario on a soft-drink case study.

You might also like