We have a fair 6-sided dice and we keep tossing. We define:
Pattern A: sum of two adjacent tosses is $i$;
Pattern B: two adjacent tosses are both 1.
Now how to get
the expected tosses for Pattern A appears;
the expected tosses for Pattern B appears;
the expected tosses for Pattern A or B appears;
the probability of A appears before B.
For $i=12$, there is only choice $6+6$ for Pattern A, so it's quite easy:
$E[T(A)]=E[T(B)]=42, E[T(A \text{ or } B)]=21, P[A\text{ before }B]=\frac{1}{2}$,
For $i=8$, the possibilities for Pattern A ($(2,6),(3,5),(4,4),(5,3),(6,2)$) are exclusive with Pattern B. So it's also easy to get: $E[T(A)]=\frac{42}{5}, E[T(B)]=42, E[T(A \text{ or } B)]=7, P[A\text{ before }B]=\frac{5}{6}$.
But for $i=7$, because possibilities of Pattern A ($(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)$) are no more mutually exclusive with Pattern B. I found it difficult to get:
- the expected tosses for Pattern A or B first appears;
- the probability of A appears before B.
In the original post, the answers for $i=7$ could be:
- $E[T(A)]=7$;
- $E[T(B)]=42$;
- $E[T(A \text{ or } B)]=\frac{287}{46}$;
- $P[A\text{ before } B]=\frac{241}{276}$.
But without any process. So could you please find general solutions to problem 3. and 4. for such complicated cases, like $i=7$. Any clue or hint will be appreciated. Thanks a lot!
Since you gave it the tag "markov-chains" it seems like you already know the most important thing. This is a finite-state Markove chain. Let us consider the example $i=7$. We have $9$ states:
The last two states are absorbing, meaning that once we enter such a state, we never leave. It is a simple matter to construct the transition matrix. If you look at the Wikipedia article on absorbing Markov chains, you will see how to solve both questions $3$ and $4.$ Number $3$ is solved by "Expected Number of Steps" and number $4$ by "Absorbing Probabilities."