About this Journal Submit a Manuscript Table of Contents
ISRN Algebra
Volume 2012 (2012), Article ID 804829, 12 pages
http://dx.doi.org/10.5402/2012/804829
Research Article

An Algorithm for Generating a Family of Alternating Knots

Departamento de Ciencias de la Computación, Instituto de Investigaciones en Matemáticas Aplicadas y en Sistemas, Universidad Nacional Autónoma de México, Apartado. 20-726, 01000 México City, DF, Mexico

Received 25 September 2011; Accepted 11 October 2011

Academic Editors: C. Munuera and A. Vourdas

Copyright © 2012 Carlos Velarde et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract

An algorithm for generating a family of alternating knots (which are described by means of a chain code) is presented. The family of alternating knots is represented on the cubic lattice, that is, each alternating knot is composed of constant orthogonal straight-line segments and is described by means of a chain code. This chain code is represented by a numerical string of finite length over a finite alphabet, allowing the usage of formal-language techniques for alternating-knot representation. When an alternating knot is described by a chain, it is possible to obtain its mirroring image in an easy way. Also, we have a compression efficiency for representing alternating knots, because chain codes preserve information and allow a considerable data reduction.

1. Introduction

In 1993, Livingston [1] stated that “knot theory remains a lively topic today. Many of the basic questions, some dating to Tailt’s first paper in the subject, remain open. At the other extreme, the results of recent years promise to provide many new insights’’. Knot theory is a branch of algebraic topology. The three main techniques of knot theory are: geometric techniques, combinatorial methods, and algebraic tools. A knot 𝐾 is a simple closed polygonal curve in three-dimensional Euclidean space 3 [1]. Knots are cataloged in order of increasing complexity. One measure of complexity that is often used is the crossing number, that is, the number of double points in the simplest planar projection of the knot. There is only one knot with crossing number of three (ignoring mirror reflections) the trefoil. The figure-eight knot is the only knot with a crossing number of four. There are two knots with a crossing number of five, three knots with a crossing number of six, and seven knots with a crossing number of seven. From there on the numbers increase dramatically. There are 12,965 knots with a crossing number of 13 or fewer crossings in a minimal projection. A complex knot is a knot with a huge crossing numbers. Imagine, how many knots are there in an alternating knot which is represented by a complex knot with a crossing number of 1200? This paper deals with complex knots of this order of crossing numbers. 𝑍3 is a more computer-friendly place for generating knots. In 3, every point in space has coordinates drawn from the set of real numbers. Thus, the generation of complex knots in 3 produces a very complex computation. On the other hand, in 𝑍3 all points have integer coordinates. Thus, we represent complex knots which are embedded on the cubic lattice. Complex knots are composed of constant orthogonal straight-line segments and are represented by means of a chain code [2] which produces a numerical string of finite length over a finite alphabet, allowing the usage of grammatical techniques for alternating-knot representation. The above mentioned generates a very simple computation.

Several authors have analyzed knots on the cubic lattice. In 1993, Diao presented the minimal knotted polygons on the cubic lattice [3] and, in 1994, the number of smallest knots on the cubic lattice [4]. van Rensburg and Promislow define the minimal knots in the cubic lattice [5]. Hayes [6] presents the “Square Knots" on the cubic lattice, which are simple closed polygonal curves embedded in 𝑍3. Other interesting theories: Kauffman [7] introduces the “Virtual Knot Theory”, which includes general Gauss codes. Nakamura and Rosenfeld [8] define the “Digital Knots” which represent an initial effort at the study of the concepts of knottedness and linkedness for digital objects. Complex knots are embedded on the cubic lattice. Thus, these knots are composed of constant orthogonal straight-line segments and are represented by chain coding [2]. In order to have a self-contained paper, Appendix A describes the used chain code. The left-hand side of Figure 1 shows an example of a complex knot in a continuous representation. The right-hand side of Figure 1 illustrates the same knot embedded on the cubic lattice. In the content of this work, knots are represented as ropes. This improves the understanding of the figures.

804829.fig.001
Figure 1: An example of a complex knot: its continuous and discrete version, respectively.

This paper is organized as follows: Section 2 describes the proposed family of rectangular alternating links. In Section 3, we present some results. Section 4 gives some conclusions. Finally, we present Appendix A which describes the used chain code and Appendix B which presents the program of the proposed algorithm.

