Busy Beaver

Heiner Marxen has several pages devoted to the study of the Busy Beaver. He mostly studies 2-symbol TMs that start with an infinite string of 0s on the tape (we can think of the 0 as a blank character and the tape as two-way infinite instead of one-way infinite). In particular, he has an awk script that simulates a Turing machine on an infinite tape composed completely of 0s. He and many others are interested in finding upper and lower bounds on Sigma(n) and S(n). For example, consider the following Turing machine with HALT state H (the HALT state does not count as a state in Sigma or S):

State on
0
on
1
on 0 on 1
Print Move Goto Print Move Goto
A B1L C1R 1 left B 1 right C
B C1L B1L 1 left C 1 left B
C D1L E0R 1 left D 0 right E
D A1R D1R 1 right A 1 right D
E H1L A0R 1 left H 0 right A
Transition table
This Turing machine generates 4098 ones in 47176870 steps when started on an infinite tape filled with 0s. One can verify this using the awk script. (You should download this script and save it in a file called hmMMsimu.awk. Make sure the permissions are set to 755.) Hand the awk script the properly formatted input file:
    gohalt 1
    C	Current 5-state BB champion for ones and steps
    5T B1L C1R C1L B1L D1L E0R A1R D1R H1L A0R : 4098 47176870
    T TM #1 from MaBu90-Paper
    M	400
    pref	sim
    mtype 3
    mmtyp 3
    r	1
    H	1
    mac	0
    E	2
    sympr	
    HM	1
    bnspeed	1
using the command
     
    $ awk -f hmMMsimu.awk 5-state.in > 5-state.html
Note that the important line of the input is:
    5T B1L C1R C1L B1L D1L E0R A1R D1R H1L A0R : 4098 47176870
where 5T is constant (it just tells the parser we've reached a transition function) and the transition function is given by listing the transition for State A on a 0, then State A on a 1, then State B on a 0, and so forth. The colon is just a comment. This generates HTML (which is sent to STDOUT but which we redirect to the file 5-state.html). Notice that if we change the input to encode a Turing machine that loops forever
    gohalt 1
    C	This Turing machine never halts.
    5T A1L H1L
    T A looping machine
    M	400
    pref	sim
    mtype 3
    mmtyp 3
    r	1
    H	1
    mac	0
    E	2
    sympr	
    HM	1
    bnspeed	1
that Marxen's program is smart enough to detect it. Here's the output. Check out the line giving the current run state:
     
    Run state:   loop/gtConfig

Currently, we know that Sigma(3)=6 and S(3)=21. You can find descriptions of these machines on the web, but I want you to come up with them on your own. Create these machine(s) and use the AWK script to test them out. When turning in your homework, give me a pointer to a webpage containing the HTML output from the AWK script. For example, if the best you can do is the LOOP Turing machine over 3 states, you'd send me a link like http://www.cs.williams.edu/~heeringa/cs361/bb/loop.html. Do not turn in a print out of the HTML. If you do not have a CS account or do not know how to make a web page, come see me.

As extra credit, try to match the upper bounds for Sigma(4)=13 and S(4)=107. How about Sigma(5)? It is known to be at least 4098. Can you do better?