Tie Knots
Tie Knots
DAN H IRSCH
Upstanding Hackers LLC
thequux@[Link]
M EREDITH L. PATTERSON
Upstanding Hackers LLC
mlp@[Link]
arXiv:1401.8242v1 [[Link]] 31 Jan 2014
A NDERS S ANDBERG
Oxford University
[Link]@[Link]
Abstract
We extend the existing enumeration of neck tie knots to include tie knots with a textured front,
tied with the narrow end of a tie. These tie knots have gained popularity in recent years, based on
reconstructions of a costume detail from The Matrix Reloaded, and are explicitly ruled out in the
enumeration by Fink and Mao (2000).
We show that the relaxed tie knot description language that comprehensively describes these extended
tie knot classes is either context sensitive or context free. It has a sub-language that covers all the knots
that inspired the work, and that is regular. From this regular sub-language we enumerate 177 147 distinct
tie knots that seem tieable with a normal necktie. These are found through an enumeration of 2 046
winding patterns that can be varied by tucking the tie under itself at various points along the winding.
1
I. I NTRODUCTION
There are several different ways to tie a necktie. Classically, knots such as the four-in-hand, the half
windsor and the full windsor have been commonly taught to new tie-wearers. In a sequence of papers and
a book, Fink and Mao [1–3] defined a formal language for describing tie knots, encoding the topology and
geometry of the knot tying process into the formal language, and then used this language to enumerate
all tie knots that could reasonably be tied with a normal-sized necktie.
The enumeration of Fink and Mao crucially depends on dictating a particular finishing sequence for
tie knots: a finishing sequence that forces the front of the knot – the façade – to be a flat stretch of
fabric. With this assumption in place, Fink and Mao produce a list of 85 distinct tie knots, and determine
several novel knots that extend the previously commonly known list of tie knots.
In recent years, however, interest has been growing for a new approach to tie knots. In The Matrix
Reloaded [12], the character of “The Merovingian” has a sequence of particularly fancy tie knots. Attempts
by fans of the movie to recreate the tie knots from the Merovingian have led to a collection of new tie
knot inventions, all of which rely on tying the tie with the thin end of the tie – the thin blade. Doing this
allows for a knot with textures or stylings of the front of the knot, producing symmetric and pleasing
patterns.
Knorr [4] tells the story of the main participants and their additions to the conversation:
On 21 June 2003 Luke edeity Housego invents the inverse tie-knots. The day before he
had seen ‘Matrix Reloaded’ at the cinema and wanted to have a tie-knot as cool as the one
the character ‘Merovingian’ sports in the movie.
On 28 September 2003 Luke publishes a .pdf-tutorial for his knot on the Internet. He calls
his invention ‘edeity’s knot.’
On 03 February 2006 Victor Allen Lord Whimsy Crawford III publishes a .pdf-tutorial
for a tie-knot he calls ‘The Merovingian.’ In fact it is edeity’s sequence, but rendered much
more clearly than in edeity’s original .pdf. Whimsy had the idea from said .pdf, but was not
sure, if he had matched the sequence.
On 16 February 2007 Henry SimplyJustHen Hu publishes a video on YouTube wherein
he shows how to tie a knot he calls the ‘Hen Tie.’ In the video Henry makes clear that he has
the idea from edeity’s .pdf-tutorial, but that he was not sure if he had matched the sequence.
In fact Henry’s sequence slightly differs from edeity’s.
On 18 February 2007 the knot called ‘Merovingian’ appears in the German version of the
Wikipedia, linking to Lord Whimsy’s tutorial.
On 04 May 2008 Jeffrey cwtrain Eldredge publishes a video on YouTube, demonstrating
how to tie an even larger inverse tie-knot he calls the ‘Eldredge.’ Luke edeity Housego gave
the world the inverse tie-knots, and Jeffrey Eldredge invented a subterfuge in tie-knotting not
to be found in the literature so far: He simply tucks away the rest of the tie’s narrow end
under the collar, thereby making possible the largest tie-knot known. This move rightfully can
be called ‘the Eldredge tuckaway.’ But there is a problem with Jeffrey’s knot: It’s not a knot,
but more a ‘wrapping.’
On 19 October 2008 Alexander zephyrin_xirdal Knorr publishes the description and
sequence of the ‘Eldredge Variant’ in his weblog, making the ‘Eldredge’ into a true knot.
On 19 June 2010 Jeffrey Eldredge publishes the video ‘The Eldredge Knot: Revisited’ on
YouTube, demonstrating how to tie the sequence of the ‘Eldredge Variant.’
In this paper, we present a radical simplification of the formal language proposed by Fink and Mao,
together with an analysis of the asymptotic complexity class of the tie knots language. We produce a
novel enumeration of necktie knots tied with the thin blade, and compare it to the results of Fink and
Mao.
2
T
Broad C
blade
L R
Thin
blade W
Fig. 1. The parts of a necktie, and the division of the wearer’s torso with the regions (Left, Center Right) and the winding
directions (Turnwise, Widdershins) marked out for reference.
A. Formal languages
The work in this paper relies heavily on the language of formal languages, as used in theoretical
computer science and in mathematical linguistics. For a comprehensive reference, we recommend the
textbook by Sipser [11].
Recall that given a finite set L called an alphabet, the set of all sequences of any length of items
drawn (with replacement) from L is denoted by L∗ . A formal language on the alphabet L is some subset
A of L∗ . Depending on how difficult it is to accurately determine membership in a formal language A,
it places in one of several complexity classes. Languages that are described by finite state automata are
regular; languages that require a pushdown automaton are context free; languages that require a linear
bounded automaton are context sensitive and languages that require a full Turing machine to determine
are called recursively enumerable. This sequence builds an increasing hierarchy of expressibility and
computational complexity for syntactic rules for strings of some arbitrary sort of tokens.
One way to describe a language is to give a grammar – a set of production rules that decompose
some form of abstract tokens into sequences of abstract or concrete tokens, ending with a sequence of
elements in some alphabet. The standard notation for such grammars is the Backus-Naur form, which
uses ::= to denote the production rules and hsome namei to denote the abstract tokens. Further common
symbols are ∗ – the Kleene star, that denotes an arbitrary number of repetitions of the previous token
(or group in brackets), and | denoting a choice of one of the adjoining options.
Fig. 2. Different examples of tie knots. Left, a 4-in-hand; middle, a double windsor; right a trinity. The 4-in-hand and double
windsor share the flat façade but have different bodies producing different shapes. The trinity has a completely different façade,
produced by a different wind and tuck pattern.
A. Single-depth tucks
The following regular grammar describes all valid winding sequences for knots in which tucks only
pass the active blade under the most recent bow made over the knot (which we will call depth-1-tuckable).
4
Recall that the Kleene star F ∗ is used to denote sequences of 0 or more repetitions of the string F .
5
T for Turnwise
6
W for Widdershins
5
This subclass can be described by a simple grammar; if we want to allow deeper tucks – going under
earlier bows – then an attribute grammar as in Section IV-B is called for.
B. Recursive tucks
We allow for greater tuck depth by making the htucki rule recursive:
Note that the validity of a tuck depends only on the count of T and W in the entire sequence comprising
the tuck, and not the validity of any tucks recursively embedded into it. For instance, TWTTUU is a valid
depth-2-tuckable sequence, as is its embedded depth-1-tuckable sequence TTU. However, TTWTUU is
also a valid depth-2-tuckable sequence, even though WTU is not a valid depth-1-tuckable sequence.
Finally, we add one last attribute to the top-level htiei rule:
T T
T
W W U U
T T
W
W W
Execution starts at the middle node, but has to go outside and return before the machine will accept
input.
As for the deeper tucked language in Section IV-B, classification is significantly harder: the presence of
recursion means it is at least context-free, whereas the expressibility with an attribute grammar implies at
most context-sensitive. The language does not seem immediately amenable to pumping lemma arguments,
nor to treatment with Ogden’s lemma or Parikh’s theorem or interchange lemmas[8–10, 13].
V. E NUMERATION
We can cut down the enumeration work by using some apparent symmetries. Without loss of generality
we can assume that a tie knot starts by putting the active blade in region R: any knot starting in the
region L is the mirror image of a knot that starts in R and swaps all W to T and vice versa.
Proof: Out of the k winding steps, we need 1 more T than W to reach the C position for the finishing
k
move. For any choice of #T, #W , there are #T of these. Out of all ways to place the requisite number
of T in the winding sequence, we remove those that use up one each of T and W for the last two moves.
7
k−2
Such windings are counted by #T −1 , and for each such sequence, both TW and WT are forbidden
finishing sequences.
Hence, for each candidate sequence of k − 2 moves we need to exclude two sequences.
In particular, the cases enumerated by Fink and Mao [2] are
Winding length 2 3 4 5 6 7 8 total
# tie knots 1 1 3 5 11 21 43 85
The number of winding sequences ending with a single depth tuck from the right after k winding steps
is
X k k−2
−2
t t−1
t+w=k
t−w=2 (mod 3)
Proof: The proof closely follows that of Theorem 2. In each case, we need to enforce repetition of
the last winding symbol to allow for a single depth tuck at the end. In each case, we also need to end
our winding sequence in the correct region for the tuck to take place. The region placement is handled
by the mod 3 residue.
While a good closed form expression for the total number of tie knots, especially including all the
tuck combinations of different depths, seems out of reach at the current time, the descriptions we have
given so far provide accessible routes to algorithmically enumerating possible tie knots. In the appendix,
we include a listing of single depth tuck knots, as well as python code that will list and print knots and
potential tuck sites for any depth and winding length.
To extend the table above, we can use the formulae in Theorems 2 and 3 to establish the following:
Winding length 2 3 4 5 6 7 8 9 10 11 total
# left single tuck windings 0 2 2 6 10 22 42 86 170 324 682
# right single tuck windings 1 1 3 5 11 21 43 85 171 341 682
# center single tuck windings 1 1 3 5 11 21 43 85 171 341 682
8
The reason for the similarity between the right and the center counts is that if t − w = 1 (mod 3),
then w − t = 2 (mod 3). Hence, a winding sequence for a center tuck can be mirrored to a winding
sequence for a right tuck.
By counting the number of detected tuck sites, we have calculated the total number of tie knots using
only single depth tucks to be 177 147. Of these, 59 016 each end with a right or a center tuck, and 59 115
end with a left tuck.
VI. A ESTHETICS
Fink and Mao [2] propose several measures to quantify the aesthetic qualities of a necktie knot; notably
symmetry and balance, corresponding to the quantities #R − #L and the number of transitions from a
streak of W to a streak of T or vice versa.
By considering the popular thin-blade neck tie knots: the Eldredge and the Trinity, as described in [6,
7], we can immediately note that balance no longer seems to be as important for the look of a tie knot
as is the shape of its façade. Symmetry still plays an important role in knots, and is easy to calculate
using the CLR notation for tie knots.
Knot TW-string CLR-string Balance Symmetry
Eldredge TTTWWTTUTTWWU LCRLRCRLUCRCLU 3 0
Trinity TWWWTTTUTTU LCLRCRLCURLU 2 1
We do not in this paper attempt to optimize any numeric measures of aesthetics, as this would require
us to have a formal and quantifiable measure of the knot façades. This seems difficult with our currently
available tools.
VII. C ONCLUSION
In this paper, we have extended the enumeration methods originally used by Fink and Mao [2] to
provide a larger enumeration of necktie knots, including those knots tied with the thin blade of a necktie
to produce ornate patterns in the knot façade.
We have found 2 046 winding patterns that take up to 11 moves to tie and are anchored by a final single
depth tuck, and thus are reasonable candidates for use with a normal necktie. We chose the number of
moves by examining popular thin-blade tie knots – the Eldredge tie knot uses 11 moves. Most of these
winding patterns allow several possible tuck patterns, and thus the 2 046 winding sequences generate
177 147 tie knots with single depth tucks.
We have further shown that in the limit, the language describing neck tie knots is either context sensitive
or context free, with a regular sub-language describing the 177 147 knots above.
Questions that remain open to our mind include:
• Settle the language complexity class of the full tie knot language.
• Find a way to algorithmically divide a knot description string into a body/façade distinction.
• Using such a distinction, classify all possible knot façades with reasonably short necktie lengths.
9
R EFERENCES
[1] T. Fink and Y. Mao. The 85 ways to tie a tie. Fourth Estate, 2001.
[2] T. Fink and Y. Mao. “Tie knots, random walks and topology”. In: Physica A: Statistical Mechanics
and its Applications 276.1 (2000), pp. 109–121.
[3] T.M. Fink and Y. Mao. “Designing tie knots by random walks”. In: Nature 398.6722 (1999),
pp. 31–32.
[4] A. Knorr. eldredge reloaded. Blog post on [Link] Accessed on 26 December 2012.
June 2010. URL: [Link]
[5] D. Knuth. “Semantics of context-free languages”. In: Mathematical Systems Theory 2.2 (1967),
pp. 127–145.
[6] A. Krasny. Eldredge Tie Knot - How to Tie a Eldredge Necktie Knot. Blog post on [Link]
com. Accessed on 26 December 2012. Nov. 2012. URL: [Link]
how-to-tie-a-necktie-eldredge-knot.
[7] A. Krasny. Trinity Tie Knot - How to Tie a Trinity Necktie Knot. Blog post on [Link]
Accessed on 26 December 2012. Dec. 2012. URL: [Link]
to-tie-a-necktie-trinity-knot.
[8] William Ogden. “A helpful result for proving inherent ambiguity”. In: Theory of Computing Systems
2.3 (1968), pp. 191–194.
[9] William Ogden, Rockford J Ross, and Karl Winklmann. “An “interchange lemma” for context-free
languages”. In: SIAM Journal on Computing 14.2 (1985), pp. 410–415.
[10] Rohit J Parikh. “On context-free languages”. In: Journal of the ACM (JACM) 13.4 (1966), pp. 570–
581.
[11] Michael Sipser. Introduction to the Theory of Computation. Vol. 2. Thomson Course Technology
Boston, 2006.
[12] A. Wachowski et al. The matrix reloaded. Warner Bros. Pictures, 2003.
[13] David S Wise. “A strong pumping lemma for context-free languages”. In: Theoretical Computer
Science 3.3 (1976), pp. 359–369.
10
A PPENDIX
Classical ties in WTU notation
The 85 ties enumerated by Fink and Mao [2] are given by the following winding strings in our WTU
notation for tie knots:
Index Tie string Index Tie string
1 WWU 43 WTWTWTWWU
2 WTTU 44 WTWWWWTTU
3 WTWWU 45 WTTTTWTTU
4 TTTTU 46 WTWTTTTTU
5 TWWWU 47 WWWWTWTTU
6 WTWTTU 48 WTWWTTWWU
7 WWWWWU 49 WTTWWTWWU
8 WWTTTU 50 WTWTTWWWU
9 TTTWWU 51 WWTTWTWWU
10 TWWTTU 52 TTTWTWTTU
11 WTWTWWU 53 TWWTWTWWU
12 WTTTTTU 54 WWWWWWWWU
13 WWWWTTU 55 WWTTTTTTU
14 WTTWWWU 56 WWWWWTTTU
15 WWTTWWU 57 TTTWWWWWU
16 TTTWTTU 58 TTTTTTWWU
17 TWWTWWU 59 WWTTTWWWU
18 TTWWWWU 60 TTTWWTTTU
19 TTWTTTU 61 WTTTWWWWU
20 TWTTTTU 62 WWWTTTWWU
21 TWTWWWU 63 WTTTWTTTU
22 WTWTWTTU 64 WWTWWWTTU
23 WTTTTWWU 65 TWWWTTWWU
24 WTWWWWWU 66 TTWWWTWWU
25 WWWWTWWU 67 TTWTTWTTU
26 WTWWTTTU 68 TWWTTTTTU
27 WWTTWTTU 69 TWWWWWTTU
28 TTTWTWWU 70 TTTTWWTTU
29 WTTWWTTU 71 TWWTTWWWU
30 TWWTWTTU 72 WTTWTTTTU
31 TTTTTTTU 73 WWWTWWTTU
32 TWWWWWWU 74 WTTWTWWWU
33 TTTTWWWU 75 WWTWTTWWU
34 WWWTTTTU 76 TWTTTWTTU
35 TWWWTTTU 77 TWTWWTWWU
36 WWTWWWWU 78 TTWWTTTTU
37 WWWTWWWU 79 TWTTWWWWU
38 TTWWWTTU 80 TTWTWWWWU
39 WWTWTTTU 81 TTWWTWWWU
40 TWTTTWWU 82 TWTTWTTTU
41 TTWTTWWU 83 TTWTWTTTU
42 TWTWWTTU 84 TWTWTTTTU
85 TWTWTWWWU
11
We write the TWU strings with a lowercase u for any additionally feasible front tuck site. First ties
knots that tuck from the left.
Index Tie string Index Tie string Index Tie string
L-1 TTTU L-41 WWWuTTuWWU L-81 WWuWTWWuWWU
L-2 WWWU L-42 WWWuWWuTTU L-82 WWuTWWWuWWU
L-3 TTuWWU L-43 TTuTTuWTTTU L-83 WWuWWuWTWWU
L-4 WWuTTU L-44 TTuTTuTWTTU L-84 WWuWWuTWWWU
L-5 TWTTTU L-45 TTuWTTTuTTU L-85 TTTuTTuTTuTTU
L-6 TTWTTU L-46 TTuTWTTuTTU L-86 TTTuTTuWTWWU
L-7 WTTuTTU L-47 WTTTuTTuTTU L-87 TTTuTTuTWWWU
L-8 TWWuWWU L-48 TWTTuTTuTTU L-88 TTTuWTTTuWWU
L-9 WWTWWU L-49 TTuTTuWWuWWU L-89 TTTuWTWWuTTU
L-10 WTWWWU L-50 TTuWTWTWWU L-90 TTTuTWTTuWWU
L-11 TTuTTuTTU L-51 TTuWTTWWWU L-91 TTTuTWWWuTTU
L-12 TTuWTWWU L-52 TTuTWWTWWU L-92 TTTuWWuWTTTU
L-13 TTuTWWWU L-53 TTuTWTWWWU L-93 TTTuWWuTWTTU
L-14 WTTTuWWU L-54 TTuWWuTTuWWU L-94 TWTTTuTTuWWU
L-15 WTWWuTTU L-55 TTuWWuWWuTTU L-95 TWTTTuWWuTTU
L-16 TWTTuWWU L-56 WTTTuWTWWU L-96 TWTWTWTTTU
L-17 TWWWuTTU L-57 WTTTuTWWWU L-97 TWTWTTWTTU
L-18 WWuWTTTU L-58 WTWTTTuWWU L-98 TWTTWWTTTU
L-19 WWuTWTTU L-59 WTWTWWuTTU L-99 TWTTWTWTTU
L-20 WWuWWuWWU L-60 WTTWTTuWWU L-100 TWTWWuTTuTTU
L-21 TTTuTTuWWU L-61 WTTWWWuTTU L-101 TTWTTuTTuWWU
L-22 TTTuWWuTTU L-62 WTWWuWTTTU L-102 TTWTTuWWuTTU
L-23 TWTWTTTU L-63 WTWWuTWTTU L-103 TTWWTWTTTU
L-24 TWTTWTTU L-64 TWTTuWTWWU L-104 TTWWTTWTTU
L-25 TTWWTTTU L-65 TWTTuTWWWU L-105 TTWTWWTTTU
L-26 TTWTWTTU L-66 TWWTTTuWWU L-106 TTWTWTWTTU
L-27 TWWuTTuTTU L-67 TWWTWWuTTU L-107 TTWWWuTTuTTU
L-28 WTTuWTTTU L-68 TWTWTTuWWU L-108 TWWuTTuWTTTU
L-29 WTTuTWTTU L-69 TWTWWWuTTU L-109 TWWuTTuTWTTU
L-30 WWTTTuTTU L-70 TWWWuWTTTU L-110 TWWuWTTTuTTU
L-31 WTWTTuTTU L-71 TWWWuTWTTU L-111 TWWuTWTTuTTU
L-32 TWTWWuWWU L-72 WWuTTuTTuWWU L-112 WTTuTTuTTuWWU
L-33 TTWWWuWWU L-73 WWuTTuWWuTTU L-113 WTTuTTuWWuTTU
L-34 TWWuWTWWU L-74 WWuWTWTTTU L-114 WTTuWTWTTTU
L-35 TWWuTWWWU L-75 WWuWTTWTTU L-115 WTTuWTTWTTU
L-36 WTTuWWuWWU L-76 WWuTWWTTTU L-116 WTTuTWWTTTU
L-37 WWTWTWWU L-77 WWuTWTWTTU L-117 WTTuTWTWTTU
L-38 WWTTWWWU L-78 WWuWWuTTuTTU L-118 WTTuWWuTTuTTU
L-39 WTWWTWWU L-79 WTWWuWWuWWU L-119 WWTTTuWTTTU
L-40 WTWTWWWU L-80 TWWWuWWuWWU L-120 WWTTTuTWTTU
13
Next, we list the knots that tuck from the right. Again, with all optional single depth front tuck sites
marked with a lowercase u.
Index Tie string Index Tie string Index Tie string
R-1 TTU R-41 WWWuTWTTU R-81 WWuWTTWWWU
R-2 TWWU R-42 WWWuWWuWWU R-82 WWuTWWTWWU
R-3 WTTTU R-43 TTuTTuTTuTTU R-83 WWuTWTWWWU
R-4 TWTTU R-44 TTuTTuWTWWU R-84 WWuWWuTTuWWU
R-5 WWuWWU R-45 TTuTTuTWWWU R-85 WWuWWuWWuTTU
R-6 TTTuTTU R-46 TTuWTTTuWWU R-86 TTTuTTuTTuWWU
R-7 TWTWWU R-47 TTuWTWWuTTU R-87 TTTuTTuWWuTTU
R-8 TTWWWU R-48 TTuTWTTuWWU R-88 TTTuWTWTTTU
R-9 WTTuWWU R-49 TTuTWWWuTTU R-89 TTTuWTTWTTU
R-10 WWWuTTU R-50 TTuWWuWTTTU R-90 TTTuTWWTTTU
R-11 TTuTTuWWU R-51 TTuWWuTWTTU R-91 TTTuTWTWTTU
R-12 TTuWWuTTU R-52 WTTTuTTuWWU R-92 TTTuWWuTTuTTU
R-13 WTWTTTU R-53 WTTTuWWuTTU R-93 TWTTTuWTTTU
R-14 WTTWTTU R-54 WTWTWTTTU R-94 TWTTTuTWTTU
R-15 TWWTTTU R-55 WTWTTWTTU R-95 TWTWTTTuTTU
R-16 TWTWTTU R-56 WTTWWTTTU R-96 TWTTWTTuTTU
R-17 WWuTTuTTU R-57 WTTWTWTTU R-97 TTWTTuWTTTU
R-18 WTWWuWWU R-58 WTWWuTTuTTU R-98 TTWTTuTWTTU
R-19 TWWWuWWU R-59 TWTTuTTuWWU R-99 TTWWTTTuTTU
R-20 WWuWTWWU R-60 TWTTuWWuTTU R-100 TTWTWTTuTTU
R-21 WWuTWWWU R-61 TWWTWTTTU R-101 TWWuTTuTTuTTU
R-22 TTTuWTTTU R-62 TWWTTWTTU R-102 WTTuTTuWTTTU
R-23 TTTuTWTTU R-63 TWTWWTTTU R-103 WTTuTTuTWTTU
R-24 TWTTTuTTU R-64 TWTWTWTTU R-104 WTTuWTTTuTTU
R-25 TTWTTuTTU R-65 TWWWuTTuTTU R-105 WTTuTWTTuTTU
R-26 WTTuTTuTTU R-66 WWuTTuWTTTU R-106 WWTTTuTTuTTU
R-27 TTTuWWuWWU R-67 WWuTTuTWTTU R-107 WTWTTuTTuTTU
R-28 TWTWTWWU R-68 WWuWTTTuTTU R-108 TTTuWTWWuWWU
R-29 TWTTWWWU R-69 WWuTWTTuTTU R-109 TTTuTWWWuWWU
R-30 TTWWTWWU R-70 TTuWWuWWuWWU R-110 TTTuWWuWTWWU
R-31 TTWTWWWU R-71 WTWTWWuWWU R-111 TTTuWWuTWWWU
R-32 TWWuTTuWWU R-72 WTTWWWuWWU R-112 TWTTTuWWuWWU
R-33 TWWuWWuTTU R-73 WTWWuWTWWU R-113 TWTWTWTWWU
R-34 WTTuWTWWU R-74 WTWWuTWWWU R-114 TWTWTTWWWU
R-35 WTTuTWWWU R-75 TWWTWWuWWU R-115 TWTTWWTWWU
R-36 WWTTTuWWU R-76 TWTWWWuWWU R-116 TWTTWTWWWU
R-37 WWTWWuTTU R-77 TWWWuWTWWU R-117 TWTWWuTTuWWU
R-38 WTWTTuWWU R-78 TWWWuTWWWU R-118 TWTWWuWWuTTU
R-39 WTWWWuTTU R-79 WWuTTuWWuWWU R-119 TTWTTuWWuWWU
R-40 WWWuWTTTU R-80 WWuWTWTWWU R-120 TTWWTWTWWU
20
Next, we list the knots that tuck from the center. Again, with all optional single depth front tuck
sites marked with a lowercase u. All these tie knots will have the thin blade sitting on top of the broad
blade, which for most choices will be an unusual look, even for a modern tie knot. By comparing entries
we may see that the 85 first knots in this enumeration are – with medial tucks ignored and with some
permutation of assigned indices – the same as the 85 tie knots enumerated by Fink and Mao [2].
Index Tie string Index Tie string Index Tie string
C-1 WWU C-41 WWWuWTWWU C-81 WWuTWTTuWWU
C-2 WTTU C-42 WWWuTWWWU C-82 WWuTWWWuTTU
C-3 TTuTTU C-43 TTuTTuTTuWWU C-83 WWuWWuWTTTU
C-4 WTWWU C-44 TTuTTuWWuTTU C-84 WWuWWuTWTTU
C-5 TWWWU C-45 TTuWTWTTTU C-85 WWuWWuWWuWWU
C-6 TTTuWWU C-46 TTuWTTWTTU C-86 TTTuTTuWTTTU
C-7 TWWuTTU C-47 TTuTWWTTTU C-87 TTTuTTuTWTTU
C-8 WWTTTU C-48 TTuTWTWTTU C-88 TTTuWTTTuTTU
C-9 WTWTTU C-49 TTuWWuTTuTTU C-89 TTTuTWTTuTTU
C-10 WWWuWWU C-50 WTTTuWTTTU C-90 TWTTTuTTuTTU
C-11 TTuWTTTU C-51 WTTTuTWTTU C-91 TTWTTuTTuTTU
C-12 TTuTWTTU C-52 WTWTTTuTTU C-92 WTTuTTuTTuTTU
C-13 WTTTuTTU C-53 WTTWTTuTTU C-93 TTTuTTuWWuWWU
C-14 TWTTuTTU C-54 TWTTuWTTTU C-94 TTTuWTWTWWU
C-15 TTuWWuWWU C-55 TWTTuTWTTU C-95 TTTuWTTWWWU
C-16 WTWTWWU C-56 TWWTTTuTTU C-96 TTTuTWWTWWU
C-17 WTTWWWU C-57 TWTWTTuTTU C-97 TTTuTWTWWWU
C-18 TWWTWWU C-58 WWuTTuTTuTTU C-98 TTTuWWuTTuWWU
C-19 TWTWWWU C-59 TTuWTWWuWWU C-99 TTTuWWuWWuTTU
C-20 WWuTTuWWU C-60 TTuTWWWuWWU C-100 TWTTTuWTWWU
C-21 WWuWWuTTU C-61 TTuWWuWTWWU C-101 TWTTTuTWWWU
C-22 TTTuTTuTTU C-62 TTuWWuTWWWU C-102 TWTWTTTuWWU
C-23 TTTuWTWWU C-63 WTTTuWWuWWU C-103 TWTWTWWuTTU
C-24 TTTuTWWWU C-64 WTWTWTWWU C-104 TWTTWTTuWWU
C-25 TWTTTuWWU C-65 WTWTTWWWU C-105 TWTTWWWuTTU
C-26 TWTWWuTTU C-66 WTTWWTWWU C-106 TWTWWuWTTTU
C-27 TTWTTuWWU C-67 WTTWTWWWU C-107 TWTWWuTWTTU
C-28 TTWWWuTTU C-68 WTWWuTTuWWU C-108 TTWTTuWTWWU
C-29 TWWuWTTTU C-69 WTWWuWWuTTU C-109 TTWTTuTWWWU
C-30 TWWuTWTTU C-70 TWTTuWWuWWU C-110 TTWWTTTuWWU
C-31 WTTuTTuWWU C-71 TWWTWTWWU C-111 TTWWTWWuTTU
C-32 WTTuWWuTTU C-72 TWWTTWWWU C-112 TTWTWTTuWWU
C-33 WWTWTTTU C-73 TWTWWTWWU C-113 TTWTWWWuTTU
C-34 WWTTWTTU C-74 TWTWTWWWU C-114 TTWWWuWTTTU
C-35 WTWWTTTU C-75 TWWWuTTuWWU C-115 TTWWWuTWTTU
C-36 WTWTWTTU C-76 TWWWuWWuTTU C-116 TWWuTTuTTuWWU
C-37 WWWuTTuTTU C-77 WWuTTuWTWWU C-117 TWWuTTuWWuTTU
C-38 TWWuWWuWWU C-78 WWuTTuTWWWU C-118 TWWuWTWTTTU
C-39 WWTWWuWWU C-79 WWuWTTTuWWU C-119 TWWuWTTWTTU
C-40 WTWWWuWWU C-80 WWuWTWWuTTU C-120 TWWuTWWTTTU
27
Next, we include the Python code listing that we used to generate these enumerations. With some
utility functions, the core of this code is in the combinatorics generated from the itertools package
and in the mod 3 tests on final segments of strings.
# t i e s . py
# ( c ) 2013 M i k a e l Vejdemo − J o h a n s s o n
# R e l e a s e d a s CC−BY
import i t e r t o o l s
from s c i p y . s p e c i a l import binom
”””
R e p r o d u c i n g F i n k & Mao i s done by t h e f o l l o w i n g :
finkmao = c l a s s i c a l ( p r o t o t i e s ( wtpairs ( 9 ) ) )
”””
d e f w t p a i r s ( maxN , mod3 = 1 ) :
r e t u r n [ ( i , n− i ) f o r n i n r a n g e ( maxN )
f o r i i n r a n g e ( n + 1) i f ( n −2∗ i ) % 3 == mod3 ]
def p r o t o t i e s ( wtps ) :
ret = []
for ( n , k ) in wtps :
i f k ==0:
r e t . a p p e n d ( [ ’W’ ] ∗ ( n+k ) )
continue
p o s s = i t e r t o o l s . c o m b i n a t i o n s ( r a n g e ( n+k ) , k )
for pos in poss :
t i e = [ ’W’ ] ∗ ( n+k )
for p in pos :
t i e [ p ] = ’T ’
r e t . append ( t i e )
return r e t
def c l a s s i c a l ( p r o t o s ) :
r e t u r n [ p f o r p i n p r o t o s i f l e n ( p) > =2 and p [ − 2] == p [ − 1 ] ]
def k t u c k f i n a l s ( protos , k ) :
def wort ( t ) :
i f t == ’W’ :
return 1
e l i f t == ’T ’ :
r e t u r n −1
else :
return 0
d e f wmint ( t t ) :
r e t u r n sum ( map ( wort , t t ) ) % 3
return [ p for p in p r o t o s
34
”””
States & cyclic transitions :
W T
L ( left ) ˆ v
C ( center ) ˆ v
R ( right ) ˆ v
”””
s t a t e v e c t = { ’T ’ : { ’L ’ : ’C ’ , ’C ’ : ’R ’ , ’R ’ : ’L ’ } ,
’W’ : { ’L ’ : ’R ’ , ’R ’ : ’C ’ , ’C ’ : ’L ’ }}
d e f WTtoCLR ( t i e , s t a r t s t a t e = ’L ’ ) :
state = startstate
ret = state
f o r wt i n t i e :
s t a t e = s t a t e v e c t [ wt ] [ s t a t e ]
r e t += s t a t e
return r e t
def balance ( t i e ) :
return l e n ( [ i for i in range ( 1 , l e n ( t i e ) ) i f t i e [ i ] != t i e [ i −1]])
d e f symmetry ( t i e , s t a r t s t a t e = ’L ’ ) :
c l r t i e = WTtoCLR ( t i e , s t a r t s t a t e = s t a r t s t a t e )
return len ( [ i for i in range ( len ( c l r t i e ) ) i f c l r t i e [ i ]== ’L ’ ] ) − l e n ( [ i f o r i i n
d e f CLRtoWT ( t i e ) :
ret = []
fr = tie [0]
for s t in t i e [ 1 : ] :
to = st
i f t o == ’T ’ :
r e t . append ( ’U ’ )
elif statevect [ ’W’ ] [ f r ] == t o :
r e t . append ( ’W’ )
elif statevect [ ’T ’ ] [ f r ] == t o :
r e t . append ( ’T ’ )
fr = to
return r e t
d e f countWT (w, t ) :
i f w+ t < 2 :
return 0
r e t u r n binom (w+ t , t ) − 2 ∗ binom (w+ t − 2 , t − 1)
35
def tucks ( t ) :
return ktucks ( t )
def ktuck ( t , k ) :
”””
T e s t s w h e t h e r t h e end o f t h e w i n d i n g s t r i n g t i s a v a l i d s i t e f o r
a k− f o l d t u c k
”””
i f l e n ( t ) < 2∗ k :
return False
ws = [ c f o r c i n t [ − 2 ∗ k : ] i f c == ’W’ ]
t s = [ c f o r c i n t [ − 2 ∗ k : ] i f c == ’T ’ ]
d i f f = ( l e n ( ws) − l e n ( t s ) ) % 3
i f t [ − 2 ∗ k ] == ’W’ :
r e t u r n d i f f == 2
e l i f t [ − 2 ∗ k ] == ’T ’ :
r e t u r n d i f f == 1
return False
d e f p r i n t a l l ( maxN , k =1 , p=lambda t t : T r u e ) :
”””
P r i n t s o u t a TeX− a b l e t a b l e o f a l l t i e k n o t s w i t h k− f o l d t u c k
s i t e s marked . D e f a u l t s t o k =1. S e p a r a t e d by f i n a l t u c k d i r e c t i o n .
”””
f o r j , c i n e n u m e r a t e ( [ ’L ’ , ’C ’ , ’R ’ ] ) :
t i e s = [ k t u c k s ( t t , k ) f o r t t i n p r o t o t i e s ( w t p a i r s ( maxN , mod3= j ) )
i f l e n ( t t ) > 1 and p ( t t ) ]
for i , t in enumerate ( t i e s ) :
p r i n t ( ’%s−%d ’ % ( c , i + 1 ) ) , ’&’ , ’ ’ . j o i n ( t ) , ’ \\\\ ’
f i n k m a o = [ ’LRCT ’ ,