I am a bit confused about the definition of limiting distribution in Markov chains.
My understanding is that it represents the behavior of the chain in-the-limit. That is, I start from the initial distribution $\mu_0(s)$ and repeat $\mu_1(s) = \mu_0(s) P$, $\mu_2(s) = \mu_1(s)P, \ldots$ and at some point the distribution will not change anymore. This seems also what this question/answer says.
However, all definitions I find say that the limiting distribution does not depend on the initial distribution. But I can easily make a non-irreducible chain with two communicating classes like the one below, where the limit will converge but depends on the initial distribution.
So, can the limiting distribution depend on the initial distribution? If not, how can I find it?
This answer shows a few methods and one is what I am already doing below, i.e., a simple loop to simulate the chain. But, if I run it I converge to different distributions depending on the initial one.
import numpy as np
np.set_printoptions(precision=3, suppress=True)
P = np.array([
[0.0, 0.5, 0.0, 0.5, 0.0],
[0.0, 0.0, 1.0, 0.0, 0.0],
[0.0, 0.5, 0.5, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.5, 0.5],
[0.0, 0.0, 0.0, 1.0, 0.0],
])
MU = [
np.array([0.3, 0.1, 0.2, 0.4, 0.0]),
np.array([1.0, 0., 0., 0., 0.0]),
np.random.rand(5),
]
for mu_t in MU:
mu_t /= mu_t.sum()
for _ in range(1000):
mu_t = np.dot(mu_t, P)
print(mu_t)
print(np.dot(mu_t, P))
print()
I know that an ergodic chain has only one unique limiting distribution and that my example is not ergodic, so I am considering the general case.