2. A Family of Rectangular Alternating Links

The alternating link diagrams of the type illustrated in Figure 2 are used here to construct links like that shown in Figure 1. Each diagram is a set of rectilinear polygons and can be characterized in terms of two positive integers 𝑎 and 𝑏. In what follows we present such a characterization, from which we obtain some properties of the family of polygons, useful to construct an algorithm for generating a chain code representation of the corresponding link.

804829.fig.002
Figure 2: An alternating link diagram composed of a set of rectilinear polygons with vertices on the 2-dimensional integer lattice. The polygons are bounded by an axis-aligned square, 𝑆𝑎, which has side length 𝑎 and has the origin at lower left corner. They are also inscribed in a rectangle, 𝑅𝑎,𝑏, which has its sides parallel to the diagonals of 𝑆𝑎, is symmetric with respect to the central point of 𝑆𝑎, and has sides through the points (0,𝑎𝑏) and (0,𝑎𝑏+1). The vertices of the polygons are the lattice nodes lying on the sides of 𝑅𝑎,𝑏 and they are numbered from 0 to 2𝑎+1.

Let 𝑎 and 𝑏 be integers such that 0<𝑏𝑎. Let 𝑆𝑎 be a square on the 2-dimensional integer lattice, with one corner at the origin and another at the point (𝑎,𝑎). Let 𝑅𝑎,𝑏 be the rectangle with sides parallel to the diagonals of 𝑆𝑎, symmetric with respect to the central point of 𝑆𝑎, and with sides through the points (0,𝑎𝑏) and (0,𝑎𝑏+1).

The 2(𝑎+1) grid nodes lying on the edges of 𝑅𝑎,𝑏 serve as vertices of a set 𝒫𝑎,𝑏 of rectilinear polygons, each of whose sides is the vertical or horizontal line segment that joins a corresponding pair of nodes. In Figure 2 those vertices appear counterclockwise enumerated from 0 to 2𝑎+1, beginning with the node at coordinates (0,𝑎𝑏). Accordingly, let 𝑉𝑎={0,1,,2𝑎+1} be the set of vertices of 𝒫𝑎,𝑏.

Let 𝑣𝑉𝑎𝑉𝑎 be the function such that 𝑣(𝑖) is the vertex of 𝒫𝑎,𝑏 vertically opposed to vertex 𝑖. As a consequence of the way the enumeration of the vertices was done, we have that 𝑖+𝑣(𝑖)=2𝑎+1. Then, from this equation and defining 𝑛=2(𝑎+1), we arrive to𝑣(𝑖)=𝑛1𝑖.(2.1)

Now, let 𝑉𝑎𝑉𝑎 be the function such that (𝑖) is the vertex horizontally opposed to vertex 𝑖. There are two cases: 𝑖+(𝑖)=2𝑎2𝑏+1=𝑛2𝑏1, if 𝑖2𝑎2𝑏+1, and 𝑖+(𝑖)=4𝑎2𝑏+3=2𝑛2𝑏1, otherwise. Taking into account that (𝑖)<𝑛, in both cases we obtain(𝑖)=(2𝑏1𝑖)mod𝑛.(2.2)

Remark 2.1. (1) The functions 𝑣 and are bijections, they are self-inverse, and each one maps odd numbers to even numbers and vice versa.
(2) By the above remark, also the function composition 𝑣𝑉𝑎𝑉𝑎 is bijective, but preserves the parity of its argument.
(3) The functions 𝑣, , and 𝑣, being bijections, are elements of the group 𝑆𝑉𝑎 of symmetries of 𝑉𝑎. In particular, we call attention to 𝑣—the cyclic subgroup generated by 𝑣 on 𝑆𝑉𝑎—and to its (induced) action over 𝑉𝑎.
(4) Along any polygon 𝑃𝒫𝑎,𝑏, the horizontal sides alternate with the vertical ones. Thus, the consecutive vertices of 𝑃 can be obtained by iterating alternate applications of and 𝑣. For example, with 𝑎=9 and 𝑏=4 (which is the particular case presented in Figure 2), for the polygon through vertex 0, the corresponding iteration produces the (periodic) sequence 0,(0),𝑣((0)),(𝑣((0))),(2.3) which has 0,11,8,3,16,15,4,7,12,19(2.4) as a shortest period.
(5) From the first remark, it follows that in sequences like those just presented the elements alternate in parity. So, if 𝑈 is the set of even (odd) vertices of 𝑃, then (𝑈) and 𝑣(𝑈) both are equal to the set of odd (even) vertices of 𝑃.

