Skip to main content
Ctrl+K
KnotPy  documentation - Home KnotPy  documentation - Home
  • Install
  • Tutorial
  • Notation (knot, links, and knotted graphs encoding via EM and PD codes)
  • Reference
  • Examples
  • GitHub
  • Install
  • Tutorial
  • Notation (knot, links, and knotted graphs encoding via EM and PD codes)
  • Reference
  • Examples
  • GitHub

Section Navigation

  • Notation (knot, links, and knotted graphs encoding via EM and PD codes)

Notation (knot, links, and knotted graphs encoding via EM and PD codes)#

Description of two key diagram encodings that KnotPy supports natively for knots, links, and spatial graphs: - EM code (Ewing–Millett code) [1] - PD code (Planar Diagram code) [2]

Both encodings are supported by KnotPy, though the internal representation is structured most closely to EM codes.—

Definitions and Examples#

### EM Code

The Ewing–Millett (EM) code denotes how arcs connect at each crossing using adjacency lists:

  • Represented as a dictionary where each node’s value is a list of tuples in CCW order: (adjacent_node, position).

  • Condensed string format example: A graph C / A—B—D yields:

References#

[1]
  1. Ewing and K. C. Millett. *A load balanced algorithm for the calculation of the polynomial knot and link invariants* (1991). In: The Mathematical Heritage of C. F. Gauss.

[2]
  1. Mastin. *Links and Planar Diagram Codes* (2015). J. Knot Theory Ramifications.

On this page
  • Definitions and Examples
  • References

© Copyright 2025, Boštjan Gabrovšek.

Created using Sphinx 8.2.3.

Built with the PyData Sphinx Theme 0.16.1.