Assuming you have 5 fair dice and up to 3 re-roll attempts (during which you can re-roll any dice, as per standard Yahtzee rules) what is the probability of succesfully rolling a "Small Straight" (aka 1-2-3-4, 2-3-4-5, or 3-4-5-6)? Also, what is the probability of rolling a "Large Straight" (aka 1-2-3-4-5 or 2-3-4-5-6)?
In either case, assume the following rules for keeping and re-rolling dice:
- Keep exactly one of each 2, 3, 4, and 5 result
- Only keep a 1 or 6 result if it is already part of a Small Straight or Large Straight
Unfortunately I'm quite unfamiliar with even basic probability problems let alone something with this level of complexity, and online research hasn't helped much. I'm much more comfortable backing into probabilities by simulating roll outcomes like this in Python, though I've hit a wall with those efforts as well for straights in particular, even with these defined rules. Would deeply appreciate some help.
Thanks!
(I have edited the answer)
Large Straight
Let me see if I got the strategy rules right. Does the following simulation code (in Python) model the situation correctly?
The output is around 0.24.
Are you familiar with Markov chains? We can construct a Markov chain with states all the combinations of the keeper-numbers $\{1,2,3,4,5,6\}$ at most of length 4 and having 1 or 6 only if 2,3,4 and 3,4,5 are present respectively. We also have one absorbing state 'LS' that means we have gotten a large straight. We can calculate the transition probabilities by brute force by considering all possible rolls of the not kept dice (there are 5 - length of the state of them) and seeing what additional keepers we got or did we in fact get a LS. I wrote the following code in SageMath, since it handles matrices and rational numbers without any efforts.
You can run Sage code online: Sage Cell Server
The output is $\frac{295073737}{1224440064} = 0.24098667274578822$.
I'm not sure the grouping together of states, that I mentioned in my answer before editing, can be done anymore, since now the transitions to the states containing 1 or 6 depend on what we already have. At least not for all same-size-groups. Anyhow, we have a $19\times 19$-matrix, so it is doable.
Small Straight
We can use the previous Markov chain also here:
Answer: $\frac{2966131613}{4897760256} = 0.605609800799527$
For simulation: