Suppose we have the following Markov chain with $S=\{a,b,c,d,e,f,g\}$

[![enter image description here](https://i.stack.imgur.com/pPhFt.png)](https://i.stack.imgur.com/pPhFt.png)

With the given transition matrix

$
P=\begin{pmatrix}
0 & 0 & 1 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 & 0 \\
1/6 & 1/6 & 0 & 1/6 & 1/2 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 & 0 \\
0 & 0 & 1/3 & 0 & 0 & 1/3 & 1/3 \\
0 & 0 & 0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 & 0 & 0 
\end{pmatrix}
$ 

The stationary distribution is given by 

$$\pi P=\pi$$

For our case we have

$$(x\_1,\ldots,x\_7)\cdot P=(x\_1,\ldots,x\_7)$$

with $\sum\_{i=1}^7x\_i=1 \ \ \ \text{(1.0)}$

That would mean we have a large system of linear equations with a constraint (1.0). That would be hard to calculate it. Is there an easy way to this.