Universal Turing machine: Difference between revisions
m
→{{header|Wren}}: Minor tidy
Cyril Nocton (talk | contribs) (→APL) |
m (→{{header|Wren}}: Minor tidy) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 761:
=={{header|APL}}==
===
{{works with|Dyalog APL}}
<syntaxhighlight lang="apl">:Namespace Turing
Line 845:
3_FiveStateBeaver: 10100100100100100100100100100100... (total length: 12289)</pre>
===
{{works with|Dyalog APL}}
<syntaxhighlight lang="lisp">
Line 870 ⟶ 872:
I←I+I=0
→L
E:R←T I
∇
</syntaxhighlight>
Line 876 ⟶ 879:
<pre>
RUN ∆INCREMENTER 'QA' 'QB' '111' 'B'
1111 4
RUN ∆BEAVER 'QA' 'QD' '0' '0'
111111 4
</pre>
=={{header|AutoHotkey}}==
Line 4,527 ⟶ 4,511:
=={{header|Fōrmulæ}}==
{{FormulaeEntry|page=https://formulae.org/?script=examples/Universal_Turing_machine}}
'''Solution'''
[[File:Fōrmulæ - Universal Turing machine 01.png]]
'''Test case 1. Simple incrementer'''
[[File:Fōrmulæ - Universal Turing machine 02.png]]
[[File:Fōrmulæ - Universal Turing machine 03.png]]
'''Test case 2. One-state busy beaver game'''
[[File:Fōrmulæ - Universal Turing machine 04.png]]
[[File:Fōrmulæ - Universal Turing machine 05.png]]
'''Test case 3. Two-state busy beaver game'''
[[File:Fōrmulæ - Universal Turing machine 06.png]]
[[File:Fōrmulæ - Universal Turing machine 07.png]]
'''Test case 4. Three-state busy beaver game'''
[[File:Fōrmulæ - Universal Turing machine 08.png]]
[[File:Fōrmulæ - Universal Turing machine 09.png]]
'''Test case 5. Four-state busy beaver game'''
[[File:Fōrmulæ - Universal Turing machine 10.png]]
[[File:Fōrmulæ - Universal Turing machine 11.png]]
'''Test case 6. (Probable) Five-state busy beaver game'''
In this case, the length of the tape is returned, and not the tape itself.
This machine will run for more than 47 millions steps.
[[File:Fōrmulæ - Universal Turing machine 12.png]]
[[File:Fōrmulæ - Universal Turing machine 13.png]]
=={{header|Go}}==
Line 12,295 ⟶ 12,319:
{{libheader|Wren-dynamic}}
{{libheader|Wren-fmt}}
<syntaxhighlight lang="
import "./fmt" for Fmt
var Dir = Enum.create("Dir", ["LEFT", "RIGHT", "STAY"])
|