Title: Counting and Discrete Probability
1Counting and Discrete Probability
- Basic principles
- Permutations and Combinations
- Pigeonhole principle
- Discrete probability
2Two Basic Principles
- Multiplication Principle
- Addition Principle
3Multiplication Principle
- Suppose an activity can be performed in t
successive steps
4Example
- strings of length 4 over Xa,b,c,d
- strings of length 4 over X that begins with a
- strings of length 4 over X that do not begin
with a - strings of length 4 over X with no repetition
5Example cardinality of a power set
6Example (Addition Principle)
How many six-bit strings begin with 101 or
001? six-bit strings begin with 101
2.2.28. six-bit strings begin with 001 8,
similarly. six-bit strings begin with 101 or
001 88 16.
7Example
8Inclusion-exclusion principle
9Example
7-bit strings which either begin with 0 or end
with 11 A 7-bit strings which begin with 0 B
7-bit strings which end with 11
10A permutation of n objects
11An r-permutation of n objects
12An r-combination of n objects is a set of r
elements selected from the n objects.
13Example
A coin is flipped 6 times. A possible outcome
H H T H T T
14Example
15Example
16Example
17Example
Given an n by n grid, how many ways are there to
go from (0,0) to (n,n), if in each step we can
either go right or go up? Eg. N3. ltUURURRgt is a
route. In general a route is represented by a a
sequence of length 2n with n Us and n Rs. To
form such a sequence choose n positions for U,
then fill in the remaining positions with R. So,
there are C(2n,n) routes.
18Example
routes from (0,0) to (n,n) as above, but we are
not allowed to go above the diagonal.
19(No Transcript)
20Generalized Permutations and Combinations
How many different strings can be formed by
reordering letters in the word good? 4!/2.
21Theorem
22Proof
23Alternative proof
24Example
Eight different books to be given to Adams, Bill
and Calvin, where Adams gets four books and Bill
and Calvin each get two. First solution Choose
3 books for Adams C(8,4) Choose 2 books for
Bill C(4,2) Choose 2 books for Calvin
C(2,2) Hence, C(8,4)C(4,2)C(2,2) by
multiplication principle.
25(No Transcript)
26Combinations with repetition
27Example
28Example
ways to distribute 15 identical books among 6
students.
29Binomial Coefficients
30(No Transcript)
31Corollary
32Example
33(No Transcript)
34Combinatorial identities from combinatorial
arguments
35Pigeonhole Principle
36Example
Ten persons have first names Alice, Bernard, and
Charles and last names Lee, McDuff and Ng. Then
at least two persons have the same first and last
names. Why? There are 9 possible names for the 10
persons 9 pigeonholes for 10 pigeons.
37Example
There are 20 persons in a room. Then at least
two persons have the same number of friends among
the 20 persons in the room.
38Example
39Example
40Example
If the decimal expansion of the quotient of two
integers is infinite, eventually some block of
digits repeat.
41Probability Theory
Developed in 17th century to analyze
games. Example Rolling a 6 sided fair die. The
probability that 3 appears. 1/6 The
probability that an even number appears.
3/61/2 Experiment Outcome Sample space Event
42Example Rolling a fair 6 sided die
43Example Rolling two fair dice
44Example
1000 microprocessors 20 defective Random
selection of 5 from the 2000
45General discrete probability
Outcomes need not be equally likely. Example
Rolling a loaded die 2-6 equally likely, but
1 three times as likely as any other
number.
46Definition of probability function
47Example Loaded die continued
48Theorem
49Example Two fair dice