Turing Machine

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Implement a turing machine. After execution, print all of the infinite tape cells which were modified.

Start at the left most state. Halt when at state #.

A number means write that number to the tape. An arrow means move that direction on the tape. A letter means goto that state.

Example execution:
<pre>
A B
0 : 1&gt;B 1&lt;A
1 : 1&lt;B 1&gt;#
</pre>

State, tape, action:
A, (0), 1&gt;B
B, 1(0), 1&lt;A
A, (1)1, 1&lt;B
B, (0)11, 1&lt;A
A, (0)111, 1&gt;B
B, 1(1)11, 1&gt;#
#, 1111

<a href="http://en.wikipedia.org/wiki/Turing_Machine">http://en.wikipedia.org/wiki/Turing_Machine</a>

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

     A   B   C   D 
0 : 1>B 1<A 1># 1>D
1 : 1<B 0<C 1<D 0>A

Sample output:

10111111111111

Sample input:_

     A   B   C   D   E   F  
0 : 2>C 0>D 1<F 1<F 2>C 2>A
1 : 0>F 1<B 1>A 0>F 2>A 2<B
2 : 0<F 0<B 0># 2<C 0<B 0<D

Sample output:

2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020220202020202202020202022121212120202212020202022120202020220202020202022121212001

Sample input:_

     A   B   C   D 
0 : 2<D 1>D 2>C 0>C
1 : 5>C 3>B 2>D 0<D
2 : 1<C 0<C 1>A 1<B
3 : 6>A 2>D 0>C 6<D
4 : 3<C 3># 2>D 0<B
5 : 4<A 6<A 5>A 0>D
6 : 5<A 5<C 6<C 4<D

Sample output:

02155202152052021002222022255520222520215520221522220225552052025202215202520215210222100222565221001521555555222152155555202521022220210012220100215221502100102220215222152022221523333331244536126100021641021021451245124441024441000102

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1flagitious740.33022009/11/01 14:35:350B / 26B / 44B
2hide24740.29962009/11/13 12:18:490B / 26B / 44B
3shinh750.34552009/11/01 09:46:440B / 27B / 44B
4ksk820.30132009/11/01 09:08:490B / 24B / 53B
5murky-satyr890.34462009/11/01 14:34:070B / 32B / 53B

Python _

RankUserSizeTimeDateStatistics
1hallvabo1360.44652009/11/13 10:04:010B / 75B / 57B
2irie1380.40342009/11/11 16:42:070B / 82B / 47B
3_1380.43172009/11/13 18:30:380B / ?B / ?B
4kotauchi3420.39442009/11/11 18:09:3015B / 170B / 121B
5hallvabo1310.38482010/10/25 06:41:560B / 66B / 59B
6kotauchi3200.65482009/11/14 00:46:4314B / 154B / 117B

Arc _

RankUserSizeTimeDateStatistics
1youz13912.53332009/11/06 12:41:450B / 70B / 55B
2murky-satyr14712.53832009/10/31 22:00:360B / 78B / 52B

JavaScript _

RankUserSizeTimeDateStatistics
1murky-satyr1271.33162009/10/31 23:15:210B / 55B / 72B
2nn1331.29902009/11/01 12:00:110B / 67B / 64B
3murky-satyr1250.14052009/11/28 22:21:350B / 53B / 72B
4nn1261.29882009/11/14 01:26:080B / 54B / 72B

C _

RankUserSizeTimeDateStatistics
151b1230.03302009/11/01 22:21:590B / 61B / 62B
2mazun1470.06122009/11/06 16:50:050B / 74B / 73B
3inaniwa1630.11882009/11/06 22:09:530B / 77B / 85B
4inaniwa1610.00132009/11/28 19:36:590B / 77B / 83B

D _

RankUserSizeTimeDateStatistics
151b1640.02452009/11/03 18:16:440B / 91B / 71B

Haskell _

RankUserSizeTimeDateStatistics
1rst761681.32092009/11/12 23:25:070B / 99B / 55B
2notogawa1781.21032009/11/12 22:42:230B / 108B / 60B
3rst761600.35822009/11/20 23:37:510B / 93B / 53B

AWK _

RankUserSizeTimeDateStatistics
1nn1260.83002009/11/01 11:35:320B / 69B / 55B

Postscript _

RankUserSizeTimeDateStatistics
1yshl(bin)1231.30052009/11/01 22:57:3258B / 43B / 21B
2yshl2401.19282009/11/01 22:59:420B / 178B / 18B

z80 _

RankUserSizeTimeDateStatistics
1kodera450.63352009/11/05 00:41:5725B / 9B / 6B

goruby _

RankUserSizeTimeDateStatistics
1murky-satyr801.30912009/10/31 23:45:420B / 31B / 42B

Groovy _

RankUserSizeTimeDateStatistics
1murky-satyr1333.84352009/11/29 00:31:500B / 67B / 62B
2nn1873.88842009/11/20 07:31:420B / 92B / 86B

Language Ranking_

RankLangUserSizeScore
1z80kodera4510000
2Rubyflagitious746081
3gorubymurky-satyr805625
4C51b1233658
5Postscriptyshl(bin)1233658
6JavaScriptmurky-satyr1253600
7AWKnn1263571
8Pythonhallvabo1313435
9Groovymurky-satyr1333383
10Arcyouz1393237
11Haskellrst761602812
12D51b1642743

return to the top page