Explore the Singly Tucked tie-tying grammar

The grammar that encodes the 24,882 singly-tucked tie-knots enumerated by Hirsch, Markström, Patterson, Sandberg and Vejdemo-Johansson is:

    [tie]    ::= [prefix] ([pair | tuck])* [tuck]
    [prefix] ::= T | W | ε
    [pair]   ::= TT | TW | WT | WW
    [tuck]   ::= [ttuck2] | [wtuck2]
    [ttuck2] ::= TT[w0]U | TW[w1]U
    [wtuck2] ::= WW[w0]U | WT[w2]U
    [w0]     ::= WW[w1]U | WT[w0]U | TW[w0]U | TT[w2]U |
                 [ttuck2]'[w2]U    | [wtuck2]'[w1]U    | ε
    [w1]     ::= WW[w2]U | WT[w1]U | TW[w1]U | TT[w0]U |
                 [ttuck2]'[w0]U    | [wtuck2]'[w2]U
    [w2]     ::= WW[w0]U | WT[w2]U | TW[w2]U | TT[w1]U |
                 [ttuck2]'[w1]U    | [wtuck2]'[w0]U

To start: choose by clicking the pale blue grammar symbol below to build a tieknot. The knot sequence will emerge to the left of the clickable symbol.