Now, to count the number of polygons in 𝒫𝑎,𝑏, it is useful to interpret this set as a graph, in the obvious way, and then proceed to count the number of cycles in this graph.

Definition 2.2. Let 𝑎, 𝑏, 𝑉𝑎, 𝑣, and , be as above. 𝐺𝑎,𝑏=(𝑉𝑎,𝐸𝑎,𝑏) is the graph with vertex-set 𝑉𝑎 and edge-set 𝐸𝑎,𝑏={{𝑖,𝑣(𝑖)}𝑖𝑉𝑎}{{𝑖,(𝑖)}𝑖𝑉𝑎}.
We can see Figure 2 also as a drawing of 𝐺𝑎,𝑏. Since each vertex is an end point of exactly two edges, 𝐺𝑎,𝑏 is a regular graph of degree 2. Therefore, every component of 𝐺𝑎,𝑏 is a cycle [9]. Now we will see how many components have 𝐺 and how long they are.

Lemma 2.3. The graph 𝐺𝑎,𝑏 defined above is composed of 𝑐=gcd(𝑎+1,𝑏) cycles of length 𝑛/𝑐, and all the vertices 0,1,,𝑐1 belong to distinct cycles.

Proof. From (2.1) and (2.2) we have that 𝑣((𝑖))=𝑛1(2𝑏1𝑖)mod𝑛=(2𝑏+𝑖)mod𝑛, that is (𝑣)(𝑖)=(2𝑏+𝑖)mod𝑛.(2.5) Now, to analyze the action of 𝑣 over 𝑉𝑎 (see Remark 2.1(3)), it is useful the embedding of 𝑉𝑎 into the additive group /𝑛. From (2.5) it follows that (𝑣)𝑞(0)=𝑞(2𝑏)mod𝑛, for 𝑞. Hence, the orbit of 0 under the action of 𝑣 is the (finite) set {𝑞(2𝑏)mod𝑛𝑞=0,1,2,} which is the (cyclic) subgroup of /𝑛 generated by 2𝑏. Then, this subgroup has 𝑐=gcd(𝑛,2𝑏) as its least generator, it is of order 𝑛/𝑐 [10, Section  6.5-6], and the set {[𝑖]|0𝑖<𝑐} of its 𝑐 cosets coincide with the set of orbits of 𝑣 on /𝑛. But the set of vertices of a cycle of 𝐺𝑎,𝑏 is equal to the union of two of these orbits (see Remark 2.1(5)). Hence, there are 𝑐=𝑐/2=gcd(𝑛,2𝑏)/2=gcd(𝑎+1,𝑏) cycles in 𝐺𝑎,𝑏, each one of length 2(𝑛/𝑐)=𝑛/𝑐. Now, in terms of cosets, the set of vertices of a cycle of 𝐺𝑎,𝑏 is equal to a union of the form [𝑖]𝑣([𝑖]), with 0𝑖<𝑐. By (2.1), and because 𝑛1𝑖 and 𝑐1𝑖 are in the same coset, we obtain that 𝑣([𝑖][𝑣]=[]=𝑐)=(𝑖)𝑛1𝑖1𝑖.(2.6) Therefore, the 𝑐 cycles have, respectively, the following sets of vertices: [𝑖]𝑐1𝑖,for0𝑖<𝑐2=𝑐.(2.7)

Next, we will define a link 𝑎,𝑏 for the alternating link diagram 𝒫𝑎,𝑏. Figure 3(a) shows 9,4. To begin with, we state some additional observations on Figure 2.

804829.fig.003
Figure 3: (a) A link for the alternating link diagram shown in Figure 2, (b) a section of the link, and (c) the pieces of a section.

