So, there's a monkey called Flo sitting in front of its laptop writing Shakespeare. It has two states of mind, inspired and writers block.
When inspired, it'll type the letter $a$ with a probability $p_{ai}=\frac{1}{2}$ and the letter $b$ with probability $p_{bi}=\frac{1}{2}$.
When in writers block, it’ll just type $b$, so $p_{aw}=0$ and $p_{bw}=1$.
After typing a letter, its state of mind changes independently of its previous state of mind, but depending on the letter typed as follows:
If the letter typed was $a$, it will go into inspired with probability $p_{i|a}=\frac{1}{3}$ and in writers block with probability $p_{w|a}=\frac{2}{3}$;
if the letter typed was $b$, it’ll go into inspired with probability $p_{i|b}=\frac{2}{3}$ and in writers block with probability $p_{w|b}=\frac{1}{3}.$
I have calculated the transition probabilities of getting to each letter from each letter.
$P[X(n+1)=a|X(n) = a] = \frac{1}{6}$, $P[X(n+1)=b|X(n) = a] = \frac{5}{6}$, $P[X(n+1)=a|X(n) = b] = \frac{1}{3}$, $P[X(n+1)=b|X(n) = b] = \frac{2}{3}$.
(I think these are correct)
A question I have been given is to find the probability Flo writes $\{abbabaabab\}$ in the first 10 keystrokes if it starts in the inspired state.
I have 2 streams of thought for answering this question, and I'm not sure which is correct or if any of them are correct.
Thought 1: Just multiply all the transition probabilities to get $(\frac{1}{2})(\frac{5}{6})(\frac{2}{3})(\frac{1}{3})(\frac{5}{6})(\frac{1}{3})(\frac{1}{6})(\frac{5}{6})(\frac{1}{3})(\frac{5}{6})\approx 0.0009929$
In thought 2, I multiply all the probabilities together, except for when Flo needs to type the letter $a$ next, where I leave out the part of the path where it is in 'Writers Block' state, as its not possible to go from writers block to typeing $a$.
Any help or feedback with my thinking is so so appreciated!
