I have a dice with 1 on 1 side, 2 on 2 sides and 3 on 3 sides. I am rolling such dice…
- User
I have a dice with 1 on 1 side, 2 on 2 sides and 3 on 3 sides. I am rolling such dice until i meet sequence 1, 2, 3, 1, 2, 1, 2, 1, 2, 3, 1, 2. Can you write a transition matrix P like in Absorbing Markov chain?
Assistant
To create a transition matrix for this problem, we need to define the states of the Markov chain. In this case, the states represent the possible sequences we can encounter while rolling the dice.
Let's denote the target sequence as "T" and all other sequences as "O" (Other). We can then define the following states:
- State 0: T (Target sequence)
- State 1: O (Any other sequence)
The transition matrix P will have the following structure:
codeT O P = [ 1 0 ] [ p 1-p ]Here, the first row represents the transition probabilities from the target state (T) to itself (probability 1) and to the other state (O) (probability 0, since we stay in the target state once we reach it).
The second row represents the transition probabilities from the other state (O) to the target state (T) with probability p, and back to the other state (O) with probability 1-p.
To calculate the probability p, we need to consider the probability of rolling the target sequence on the next roll, given that we are in the other state (O).