Remark 2.4. (1) There are 𝑏 and 𝑎+1𝑏 vertices of 𝒫𝑎,𝑏 in the upper left side and in the lower left side of 𝑅𝑎,𝑏, respectively. Let 𝑏=min(𝑏,𝑎+1𝑏).(2.8) Since 𝑐=gcd(𝑎+1,𝑏)=gcd(𝑎+1,𝑏)𝑏, the vertices 0,1,,𝑐1 lie on the lower left side of 𝑅𝑎,𝑏.
(2) Let 𝑒 be an edge of a polygon 𝑃𝒫𝑎,𝑏. If the end points of 𝑒 lie on parallel sides of 𝑅𝑎,𝑏, then 𝑒 is of even length 2𝑏, otherwise 𝑒 has odd length. Furthermore, 𝑒 has odd length if and only if 𝑒 is at distance 𝑑<𝑏 from a side of 𝑆𝑎 parallel to 𝑒, and in this case 𝑒 is of length 2𝑑+1. Thus, the lengths of the vertical and horizontal edges through the vertex 𝑖 are, respectively, given by the functions 𝑙𝑣,𝑙𝑉𝑎 such that 𝑙𝑣(𝑖)=2𝑗+1,if𝑗<𝑏,2𝑙(𝑎𝑗)+1,if𝑗>𝑎𝑏,with𝑗=𝑖mod(𝑎+1),2𝑏,otherwise,(2.9)(𝑖)=𝑙𝑣(𝑖+𝑏).(2.10) For example, the alternate application of 𝑙 and 𝑙𝑣 to the vertices obtained for the polygon 𝑃 in Remark 2.1(4) gives the following sequence of edge lengths: 8,3,5,7,1,8,3,5,7,1.(2.11)
(3) If 𝑒 has even length, then its adjacent edges lie on distinct semiplanes with respect to the line containing 𝑒, otherwise they are to the same side of such a line.
The link 𝑎,𝑏 is constructed in such a way that 𝒫𝑎,𝑏 is the projection of 𝑎,𝑏 on the plane 𝑥=0, under the mapping (𝑥,𝑦,𝑧)(0,𝑦,𝑧). Let 𝐾𝑖𝑎,𝑏 be the component knot whose projection is the polygon 𝑃𝑖𝒫𝑎,𝑏 trough vertex 𝑖{0,1,,𝑐1}, with 𝑐 as defined in the preceding lemma. We orient 𝑃𝑖 by departing from 𝑖 to the right, that is, following the cycle 𝑖,(𝑖),,𝑖. The knot 𝐾𝑖 is an axis-aligned polygon whose vertices lie on the planes 𝑥=0 and 𝑥=1/2, with 𝑖 as the starting vertex. In turn, this polygon is a concatenation of “sections,’’ which are planar polygonal curves corresponding to the edges of 𝑃𝑖, similar to that shown in Figure 3(b).
The section 𝑠 related to a directed edge 𝑒 is a concatenation of |𝑒| “pieces’’ like the three shown in Figure 3(c); 𝑠 begins with a horizontal piece, which belongs either to the plane 𝑥=0 or to the plane 𝑥=1/2 and is followed by |𝑒|1 alternate occurrences of the other two pieces. If we split the first piece at its midpoint, 𝑠 can be seen as a directed polygonal composed of line segments of constant length (1/2), as delineated in Figure 4(a) which also shows the code obtained by means of (A.1) for each vertex apart from the first and fourth ones, whose codes 𝑝 and 𝑞 remain unknown until we have the placement of 𝑠 along the knot (but 𝑞0 since 𝑞 labels a right angle). Thus, in formal language terminology, a section is a chain over Σ={0,1,2,3,4} of the form either 𝑝0 or 𝑝00𝑞2(042), where 𝑝,𝑞Σ and 𝑞0, with the interpretation given in A. Figures 4(b)–4(f) show some configurations that correspond to five of the 20 possible values for the pair (𝑝,𝑞). Next we will prove that only the first two illustrated cases occur in 𝐾𝑖.

804829.fig.004
Figure 4: (a) Chain code for a section of a link. To calculate 𝑝 and 𝑞, a corresponding right angle of reference is needed; the configurations (b) to (f) illustrate the cases (𝑝,𝑞)=(4,1), (3,1), (4,3), (1,3); and (2,3).

Lemma 2.5. Let 𝑒 be an edge of 𝑃𝑖 and let 𝑠 be the section of 𝐾𝑖 corresponding to 𝑒. Then, 𝑠 has 𝑝=3 or 4, and, if |𝑒|>1, 𝑞=1.

