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

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

View Full Document Right Arrow Icon
1 CMSC 250 Counting and Probability
Background image of page 1

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

View Full DocumentRight Arrow Icon
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 )
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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?
Background image of page 4
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
Background image of page 5

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

View Full DocumentRight Arrow Icon
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)
Background image of page 6
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 !
Background image of page 7

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

View Full DocumentRight Arrow Icon
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
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online