Animation
| > | Q:={q0,q1,q2,q3}:
Sig:={a,b,c}: Gam:=Sig union {\Delta}: F:={q2,q3}: delta:=table(): delta[(q0,a)]:=[q0,b,R]: delta[(q0,b)]:=[q1,a,U]: ## Move up delta[(q1,a)]:=[q1,b,U]: ## delta[(q1,b)]:=[q2,a,L]: ## delta[(q2,a)]:=[q2,b,L]: ## delta[(q2,b)]:=[q3,c,L]: ## delta[(q3,a)]:=[q2,b,L]: ## delta[(q3,b)]:=[q1,c,L]: ## delta[(q0,\Delta)]:=[q1,\Delta,L]: tm:=TM2D(Q,Sig,Gam,op(delta),q0,\Delta,F,Q minus F); |
| (13.6.1) |
| > | ## Randomly generated tape
xRange:=20: yRange:=20: noSymbols:=nops(Sig): tape:=table(): for i from -floor(xRange/2) to floor(xRange/2) do for j from -floor(yRange/2) to floor(yRange/2) do tmp:=rand(noSymbols)()+1: tape[(i,j)]:=op(tmp,Sig): od: od: |
| > | animateTM(tm,tape,[3,2]); |
![]() |
| > | animateTM(tm,tape,[2,1]); |
![]() |
| > |