Proof. The proof goes by induction on the position of 𝑠 along 𝐾𝑖. If 𝑠 is the first section of 𝐾𝑖, then its initial point is vertex 𝑖 which, by Remark 2.4(2.1), lies on the lower left side of 𝑅𝑎,𝑏. Thus, the right angle previous to 𝑖 along 𝐾𝑖 must belong to one of the two configurations shown in Figures 4(b)-4(c), depending on the length 𝑑 of the edge of 𝑃𝑖 previous to 𝑒; if 𝑑=1, then 𝑝=4, and if 𝑑>1, then 𝑝=3. Furthermore, if |𝑒|>1 (thus there is a point for 𝑞 in 𝑠), 𝑞=1 in both cases.
Now, suppose by induction that a section 𝑠 satisfies the lemma. We want to show that the section 𝑠 next to 𝑠 also satisfies the lemma. Let 𝑠 be the section previous to 𝑠. The induction hypothesis implies that the configuration for 𝑠 and 𝑠 must be one of those in Figures 4(b)-4(c), up to a rotation. Suppose |𝑒| is odd; then, as a consequence of Remark 2.4(3), 𝑠 and 𝑠 are to the same side of the plane containing 𝑠 and, since 𝑠 jumps |𝑒|1 times between the planes 𝑥=0 and 𝑥=1/2, the end points of 𝑠 lie both in the same of these planes; therefore, the configuration determined by 𝑠 and 𝑠 must be also, up to a rotation, one of those shown in Figures 4(b)-4(c). On the other hand, if |𝑒| is even, from the same remark it follows that 𝑠 and 𝑠 are in opposite sides of the plane of 𝑠 and, since now |𝑒|1 is odd, the end points of 𝑠 lie one in the plane 𝑥=0 and the other in the plane 𝑥=1/2, facts that lead to the same conclusion obtained in the first case.

Corollary 2.6. Let 𝑒 and 𝑒 be two successive edges of 𝑃𝑖, of lengths 𝑑 and 𝑑, respectively. Then the chain code of the section 𝑠 in 𝐾𝑖 corresponding to 𝑒 is given by the following function: 𝜅𝑑=,𝑑40if𝑑=1,𝑑=1,30if𝑑>1,𝑑=1,40012(042)𝑑2if𝑑=1,𝑑>1,30012(042)𝑑2if𝑑>1,𝑑>1.(2.12)

The following program, written in Haskell language [11, 12], is a computable version of the function 𝜅:𝑑𝑠𝑒𝑐𝑡𝑖𝑜𝑛,𝑑=𝑐𝑜𝑛𝑐𝑎𝑡𝐢𝐟𝑑==1𝐭𝐡𝐞𝐧"40"𝐞𝐥𝐬𝐞"30"𝑡𝑎𝑘𝑒(𝑑1)("012"𝑟𝑒𝑝𝑒𝑎𝑡"042")),(2.13)

For example, section(1,8) evaluates to “40012042042042042042042”. The next function calculates the chain code for 𝐾𝑖:𝑑𝑐𝑎𝑖𝑛𝑖=𝑐𝑜𝑛𝑐𝑎𝑡𝑠𝑒𝑐𝑡𝑖𝑜𝑛𝑑,𝑑,𝑑𝑠𝑖𝑑𝑒_𝑙𝑒𝑛𝑔𝑡_𝑝𝑎𝑖𝑟𝑠𝑖,(2.14) where 𝑠𝑖𝑑𝑒_𝑙𝑒𝑛𝑔𝑡_𝑝𝑎𝑖𝑟𝑠𝑖 gives the list of pairs (𝑑,𝑑) needed to compute the successive sections of 𝐾𝑖. The definitions of these functions, as well as those for 𝑣, , 𝑙𝑣, 𝑙, 𝑛, 𝑐, and 𝑏, are local to the main function, which computes the list of strings of code for the 𝑐 cycles of the link 𝑎,𝑏:[[,𝑐𝑎𝑟𝑝𝑒𝑡𝑎𝑏=𝑐𝑎𝑖𝑛𝑖𝑖0𝑐1]](2.15) The complete definition of this program is presented in Appendix B.

3. Results

In order to probe our proposed method, we present some examples of alternating-knot generation. Figure 5 illustrates an example of an alternating knot of 22×12 (𝑎=22, 𝑏=12).

804829.fig.005
Figure 5: An example of an alternating knot of 22×12.

The chain of the alternating knot shown in Figure 5 is as follows:

400120420420420420420420420420420420420420420420420420420420423001204230

012042042042042042042042042042042042042042042042042042300120420420423001

