Is there a way to calculate the expected number of unique states visited in a Markov chain after n steps?
For example, say I have 4 states {A,B,C,D} with transition probabilities 1/4 across the board; i.e., the transition matrix is uniformly 1/4. The initial condition is {0,1,0,0}. What is the expected number of states visited after 3 steps?
This is a simplified example. The problem I'm working on is much more complicated (many more states and steps, and heterogeneity in transition probabilities). So I'm looking for a general solution.
I thought that I could do something like this:
E[unique states visited] = P(visited A) + P(visited B) + P(visited C) + P(visited D)
= 1-P(haven't visited A) + 1-P(haven't visited B) + 1-P(haven't visited C) + 1-P(haven't visited D)
= 1-(1-P(A,step 1))(1-P(A,step 2))(1-P(A,step 3)) + ...
But this gives me the wrong answer - I'm guessing because P(A,step 1) is not independent of P(A,step 2), etc.
For this problem in particular, at least, we can find the solution.
Let $p(k)$ be the probability that you transition to a state you haven't visited yet, given that there are $k$ states left that you haven't visited yet.
In the case of this problem, $p(k) = \frac{k}{4}$.
For the sake of choosing a convention, I'll suppose that you are considered to have already visited the state you start on.
Let $E(k, t)$ be the expected number of states you will have visited given that there are $k$ states that you haven't visited yet, and you have $t$ transitions remaining. The base case is that $E(k, 0) = 4-k$.
Now, let's consider the recursive case. If your current number of unvisited states is $k$, you will with probability $\frac{k}{4}$ transition to a new state, so that $k\mapsto k-1$. Otherwise, with probability $1-\frac{k}{4}$, you will visit a state that you have already visited.
So $E(k, t) = \frac{k}{4} E(k-1, t-1) + \frac{4-k}{4} E(k, t-1).\qquad(t>0)$
If you solve this recurrence relation for $k=3$ initial unvisited states and $t=3$ steps, you get $175/64 \approx 2.73$ as the expected number of states visited. If you consider the intial state to be unvisited as well ($k=4$), the number drops to $148/64 \approx 2.3125$.
For Markov models with more complicated probabilities, I can only think of a brute-force solution: starting from a Markov chain with $n$ states, create a new Markov chain where each new state represents a subset of states that you've visited so far, along with the state you're currently on. You can compute the transition probabilities of this new chain from the probabilities of the old chain; then you can compute the expected number of visited states in the old chain from the expected final state of this new chain.