Recently, in my computer science class, we implemented a Markov Chain in Python to generate the probability of a certain word appearing after another. Syntactically, it's easy enough to understand. However, my issues arise when trying to understand it in mathematical notation.
I have constructed a Markov Chain where $$p_{1,1}=\frac13$$ $$p_{1,2}=\frac23$$ $$p_{2,1}=1$$$$p_{2,2}=0$$
I also have that $v_0=(1,0)$. From this, I'm trying to calculate the probability of being in state 1 after exactly 2 steps. My first attempt was to look at the Law Of Probability for Markov Chains, but I'm not quite aware of the explicit arguments I would input for this. Drawing out the Markov Chain is no issue; it's merely a matter of figuring out probabilities.
First, I tried to calculate the probability of being in state 1; that is,
$$P(X_t=1) \sum_{i}^{} P(X_t = 1\mid X_{t-1}=i)P(X_{t-1}=i)$$
However, I am unsure of the explicit arguments I would pass in.
Where you wrote $v_0=(1,0)$, I'm guessing you meant the probabilities of being initially in states $1$ and $2$ are respectively $1$ and $0$, i.e. you know you're initially in state $1$.
To be in state $1$ after two steps means either you stayed in state $1$ throughout the process or you went to state $2$ at the first step and returned to state $1$ at the second step. $$ \Pr( 1 \mapsto 1 \mapsto 1) + \Pr(1\mapsto 2\mapsto 1) = \left(\frac 1 3\cdot\frac 1 3\right) + \left(\frac 2 3 \cdot 1\right) = \frac 1 9 + \frac 2 3 = \frac 7 9. $$