204204204204204204204204204204204204204204204230012042042042042042300120

420420420420420420420420420420420420423001204204204204204204204230012042

042042042042042042042042042042300120420420420420420420420420423001204204

204204204204204204204230012042042042042042042042042042042042300120420420

420420420420423001204204204204204204204204204204204204204230012042042042

042042300120420420420420420420420420420420420420420420423001204204204230

012042042042042042042042042042042042042042042042042042300120423001204204

204204204204204204204204204204204204204204204204204230400120420420420420

420420420420420420420420420420420420420420420423040012042042042042042042

042042042042042042042042042042042042042300120423001204204204204204204204

204204204204204204204204204204230012042042042300120420420420420420420420

420420420420420420420423001204204204204204230012042042042042042042042042

042042042042042300120420420420420420420423001204204204204204204204204204

204204230012042042042042042042042042042300120420420420420420420420420423

001204204204204204204204204204204204230012042042042042042042042300120420

420420420420420420420420420420420423001204204204204204230012042042042042

042042042042042042042042042042042300120420420423001204204204204204204204

204204204204204204204204204204230012042300120420420420420420420420420420

420420420420420420420420420423040012042042042042042042042042042042042042

04204204204204204204204230.

If we replace the chain elements 1 by the chain elements 3 and vice versa in the above-mentioned chain, we obtain the mirroring image [2] of the alternating knot illustrated in Figure 5.

Figure 6 illustrates another example of an alternating knot of 50×25 using the proposed method.

804829.fig.006
Figure 6: An example of an alternating knot of 50×25.

4. Conclusions

We have presented a modest attempt for generating alternating knots which are represented by means of chain coding. The chain-code representation of alternating knots preserves information and allows a considerable data reduction. Also, the mirror images of alternating knots are obtained in an easy way.

Appendices

A. The Chain Code

In order to have a self-contained paper, we summarize the main concepts and definitions of the used chain code. In the content of this paper, we use this chain code to represent complex knots.

Definition A.1. A discrete knot 𝐾𝐷 is the digitalized representation of a knot 𝐾 and is composed of constant orthogonal straight-line segments, whose direction changes are described as a chain.

Definition A.2. A chain 𝐴 is a finite sequence of elements and is represented by 𝐴=𝑎1𝑎2𝑎𝑛={𝑎𝑖1𝑖𝑛}, where 𝑛 indicates the length of the chain.

The chain elements for a discrete knot are obtained by calculating the relative orthogonal direction changes of the contiguous constant straight-line segments along the knot. There are only five possible orthogonal direction changes [13, 14] for representing any discrete knot. Thus, each discrete knot is represented by a chain of elements. Figure 7(b) illustrates an example of a discrete complex knot.

fig7
Figure 7: An example of a complex knot.

An element 𝑎𝑖 of a chain, taken from the set {0,1,2,3,4}, labels a vertex of the discrete knot and indicates the orthogonal direction change of the polygonal path in such a vertex. Figure 7(a) summarizes the rules for labeling the vertices: to a straight-angle vertex, a 0 is attached; to a right-angle vertex corresponds one of the other labels, depending on the position of such an angle with respect to the preceding right angle in the polygonal path.

In order to improve the understanding of the chain elements, we have colored the straight-line segments which are defined by their corresponding chain elements. Thus, the straight-line segment defined by the chain element 0 in green, 1 in cyan, 2 in yellow, 3 in magenta, and 4 in red, respectively. This is valid for the web version of the paper; however, the gray-level version of the paper also allows us to understand the above-mentioned notation. Formally, if the consecutive sides of the reference angle have respective directions 𝐛 and 𝐜 (see Figure 7(a)), and the side from the vertex to be labeled has direction 𝐝 (here, by direction we understand a unit vector), then the label or chain element is given by the following function, where × denotes the vector product in 3:𝑐𝑎𝑖𝑛_𝑒𝑙𝑒𝑚𝑒𝑛𝑡(𝐛,𝐜,𝐝)=0if𝐝=𝐜,(ingreen),1if𝐝=𝐛×𝐜,(incyan),2if𝐝=𝐛,(inyellow),3if𝐝=(𝐛×𝐜),(inmagenta),4if𝐝=𝐛,(inred).(A.1)

