l01_counting

l01_counting - Principles of Counting Reading: Ross, Ch 1.,...

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

View Full Document Right Arrow Icon
01/21/2009 CS206 - Intro. to Discrete Structures II 1 Principles of Counting Reading: Ross, Ch 1., Sec. 1. Rosen, Ch 5., Sec. 1 Adapted from Detlef Ronneburger Monday, January 26, 2009
Background image of page 1

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

View Full DocumentRight Arrow Icon
01/21/2009 CS206 - Intro. to Discrete Structures II 2 Counting Poker Hands • Poker is played with 52 cards • 13 faces (2,3,4,5,6,7,8,9,10,J,Q,K,A) in four suits ( ♠♦♥♣ ) - spades( ), hearts( ), diamonds( ) and clubs( ) • poker hand consists of five cards • How many different possibilities are there for good poker hands? Monday, January 26, 2009
Background image of page 2
01/21/2009 CS206 - Intro. to Discrete Structures II 3 Good Poker hands Royal Flush : A,K,Q,J,10, all in one suit How many? • 4 - one for each of four suits Straight Flush : five consecutive cards in one suit How many? 4 ¢ 9 = 36 – for each suit, one starting at each of 2,3,4,5,6,7,8,9,10 (note: includes Royal Flush) Four of a Kind : four cards of the same face (in all suits) and one additional How Many? 13 ¢ (52-4) = 624 Monday, January 26, 2009
Background image of page 3

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

View Full DocumentRight Arrow Icon
01/21/2009 CS206 - Intro. to Discrete Structures II 4 Good Poker Hands (cont’d) Full House : three cards of one face and two of another. How many? ( 4 ¢ 13 ) ¢ ( 6 ¢ 12 ) = 3744 4 combinations of picking 3 suits out of 4 13 faces 6 combinations of picking 2 suits out of 4 remaining 12 faces Monday, January 26, 2009
Background image of page 4
01/21/2009 CS206 - Intro. to Discrete Structures II 5 Good Poker Hands (cont’d) • How many poker hands Full House or better? 3744 + 624 + 36 = 4404 Note: Royal Flush is (the way we defined it) a case of a Straight Flush! So 3744 + 624 + 36 + 4 would be wrong! Monday, January 26, 2009
Background image of page 5

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

View Full DocumentRight Arrow Icon
01/21/2009 CS206 - Intro. to Discrete Structures II 6 Product Rule • Basic counting principle I : If there are n 1 possible outcomes for doing task t 1 and n 2 possible outcomes for doing task t 2 , then there are n 1 ¢ n 2 possible outcomes of doing t 1 AND t 2 . Monday, January 26, 2009
Background image of page 6
CS206 - Intro. to Discrete Structures II 7 Example of Product Rule Number of Straight Flushes (consecutive cards in one suit) t 1 – pick a suit t 2 – pick five consecutive cards in suit t 1 t 1 2 { , , , } = A 1 , |A 1 | = 4 t 2 2 { (2,3,4,5,6), (3,4,5,6,7), …, (9,J,Q,K,A)} = A 2 , |A 2 | = 9
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/24/2011 for the course CS 206 taught by Professor Fredman during the Spring '08 term at Rutgers.

Page1 / 26

l01_counting - Principles of Counting Reading: Ross, Ch 1.,...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online