Universal Turing machine: Difference between revisions

Content added Content deleted
Line 2,390: Line 2,390:
Tape is split into two stacks (aka lists).
Tape is split into two stacks (aka lists).


<pre>T = reverse (lStack) . rStack ; rStack (0) is the scanned symbol.</pre>
<pre>T = reverse(lStack) . rStack ; rStack is the scanned symbol.
0</pre>


The simpler the better.
The simpler the better.
Line 2,421: Line 2,422:
(c . (0 = 1 % < b @ 1 = % halt @))))</lang>
(c . (0 = 1 % < b @ 1 = % halt @))))</lang>


4. Execution
4. Invocation


<pre>(run +incrementer+ '(1 1 1) 'q0 'qf 'b)
<pre>(run +incrementer+ '(1 1 1) 'q0 'qf 'b)
Line 2,427: Line 2,428:


{{out}}
{{out}}
<pre>M = (HALT, 111.111)
<pre>M = (QF, 111.1)
M = (QF, 111.1)</pre>
M = (HALT, 111.111)</pre>


That's all Folks !
That's all Folks !