Presentation is loading. Please wait.

Presentation is loading. Please wait.

04/16/13 Combinations and State Diagrams Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1.

Similar presentations


Presentation on theme: "04/16/13 Combinations and State Diagrams Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1."— Presentation transcript:

1 04/16/13 Combinations and State Diagrams Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1

2 HW 9 2 Do not use the quadratic formula! Review set constructor notation from earlier chapter. Relations between sets that we’ve covered include equals, subset, proper subset, disjoint.

3 Today’s class Counting and combinations State diagrams (mainly applied to counting) 3

4 Combinations/counting 4

5 5

6 6

7 7

8 Mixed combination problems Examples Suppose a slot machine has 6 dials which can each be set to {bell, cherry, 777, blank1, blank2} – How many possible (ordered) combinations are there? – How many ways are there to get exactly three cherries? – How many ways are there to get at least three cherries? 8

9 Basic operations Selection that reduces choices Selection that does not reduce choices Permutation 9

10 10

11 Dice games When rolling five dice at once, which is more likely, three-of-a-kind or a large-straight? 11

12 Binomial theorem 12

13 Binomial theorem 13

14 State diagrams 14 state action transition

15 State diagrams and counting Suppose you have 3 red pills and 2 blue pills in a pouch. You draw three of them from at random. What is the probability that you have exactly one blue pill? 15

16 Dice games 16

17 Challenge problem If Joe is going for “Yahtzee” (five of a kind with five dice), what is the chance that he will get it within two re-rolls? 17

18 Suppose we roll a two-sided die until the sum is a non-zero multiple of 3. What is the chance of getting there in three or fewer rolls? 18

19 19

20 Things to remember 20

21 Next class More finite state machines 21


Download ppt "04/16/13 Combinations and State Diagrams Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1."

Similar presentations


Ads by Google