States are 6-tuples (x,y,s,t,u,v) of integers. The start state is (a,b,0,1,1,0) with a,b > 0. A transition is allowed when y > 0: let q = floor(x / y) and rem(x,y) = x - q*y. Then
(x,y,s,t,u,v) --> (y, rem(x,y), u - q*s, v - q*t, s, t).
Termination is when y =
Show more…