Post Reply 
HHC 2015 RPN programming Contest is now open
10-14-2015, 05:29 PM
Post: #97
RE: HHC 2015 RPN programming Contest is now open
In analyzing Werner’s code (which is quite brilliant, in my opinion), I decided that I needed a list of every possible combination of die values that could fall out of the Yahtzee cup. With five dice, each having six possible values, there are 6^5 or 7776 possible sets. But the order does not matter (e.g., 1-2-3-4-5 is the same as 5-4-3-2-1 is the same as 3-1-5-4-2, etc.), so there are a lot fewer unique combinations that we need to worry about. Through a laborious and most likely inefficient process (listing and counting them in excel), I determined that there seem to be just 252 unique combinations, as follows:

  1. All five dice the same single value – 6 possible groups (five ones, five twos, etc.)
  2. Four dice of one value, one of another value – 30 groups
  3. Three dice of one value, two of another value – 30 groups
  4. Three dice of one value, one of another value, and one of a third value – 60 groups
  5. Two dice of one value, two of another value, and one of a third value – 60 groups
  6. Two dice of one value, one of another value, one of a third value, and one of a fourth value– 60 groups
  7. All five dice have different values – 6 groups (1-2-3-4-5, 1-2-3-4-6, 1-2-3-5-6, 1-2-4-5-6, 1-3-4-5-6 and 2-3-4-5-6)


6 + 30 + 30 + 60 + 60 + 60 + 6 = 252

Can anyone confirm the above? (Or deny, I may be wrong and won’t mind being corrected.) Figuring items 1 and 7 is trivial, even for me. I think items 2 and 3 are figured simply as 6 ways to pick the first number times 5 ways to pick the second equals 30. I am a little murkier on how to figure items 4, 5 and 6. For items 4 and 5, my inclination would be to start with 6 ways to pick the first number times 5 ways to pick the second times 4 ways to pick the third equals 120. But that would include some duplications, I think, as for example, 3 sixes, 1 five and 1 four is the same as 3 sixes, 1 four and 1 five. Seems like each such combination would appear twice, so I would divide the 120 by 2 to get 60. For item 6, I’d start 6 x 5 x 4 x 3 equals 360, then divide by 3! to account for the repeats among the three single values, yielding 360/6 which equals 60. But I’m not completely sure about those methods. Assuming I have the figures correct, is there a simple method to calculate that there are 252 unique combinations among the 7776 non-unique ones? (My exposure to calculations involving probabilities and statistics is pretty limited, so please be gentle.)

Dave - My mind is going - I can feel it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HHC 2015 RPN programming Contest is now open - Jeff O. - 10-14-2015 05:29 PM



User(s) browsing this thread: 1 Guest(s)