Download Counting Techniques Rule 1: Multiplication rule. • # of ways to do

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

Approximations of π wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Birthday problem wikipedia , lookup

Addition wikipedia , lookup

Arithmetic wikipedia , lookup

Elementary mathematics wikipedia , lookup

Positional notation wikipedia , lookup

Factorial wikipedia , lookup

Transcript
Counting Techniques
Rule 1: Multiplication rule.
•
•
•
•
# of ways to do work A = m
# of ways to do work B = n
# of ways to do A and B together = mn
can be extended to finite no of works.
Ex: Suppose there are 4 ways of going to the library from this class and from the library there are 2 ways
of going to the President’s office. In how many ways one can go to the President’s office from this class
through the library?
Permutation and combination:
•
Permutation = arrangement of things. Arrangement emphasizes that the order of things is important.
•
Combination = selection of things. Selection emphasizes that the order of things is not important.
Ex: We want to form a two-digit number using the digits 1, 2, 3, 4. Permutation or combination? Why?
Ex: We want to make a team of 3 players from a pool of 5 players. Permutation or combination? Why?
Rule 2: Permutation with replacement (i.e., repetitions allowed).
Ex: An 8-bit word is made up of a sequence of eight 0’s and 1’s. What is the total # of 8-bit words?
In general,
total # of permutations of r objects selected with replacement from of n distinct objects =
1
Rule 3: Permutation without replacement (i.e., repetitions not allowed).
Ex: How many two-digit numbers (with distinct digits) can be formed using the digits 1, 2, 3, 4?
In general,
total # of permutations of r objects selected without replacement from n distinct objects =
Factorial notation: n! = n factorial = product of first n natural numbers = 1 (2) (3) … (n-1) (n)
•
•
Factorial of negative numbers not defined
0! = 1
Ex:
2! =
4! =
34!/32! =
Rule 4: Combination without replacement.
Ex: How many three-player teams can be formed from a pool of 5 players?
In general,
total # of combinations of r objects selected without replacement from n distinct objects =
2
Ex: (The birthday problem): In a class of n individuals, what is the probability that there is at least one
birthday match? To simplify this problem let us assume that no one was born in a leap year. Thus there
are 365 possible birthdays for an individual. We will assume that an individual is equally likely to be born
on any of 365 possible days.
3