Let S be the sequence of numbers. Initially, S=(1,2,3,4,5,6).
Let k be the length of the sequence S.
We are interested in the expected number of rolls to make the sequence empty.
Let Ek be the expected number of rolls to eliminate a sequence of length k, given that the numbers in the sequence are distinct and are all values that can be rolled on a fair 6-sided die. The initial sequence (1,2,3,4,5,6) meets these criteria.
Consider a sequence S=(s1,s2,…,s of length .
When we roll a die, let the outcome be .
The sequence is modified if (the first element) or (the last element).
Case 1: k=1.
The sequence is S=(s1). For example, if we had eliminated numbers until only (3) is left.
To eliminate s, we must roll .
The probability of rolling is , since the die is fair and is one of the numbers 1-6.
Let be the expected number of rolls to eliminate a sequence of length 1.
This is a geometric distribution with success probability .
So, .
This can also be written using a recurrence: . With (an empty sequence needs no rolls), this gives , so .
Case 2: k≥2.
The sequence is S=(s1,s.
Since the original sequence is , all numbers are distinct. Any subsequence of it, such as by removing elements from ends, will also consist of distinct numbers.
So, for , .
A roll causes an elimination if or .
The probability of rolling is . If this happens, the sequence becomes , which has length .
The probability of rolling is . If this happens, the sequence becomes , which has length .
Since , these are disjoint events.
So, the probability of an elimination occurring on any given roll is .
The probability of no elimination is . (i.e. rolling any of the other numbers).
Let Ek be the expected number of rolls to empty a sequence of length k.
If we roll the die once:
With probability 1/6, we roll s, the sequence becomes (length ). We need more rolls.
With probability , we roll , the sequence becomes (length ). We need more rolls.
With probability , the roll is neither nor . The sequence remains . We still need more rolls.
So, the recurrence relation for is:
.
.
.
.
.
Multiplying by 3, we get:
for .
We have E0=0 and E1=6.
Using the recurrence :
.
.
.
.
.
The initial sequence is (1,2,3,4,5,6), which has length k=6. So we need to find E.
The result is 21.
Alternative approach: Sum of expected times for each reduction step.
Let Nk be the number of rolls required to reduce a sequence of length k to length k−1.
The total number of rolls .
By linearity of expectation, .
For a sequence of length k≥2, say (s1,…,sk), the numbers and are distinct.
The probability of rolling or is .
So, the number of rolls to get such a "hit" follows a geometric distribution with success probability .
for .
When k=1, the sequence is (s1). The probability of rolling s1 is .
So, follows a geometric distribution with success probability .
.
Therefore, E[X]=E[N6]+E
.
.
Both methods yield the same result. The key condition that s1=sk for k and that are always rollable values is satisfied because the initial sequence consists of distinct numbers from 1 to 6, and any subsequence maintains this property for its (new) endpoints.
The final answer is 21.