Download Combinatorics and Discrete Probability

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Inductive probability wikipedia , lookup

Birthday problem wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
Topics to be covered:
•Produce all combinations and permutations of
sets.
•Calculate the number of combinations and
permutations of sets of m items taken n at a
time.
•Apple basic fundamental counting principles
such as The Pigeonhole Principle,
Multiplication Principle, Addition Principle,
and Binomial Theorem to practical problems.
•Solve probability problems such as conditional
probability,
probability of simple events, mutually exclusive
events, and independent events.
•Find the odds that an event will occur given the
probabilities and vice versa.


A tree can be used to keep track of all the possibilities in a situation.
Example:
A computer installation has 4 input/output units (A, B, C and D) and 3 CPU’s (X, Y , and Z).
How many ways are there to pair an I/O unit with a CPU?
• The total number of ways to pair the two types is the same as the number of branches in
the tree, which is:
• 3 + 3 + 3 + 3 = 4 * 3 = 12
•
A
B
C
D
X
Y
Z
X
Y
Z
X
Y
Z
X
Y
Z
 If an operation consists of k steps and
• The first step can be performed in n1 ways,
• The second can be performed in n2 ways
(regardless of how the first step was performed),
• ….
• The kth step can be performed in nk ways
(regardless of how the preceding steps were
performed),
 Then
the entire operation can be
performed in n1n2…nk ways.
A
permutation of a set of objects is an
ordering of the objects in a row.
 Example: The set of alements {a, b, c} has
six permutations:
• abc acb cba bac bca cab
 There
are n ways to perform step one, (n
– 1) ways to perform step two, so the
number of permutations can be given
by…
•
n(n – 1)(n – 2)….2 * 1 = n!
 Given
the set {a, b, c} there are six ways to
select two letters from the set and write
them in order.
• ab ac ba bc ca cb
 An
r-permutation of a set of n elements is
an ordered selection of r elements taken
from the set of n elements.
 We use the notation nPr
 Answer given by the formula:
• nPr =
 How
many different ways can three of the
letters of the words BYTES can be chosen
and written in a row?
 There are 5 possible letters, and you are
selecting 3 of them, so this is written as
5P3
 5P3 =
 So, there
are 60 possible permutations.
 The
addition rule is used to calculate the
number of elements in the union,
difference, or intersection of mutually
disjoint finite sets.
 Suppose a finite set A equals the union of
k mutually disjoint subsets A1, A2,. . ., Ak.
Then…
 N(A) = N(A1) + N(A2) + . . . + N(Ak)
A
password consists of 1-3 letters chosen
from the 26 in the alphabet with repetitions
allowed.
 The set of all passwords can be partitioned
into subsets consisting of those of length 1,
length 2, and length 3.
• Passwords of length 1 = 26
• Passwords of length 1 = 262
• Passwords of length 1 = 263
 So
by the addition rule the total number of
passwords = 26 + 262 + 263 = 18,278
 An
r-combination of a set of n elements
is a subset of r of the n elements.
 Notation: nCr
 nCr =
 How
many distinct 5 person teams can be
chosen from a group of 12?
• Solution:
 What
if two members refuse to work
together? (C and D)
•
•
•
•
•
Teams that contain C but not D: 10C4 = 210
Teams that contain D but not C: 10C4 = 210
Teams that contain neither C nor D: 10C5 = 252
Use the addition rule to solve….
210 + 210 + 252 = 672
 The
binomial theorem uses combinations
to expand binomial powers:
 Example: expand
(a + b)5
 The
pigeonhole principle states that if n
pigeons fly into m pigeonholes and n > m
then at least one hole must contain two or
more pigeons.
 Example: In a group of thirteen people, must
there be two who were born in the same
month?
• Yes. Think of the 13 people as pigeons, and the 12
months as the pigeonholes. If you draw an arrow
from every person to a month, then there must be at
least one month that has two arrows pointing to it.
A sample space is the set of all possible
outcomes of a random process.
 An event is a subset of a sample space.
 A simple event is an event that consists of one
outcome.
 If S is a finite sample space in which all outcomes
are equally likely and E is an event in S then the
probability of E, denoted P(E), is

Note: for any finite set, N(A) denotes the number
of elements in A.
 The formula then becomes:

 The
sample space for these questions is a
standard 52 card deck.
• What is the probability that a black face card will
be drawn on the first draw?
 Answer:
• What is the probability that you will draw a 5 and
then a face card?
 Answer:

Suppose that a couple has two children, both of
which are equally likely to be a boy or a girl.
• 4 possible combinations: BB BG GB GG

Now suppose you are given the information that
one is a boy. What is the probability that the
other is a boy?
• Now there are only 3 possible combinations: BB BG GB
• Answer:
Formula for conditional probability:
 The left side is read as “The probability of event
B given event A.”

 Two
event are independent if
 Equivalently
 Example:
• A coin is tossed and a single 6-sided die is
rolled. Find the probability of the coin being
heads and rolling a 3.
• P(heads) = 1/2
• P(rolling 3) = 1/6
• P(heads and 3) = 1/2 * 1/6 = 1/12
 Two
events are considered mutually
exclusive if they cannot occur at the
same time (have no common outcomes)
 Example: tossing a coin. It can result in
heads or tails, but not both.