# How to calculate average steps needed for state change in a state machine

Left: 1/2 jump to Middle, 1/2 jump to self

Middle: 1/3 jump to Right, 1/3 jump to Left, 1/3 jump to self

How many steps on average is needed from Left to Right?

-

## 1 Answer

Hint: Let $a$ be the mean number of steps required to get from Left to Right. Let $b$ be the mean number of steps required to get from Middle to Right.

We have $$a=1+\frac{1}{2}a+\frac{1}{2}b,$$ and $$b=1+\frac{1}{3}a+\frac{1}{3}b.$$

-