Thus, the procedure to find the chain of a discrete knot is as follows.(i)Select an arbitrary vertex of the discrete knot as the origin. Also, select a direction for traveling around the discrete knot. Figure 7(b) illustrates the selected origin which is represented by a sphere. Also, the selected direction is to the right.(ii)Compute the chain elements of the discrete knot. Figure 7(b) shows the first element of the chain which corresponds to the element 0. The second element corresponds to the chain element 0, too. The third element corresponds to the chain element 1. Note that when we are traveling around a discrete knot, in order to obtain its chain elements and find zero elements, we need to know what nonzero element (labeling a right angle) was the last one in order to define the next element. Finally, we obtain the following chain:00120420423040012042300120423040012042042304001204230012042304.(A.2)

The main characteristics of this chain code are as follows.(i)It is invariant under translation and rotation. This is due to the fact that only relative orthogonal direction changes are used.(ii) In this code, there are only five possible orthogonal direction changes for representing any discrete knot, this produces a numerical string of finite length over a finite alphabet, allowing the usage of grammatical techniques for complex-knot generation.(iii)Using this code, it is possible to obtain the mirror image of a discrete knot with ease. The chain of the mirror image of a discrete knot is another chain (termed the reflected chain) whose elements 1 are replaced by elements 3 and vice versa. This replacement does not depend on the orthogonal reflecting plane used, it is valid for the three possible orthogonal mirroring planes. We do not prove this, only we illustrate it [13].

A complete review of the above-mentioned code can be found in [2, 13].

B. The Program

Here is the function 𝑐𝑎𝑟𝑝𝑒𝑡that computes the links presented in Section 2. Let 𝑎,𝑏; if 0<𝑏𝑎, (𝑐𝑎𝑟𝑝𝑒𝑡𝑎𝑏) returns the list of chains of code for the knots of 𝑎,𝑏, otherwise the returned list is empty.

𝑐𝑎𝑟𝑝𝑒𝑡𝑎𝑏=𝐢𝐟0<𝑏𝑎𝐭𝐡𝐞𝐧[𝑐𝑎𝑖𝑛𝑖𝑖[0𝑐1]]𝐞𝐥𝐬𝐞[]
 where
  𝑚=𝑎+1;𝑛=2×𝑚;𝑐=𝑔𝑐𝑑𝑚𝑏;𝑏=min𝑏(𝑚𝑏)
  𝑣𝑖=𝑛1𝑖See (2.1)
  𝑖=(2×𝑏1𝑖)mod𝑛—See (2.2)
  𝑙𝑣𝑖𝑗<𝑏=2×𝑗+1—See (2.9)
   𝑗>𝑎𝑏=2×(𝑎𝑗)+1
   otherwise=2×𝑏
   where 𝑗=𝑖mode𝑚
  𝑙𝑖=𝑙𝑣(𝑖+𝑏)—See (2.10)
  𝑐𝑦𝑐𝑙𝑒𝑖=𝑡𝑎𝑘𝑒(𝑛div𝑐)(𝑖𝑡𝑒𝑟𝑎𝑡𝑒2𝑣𝑖)—See Remark 2.1(4)
  𝑠𝑖𝑑𝑒_𝑙𝑒𝑛𝑔𝑡𝑠𝑖=𝑚𝑎𝑝2𝑙𝑙𝑣(𝑐𝑦𝑐𝑙𝑒𝑖)—See Remark 2.4(2)
  𝑠𝑖𝑑𝑒_𝑙𝑒𝑛𝑔𝑡_𝑝𝑎𝑖𝑟𝑠𝑖=𝑧𝑖𝑝(𝑙𝑎𝑠𝑡𝑑𝑠𝑑𝑠)𝑑𝑠
          where𝑑𝑠=𝑠𝑖𝑑𝑒_𝑙𝑒𝑛𝑔𝑡𝑠𝑖
  𝑠𝑒𝑐𝑡𝑖𝑜𝑛(𝑑,𝑑)=𝑐𝑜𝑛𝑐𝑎𝑡((𝐢𝐟𝑑==1𝐭𝐡𝐞𝐧40"𝐞𝐥𝐬𝐞30")—See (2.12)
            𝑡𝑎𝑘𝑒(𝑑1)(012"𝑟𝑒𝑝𝑒𝑎𝑡042"))
  𝑐𝑎𝑖𝑛𝑖=𝑐𝑜𝑛𝑐𝑎𝑡[𝑠𝑒𝑐𝑡𝑖𝑜𝑛(𝑑,𝑑)(𝑑,𝑑)𝑠𝑖𝑑𝑒_𝑙𝑒𝑛𝑔𝑡_𝑝𝑎𝑖𝑟𝑠𝑖]

