slides08

# slides08 - Counting and Probability CMSC 250 1 Counting q...

This preview shows pages 1–9. Sign up to view the full content.

1 CMSC 250 Counting and Probability

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 CMSC 250 Counting Counting elements in a list: how many integers in the list from 1 to 10? how many integers in the list from m to n ? (assuming m n )
3 CMSC 250 How Many in a List? How many positive three-digit integers are there? (this means only the ones that require 3 digits) 999 – 99 = 900 (999 3 or fewer digit numbers – 99 2 or fewer) 999 – 100 + 1 = 900 (100, 101, …, 999 – previous slide) 9 10 10 = 900 (9 hundreds digits, 10 tens digits, 10 unit digits) How many three-digit integers are divisible by 5? 20 5, 21 5, …, 199 5 count the integers between 20 and 199 199 – 20 + 1 = 180

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 CMSC 250 The breakfast problem Bill eats Rice Krispies, Cornflakes, Raisin Bran, or Cheerios. Bill drinks coffee, orange juice, or milk. How different types of breakfast can Bill have?
5 CMSC 250 The multiplication rule If the 1 st step of an operation can be performed n 1 ways And the 2 nd step can be performed n 2 ways And the k th step can be performed n k ways Then the operation can be performed n 1 n 2 ∙ ∙ ∙ n k ways

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 CMSC 250 Using the multiplication rule for selecting a PIN Number of 4 digit PINs of (0,1,2,.) with repetition allowed = 4 4 4 4 = 256 with no repetition allowed = 4 3 2 1 = 24 Extra rules : . (the period) can’t be first or last 0 can’t be first with repetition allowed = 2 4 4 3 without repetition allowed = 2 2 2 1 (first column, then last column, then middle two)
7 CMSC 250 Permutations Number of ways to arrange n different objects Pick first object n ways Pick second object n -1 ways Pick third object n -2 ways Etc. Pick n th object 1 way n ( n -1)( n -2)…1 = n !

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CMSC 250 r -Permutations Number of ways to arrange n different objects Pick first object n ways Pick second object n -1 ways Pick third object n -2 ways Etc. Pick
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/04/2011 for the course CMSC 250 taught by Professor Staff during the Spring '08 term at Maryland.

### Page1 / 28

slides08 - Counting and Probability CMSC 250 1 Counting q...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online