I have the following recurrence system:
$$\pi_0 =.25\pi_0 + .25q\pi_1+.5q\pi_2 + q\pi_3 $$ $$\pi_1 =.25\pi_0 + .25q\pi_1+.5\pi_2 + p\pi_3 $$ $$\pi_2 =.25\pi_0 + .25p\pi_1+.5p\pi_2 + 0 $$ $$\pi_3 =.25\pi_0 + .25p\pi_1+0 + 0 $$ $$1 =\pi_0 + \pi_1+\pi_2 + \pi_3 $$
I tried the following to solve this system:
Rsolve[{a[0] == 0.25*a[0] + 0.25 *a[1] *q + 0.5* a[2] *q + a[3] *q, a[1] == 0.25* a[0] + 0.5 *a[2] + p *a[3] + 0.25* a[1] *q, a[2] == .25 *a[0] + 0.25* p *a[1] + 0.5* p *a[2], a[3] = 0.25* a[0] + 0.25*p *a[1], 1 == a[0] + a[1] + a[2] + a[3]}, a, 4]
Which gives the following error:
Set::write: Tag Real in 0.4[3] is Protected.
and I also tried the following:
Solve[{0.25 pi0 + 0.25 pi1 q + 0.5 pi2 q + pi3 q, 0.25 pi0 + 0.5 pi2 + p pi3 + 0.25 pi1 q, 0.25 pi0 + 0.25 p pi1 + 0.5 p pi2, 0.25 pi0 + 0.25 p pi1, pi0 + pi1 + pi2 + pi3} == {pi0, pi1, pi2, pi3, 1}, {pi0, pi1, pi2, pi3}]
but it gave me an empty list:
{}
I substituted p and q with .5 and .5 respectively. Then, I solved the system using MATLAB, and it gave me a solution for $\pi_{i, i={0,..,3}}$ which equals to
0.2951
0.3274
0.2111
0.1594
So, the system does have a solution. But I'm not able to find the solution using Mathematica.
I also tried to convert this into linear system as the following:
$$0 =-.75\pi_0 + .25q\pi_1+.5q\pi_2 + q\pi_3 $$ $$0 =.25\pi_0 + (.25q - 1)\pi_1+.5\pi_2 + p\pi_3 $$ $$0 =.25\pi_0 + .25p\pi_1+(.5p-1)\pi_2 + 0 $$ $$0 =.25\pi_0 + .25p\pi_1+0 -\pi_3 $$ $$1 =\pi_0 + \pi_1+\pi_2 + \pi_3 $$
and then using this code
Solve[{-.75 pi0 + 0.25 pi1 q + 0.5 pi2 q + pi3 q,
0.25 pi0 + 0.5 pi2 + p pi3 + (1 - 0.25 q) pi1 q,
0.25 pi0 + 0.25 p pi1 + (0.5 p - 1) pi2,
0.25 pi0 + 0.25 p pi1 - pi3, pi0 + pi1 + pi2 + pi3} == {0, 0, 0, 0,
1}, {pi0, pi1, pi2, pi3}]
but it also gave me an empty list
{}
Reduce[{-3 p0+p1 q+2p2 q+4p3 q==0,p0+2p2+4p p3+(4-q)p1 q==0,p0+p p1+(2p-4)p2==0,p0+p p1-4p3==0,p0+p1+p2+p3==1},{p0,p1,p2,p3}]
claims that p is any root of a cubic, a condition must be true, q is any root of an 11th degree polynomial and then there are the four values for p0,p1,p2,p3 in terms of p and q. You might try finding those 3x11 pairs of roots one at a time, verify the condition and then verify which of those 33 p0,p1,p2,p3 do satisfy your original problem $\endgroup$