:

## Alexander polynomial and knot diagram from Dowker notation

Here's a simple package for drawing knot diagrams and computing the Alexander polynomial. A typical usage case for the AlexanderPolynomial function is when a knot needs to be identified and only a visual representation of the knot is available. Then it's trivial to write down the Dowker sequence by hand and then the sequence can be used as an input for this package. The KnotDiagram function also takes the Dowker sequence as an input.

TorusKnot(p, q) and PretzelKnot(p, q, r) are accepted as an input as well and can also be passed to the DowkerNotation function.

The algorithm is fairly simple, it works as follows: represent each double point as a quadrilateral (two 'in' vertices and two 'out' vertices); connect the quads according to the Dowker specification; draw the result as a planar graph; erase the sides of each quad and draw its diagonals instead. This draws the intersections corresponding to the double points and guarantees that there are no other intersections. The knot polynomial is then computed from the diagram.

The diagrams work fairly well for pretzel knots, but for certain knots they can be difficult to read because some of the quads around the double points can become too small or too skewed. Also, the code doesn't check that the generated quadrilaterals are convex (which is an implicit assumption in the algorithm).

knot.txt

knot.mw

 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 >
 (6)
 >
 (7)
 >
 (8)
 >
 >
 (9)
 >
 (10)
 >
 >
 (11)
 >
 (12)