<!--===============================================-->
<!--  tmdiv3.xml                                   -->
<!--  The interpreter of the Turing machine        -->
<!--===============================================-->
<!-- Example of the program for the Turing machine -->
<!-- Check of divisibility on 3                    -->
<!--===============================================-->

<!DOCTYPE TM SYSTEM "tm.dtd">

<TM>

<Instruction CurrentState="A" CurrentSymbol="0" NextSymbol="0" NextState="A" Move="R">
<Instruction CurrentState="A" CurrentSymbol="1" NextSymbol="1" NextState="B" Move="R">
<Instruction CurrentState="A" CurrentSymbol="2" NextSymbol="2" NextState="C" Move="R">
<Instruction CurrentState="A" CurrentSymbol="3" NextSymbol="3" NextState="A" Move="R">
<Instruction CurrentState="A" CurrentSymbol="4" NextSymbol="4" NextState="B" Move="R">
<Instruction CurrentState="A" CurrentSymbol="5" NextSymbol="5" NextState="C" Move="R">
<Instruction CurrentState="A" CurrentSymbol="6" NextSymbol="6" NextState="A" Move="R">
<Instruction CurrentState="A" CurrentSymbol="7" NextSymbol="7" NextState="B" Move="R">
<Instruction CurrentState="A" CurrentSymbol="8" NextSymbol="8" NextState="C" Move="R">
<Instruction CurrentState="A" CurrentSymbol="9" NextSymbol="9" NextState="A" Move="R">
<Instruction CurrentState="A" CurrentSymbol="b" NextSymbol="r=0" NextState="Z" Move="R">
<Instruction CurrentState="B" CurrentSymbol="0" NextSymbol="0" NextState="B" Move="R">
<Instruction CurrentState="B" CurrentSymbol="1" NextSymbol="1" NextState="C" Move="R">
<Instruction CurrentState="B" CurrentSymbol="2" NextSymbol="2" NextState="A" Move="R">
<Instruction CurrentState="B" CurrentSymbol="3" NextSymbol="3" NextState="B" Move="R">
<Instruction CurrentState="B" CurrentSymbol="4" NextSymbol="4" NextState="C" Move="R">
<Instruction CurrentState="B" CurrentSymbol="5" NextSymbol="5" NextState="A" Move="R">
<Instruction CurrentState="B" CurrentSymbol="6" NextSymbol="6" NextState="B" Move="R">
<Instruction CurrentState="B" CurrentSymbol="7" NextSymbol="7" NextState="C" Move="R">
<Instruction CurrentState="B" CurrentSymbol="8" NextSymbol="8" NextState="A" Move="R">
<Instruction CurrentState="B" CurrentSymbol="9" NextSymbol="9" NextState="B" Move="R">
<Instruction CurrentState="B" CurrentSymbol="b" NextSymbol="r=1" NextState="Z" Move="R">
<Instruction CurrentState="C" CurrentSymbol="0" NextSymbol="0" NextState="C" Move="R">
<Instruction CurrentState="C" CurrentSymbol="1" NextSymbol="1" NextState="A" Move="R">
<Instruction CurrentState="C" CurrentSymbol="2" NextSymbol="2" NextState="B" Move="R">
<Instruction CurrentState="C" CurrentSymbol="3" NextSymbol="3" NextState="C" Move="R">
<Instruction CurrentState="C" CurrentSymbol="4" NextSymbol="4" NextState="A" Move="R">
<Instruction CurrentState="C" CurrentSymbol="5" NextSymbol="5" NextState="B" Move="R">
<Instruction CurrentState="C" CurrentSymbol="6" NextSymbol="6" NextState="C" Move="R">
<Instruction CurrentState="C" CurrentSymbol="7" NextSymbol="7" NextState="A" Move="R">
<Instruction CurrentState="C" CurrentSymbol="8" NextSymbol="8" NextState="B" Move="R">
<Instruction CurrentState="C" CurrentSymbol="9" NextSymbol="9" NextState="C" Move="R">
<Instruction CurrentState="C" CurrentSymbol="b" NextSymbol="r=2" NextState="Z" Move="R">
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>
</Instruction>

<State>A</State>

<TapeLeft>
<Node><Square>b</Square>
<Node><Square>b</Square>
<End/>
</Node>
</Node>
</TapeLeft>

<Symbol>0</Symbol>

<TapeRight>
<Node><Square>9</Square>
<Node><Square>8</Square>
<Node><Square>7</Square>
<Node><Square>6</Square>
<Node><Square>5</Square>
<Node><Square>4</Square>
<Node><Square>3</Square>
<Node><Square>2</Square>
<Node><Square>1</Square>
<Node><Square>0</Square>
<End/>
</Node>
</Node>
</Node>
</Node>
</Node>
</Node>
</Node>
</Node>
</Node>
</Node>
</TapeRight>

</TM>