Alastair Hewitt
Harvard Extension School
Cambridge, MA
Registered: Feb 2004
Posts: 35 |
I've been doing some experiments using my own Java program. There is probably a Wolfram code number for this one, but I couldn't tell you what it is (or if the Mathematica function will allow a loop?)
Below is the constructor I use for this machine. The rules in the previous post look correct and follow the format in the NKS book:
Machine tm = new Machine( // 3 states, 2 colors
new Rule[][] { // color, state
new Rule[] {
new Rule(0, 0, Rule.Dir.RIGHT), // 0, 0
new Rule(1, 0, Rule.Dir.RIGHT), // 0, 1
new Rule(1, 0, Rule.Dir.RIGHT) // 0, 2 },
new Rule[] {
new Rule(1, 1, Rule.Dir.RIGHT), // 1, 0
new Rule(1, 2, Rule.Dir.RIGHT), // 1, 1
new Rule(0, 2, Rule.Dir.RIGHT) // 1, 2 } } );
tm.init(0, new int[]{ 1 }, 499, 0, 1000, 500);
It starts from a blank (color 0) tape of length 1000. The initial condition is the color 1 in position 500 and the head in state 0 at position 499 (it always moves to the right).
Attached is the actual output generated for 500 loops.
Alastair Hewitt has attached this image:
Report this post to a moderator | IP: Logged
|