The functions 𝑖𝑡𝑒𝑟𝑎𝑡𝑒2and 𝑚𝑎𝑝2have definitions similar to those of the standard functions 𝑖𝑡𝑒𝑟𝑎𝑡𝑒 and map provided by Haskell. The invocation (𝑖𝑡𝑒𝑟𝑎𝑡𝑒2𝑓𝑔𝑥) returns the infinite list [𝑥,𝑓𝑥,𝑔(𝑓𝑥),𝑓(𝑔(𝑓𝑥)),] of repeated and alternate applications of 𝑓 and 𝑔 to 𝑥:[𝑎]𝑖𝑡𝑒𝑟𝑎𝑡𝑒2(𝑎𝑎)(𝑎𝑎)𝑎𝑖𝑡𝑒𝑟𝑎𝑡𝑒2𝑓𝑔𝑥=𝑥𝑖𝑡𝑒𝑟𝑎𝑡𝑒2𝑔𝑓(𝑓𝑥)(B.1) and (𝑚𝑎𝑝2𝑓𝑔[𝑥0,𝑥1,𝑥2,𝑥3,]) returns the list [𝑓𝑥0,𝑔𝑥1,𝑓𝑥2,𝑔𝑥3,] of alternate applications of 𝑓 and 𝑔 to the successive elements of the list [𝑥0,𝑥1,𝑥2,𝑥3,]:[𝑎][𝑏]=𝑚𝑎𝑝2(𝑎𝑏)(𝑎𝑏)𝑚𝑎𝑝2𝑓𝑔[][]𝑚𝑎𝑝2𝑓𝑔(𝑥𝑥𝑠)=𝑓𝑥𝑚𝑎𝑝2𝑔𝑓𝑥𝑠.(B.2)

Acknowledgment

The authors wish to express their gratitude to Guillermo Rojas for his help in generating patterns of alternating knots.

References

  1. C. Livingston, Knot Theory, vol. 24, Mathematical Association of America, Washington, DC, USA, 1993.
  2. E. Bribiesca, “A method for computing families of discrete knots using knot numbers,” Journal of Knot Theory and Its Ramifications, vol. 14, no. 4, pp. 405–424, 2005. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  3. Y. Diao, “Minimal knotted polygons on the cubic lattice,” Journal of Knot Theory and Its Ramifications, vol. 2, no. 4, pp. 413–425, 1993. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  4. Y. Diao, “The number of smallest knots on the cubic lattice,” Journal of Statistical Physics, vol. 74, no. 5-6, pp. 1247–1254, 1994. View at Publisher · View at Google Scholar · View at Zentralblatt MATH
  5. E. J. J. van Rensburg and S. D. Promislow, “Minimal knots in the cubic lattice,” Journal of Knot Theory and Its Ramifications, vol. 4, no. 1, pp. 115–130, 1995. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  6. B. Hayes, “Square knots,” American Scientist, vol. 85, no. 6, pp. 506–510, 1997. View at Scopus
  7. L. H. Kauffman, “Virtual knot theory,” European Journal of Combinatorics, vol. 20, no. 7, pp. 663–690, 1999. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  8. A. Nakamura and A. Rosenfeld, “Digital knots,” Pattern Recognition, vol. 33, no. 9, pp. 1541–1553, 2000. View at Publisher · View at Google Scholar · View at Scopus
  9. F. Harary, Graph Theory, Addison-Wesley, 1969.
  10. C. R. Jordan and D. A. Jordan, Groups, Arnold, London, UK, 1994.
  11. R. Bird, Introduction to Functional Programming Using Haskell, Prentice Hall, 1998.
  12. S. P. Jones, Ed., Haskell 98 Language and Libraries. The Revised Report, 2002, http://haskell.org.
  13. E. Bribiesca, “A chain code for representing 3D curves,” Pattern Recognition, vol. 33, no. 5, pp. 755–765, 2000. View at Publisher · View at Google Scholar · View at Scopus
  14. A. Guzmán, “Canonical shape description for 3-d stick bodies,” Tech. Rep. ACA-254-87, MCC, Austin, Tex, USA, 1987.