Knots - Knot Theory

Skip to content
Back to top
View this page
Edit this page

# Knots

AUTHORS:

- Miguel Angel Marco Buzunariz

- Amit Jamadagni

class sage.knots.knot.Knot(data, check=True)

  Bases: `Link`, `Element`

  A knot.

  A knot is defined as embedding of the circle \(\mathbb{S}^1\) in the 3-dimensional sphere \(\mathbb{S}^3\), considered up to ambient isotopy. They represent the physical idea of a knotted rope, but with the particularity that the rope is closed. That is, the ends of the rope are joined.

  See also

  `Link`

  INPUT:

  - `data` – see `Link` for the allowable inputs

  - `check` – boolean (default: `True`); if `True`, make sure that the data define a knot, not a link

  EXAMPLES:

  We construct the knot \(8_{14}\) and compute some invariants:

  Sage

      sage: B = BraidGroup(4)
      sage: K = Knot(B([1,1,1,2,-1,2,-3,2,-3]))

  Python

      >>> from sage.all import *
      >>> B = BraidGroup(Integer(4))
      >>> K = Knot(B([Integer(1),Integer(1),Integer(1),Integer(2),-Integer(1),Integer(2),-Integer(3),Integer(2),-Integer(3)]))

  Sage

      sage: K.alexander_polynomial()
      -2*t^-2 + 8*t^-1 - 11 + 8*t - 2*t^2
      sage: K.jones_polynomial()
      t^7 - 3*t^6 + 4*t^5 - 5*t^4 + 6*t^3 - 5*t^2 + 4*t + 1/t - 2
      sage: K.determinant()
      31
      sage: K.signature()
      -2
      sage: K.colored_jones_polynomial(2)  # long time
      q^-1 - 2 + 4*q - 5*q^2 + 6*q^3 - 5*q^4 + 4*q^5 - 3*q^6 + q^7

  [Python]

      >>> from sage.all import *
      >>> K.alexander_polynomial()
      -2*t^-2 + 8*t^-1 - 11 + 8*t - 2*t^2
      >>> K.jones_polynomial()
      t^7 - 3*t^6 + 4*t^5 - 5*t^4 + 6*t^3 - 5*t^2 + 4*t + 1/t - 2
      >>> K.determinant()
      31
      >>> K.signature()
      -2
      >>> K.colored_jones_polynomial(Integer(2))  # long time
      q^-1 - 2 + 4*q - 5*q^2 + 6*q^3 - 5*q^4 + 4*q^5 - 3*q^6 + q^7

  REFERENCES:

  - Wikipedia article Knot_(mathematics)

  arf_invariant()

    Return the Arf invariant.

    EXAMPLES:

    Sage

        sage: B = BraidGroup(4)
        sage: K = Knot(B([-1, 2, 1, 2]))
        sage: K.arf_invariant()
        0
        sage: B = BraidGroup(8)
        sage: K = Knot(B([-2, 3, 1, 2, 1, 4]))
        sage: K.arf_invariant()
        0
        sage: K = Knot(B([1, 2, 1, 2]))
        sage: K.arf_invariant()
        1

    Python

        >>> from sage.all import *
        >>> B = BraidGroup(Integer(4))
        >>> K = Knot(B([-Integer(1), Integer(2), Integer(1), Integer(2)]))
        >>> K.arf_invariant()
        0
        >>> B = BraidGroup(Integer(8))
        >>> K = Knot(B([-Integer(2), Integer(3), Integer(1), Integer(2), Integer(1), Integer(4)]))
        >>> K.arf_invariant()
        0
        >>> K = Knot(B([Integer(1), Integer(2), Integer(1), Integer(2)]))
        >>> K.arf_invariant()
        1

  colored_jones_polynomial(N, variab=None, try_inverse=True)

    Return the colored Jones polynomial of the trace closure of the braid.

    INPUT:

    - `N` – integer; the number of colors

    - `variab` – (default: \(q\)) the variable in the resulting Laurent polynomial

    - `try_inverse` – boolean (default: `True`); if `True`, attempt a faster calculation by using the inverse of the braid

    ALGORITHM:

    The algorithm used is described in [HL2018] for the corresponding braid representation. We follow their notation, but work in a suitable free algebra over a Laurent polynomial ring in one variable to simplify bookkeeping.

    EXAMPLES:

    Sage

        sage: W = Knots()
        sage: K = W.from_dowker_code([-4,-6,-2])
        sage: K.colored_jones_polynomial(2)
        -q^-4 + q^-3 + q^-1
        sage: K.colored_jones_polynomial(2, 't')
        -t^-4 + t^-3 + t^-1
        sage: R.<t> = LaurentPolynomialRing(ZZ)
        sage: K.colored_jones_polynomial(2, -t)
        -t^-4 - t^-3 - t^-1

        sage: R.<t> = ZZ[]
        sage: K.colored_jones_polynomial(2, t+1)
        (t^3 + 3*t^2 + 4*t + 1)/(t^4 + 4*t^3 + 6*t^2 + 4*t + 1)

    Python

        >>> from sage.all import *
        >>> W = Knots()
        >>> K = W.from_dowker_code([-Integer(4),-Integer(6),-Integer(2)])
        >>> K.colored_jones_polynomial(Integer(2))
        -q^-4 + q^-3 + q^-1
        >>> K.colored_jones_polynomial(Integer(2), 't')
        -t^-4 + t^-3 + t^-1
        >>> R = LaurentPolynomialRing(ZZ, names=('t',)); (t,) = R._first_ngens(1)
        >>> K.colored_jones_polynomial(Integer(2), -t)
        -t^-4 - t^-3 - t^-1

        >>> R = ZZ['t']; (t,) = R._first_ngens(1)
        >>> K.colored_jones_polynomial(Integer(2), t+Integer(1))
        (t^3 + 3*t^2 + 4*t + 1)/(t^4 + 4*t^3 + 6*t^2 + 4*t + 1)

  connected_sum(other)

    Return the oriented connected sum of `self` and `other`.

    Note

    We give the knots an orientation based upon the braid representation.

    INPUT:

    - `other` – a knot

    OUTPUT: a knot equivalent to the connected sum of `self` and `other`

    EXAMPLES:

    Sage

        sage: B = BraidGroup(2)
        sage: trefoil = Knot(B([1,1,1]))
        sage: K = trefoil.connected_sum(trefoil); K
        Knot represented by 6 crossings
        sage: K.braid()
        s0^3*s1^-1*s0^3*s1

    Python

        >>> from sage.all import *
        >>> B = BraidGroup(Integer(2))
        >>> trefoil = Knot(B([Integer(1),Integer(1),Integer(1)]))
        >>> K = trefoil.connected_sum(trefoil); K
        Knot represented by 6 crossings
        >>> K.braid()
        s0^3*s1^-1*s0^3*s1

    Sage

        sage: rev_trefoil = Knot(B([-1,-1,-1]))
        sage: K2 = trefoil.connected_sum(rev_trefoil); K2
        Knot represented by 6 crossings
        sage: K2.braid()
        s0^3*s1^-1*s0^-3*s1

    [Python]

        >>> from sage.all import *
        >>> rev_trefoil = Knot(B([-Integer(1),-Integer(1),-Integer(1)]))
        >>> K2 = trefoil.connected_sum(rev_trefoil); K2
        Knot represented by 6 crossings
        >>> K2.braid()
        s0^3*s1^-1*s0^-3*s1

    Observe that both knots have according `dowker_notation` (showing that the constructing from DT-code may not be unique for non prime knots, see `from_dowker_code()`):

    Sage

        sage: K.dowker_notation()
        [(4, 1), (2, 5), (6, 3), (10, 7), (8, 11), (12, 9)]
        sage: K2.dowker_notation()
        [(4, 1), (2, 5), (6, 3), (7, 10), (11, 8), (9, 12)]
        sage: K.homfly_polynomial() == K2.homfly_polynomial()
        False

    Python

        >>> from sage.all import *
        >>> K.dowker_notation()
        [(4, 1), (2, 5), (6, 3), (10, 7), (8, 11), (12, 9)]
        >>> K2.dowker_notation()
        [(4, 1), (2, 5), (6, 3), (7, 10), (11, 8), (9, 12)]
        >>> K.homfly_polynomial() == K2.homfly_polynomial()
        False

    REFERENCES:

    - Wikipedia article Connected_sum

  dt_code()

    Return the DT code of `self`.

    ALGORITHM:

    The DT code is generated by the following way:

    Start moving along the knot, as we encounter the crossings we start numbering them, so every crossing has two numbers assigned to it once we have traced the entire knot. Now we take the even number associated with every crossing.

    The following sign convention is to be followed:

    Take the even number with a negative sign if it is an overcrossing that we are encountering.

    OUTPUT: DT code representation of the knot

    EXAMPLES:

    Sage

        sage: K = Knot([[1,5,2,4],[5,3,6,2],[3,1,4,6]])
        sage: K.dt_code()
        [4, 6, 2]

        sage: B = BraidGroup(4)
        sage: K = Knot(B([1, 2, 1, 2]))
        sage: K.dt_code()
        [4, -6, 8, -2]

        sage: K = Knot([[[1, -2, 3, -4, 5, -1, 2, -3, 4, -5]],
        ....:          [1, 1, 1, 1, 1]])
        sage: K.dt_code()
        [6, 8, 10, 2, 4]

    Python

        >>> from sage.all import *
        >>> K = Knot([[Integer(1),Integer(5),Integer(2),Integer(4)],[Integer(5),Integer(3),Integer(6),Integer(2)],[Integer(3),Integer(1),Integer(4),Integer(6)]])
        >>> K.dt_code()
        [4, 6, 2]

        >>> B = BraidGroup(Integer(4))
        >>> K = Knot(B([Integer(1), Integer(2), Integer(1), Integer(2)]))
        >>> K.dt_code()
        [4, -6, 8, -2]

        >>> K = Knot([[[Integer(1), -Integer(2), Integer(3), -Integer(4), Integer(5), -Integer(1), Integer(2), -Integer(3), Integer(4), -Integer(5)]],
        ...          [Integer(1), Integer(1), Integer(1), Integer(1), Integer(1)]])
        >>> K.dt_code()
        [6, 8, 10, 2, 4]

class sage.knots.knot.Knots

  Bases: `Singleton`, `Parent`

  The set for all knots, as a monoid for the connected sum.

  Element

    alias of `Knot`

  an_element()

    Return the trefoil knot.

    EXAMPLES:

    Sage

        sage: Knots().an_element()
        Knot represented by 3 crossings

    Python

        >>> from sage.all import *
        >>> Knots().an_element()
        Knot represented by 3 crossings

  from_dowker_code(code)

    Build a knot from a Dowker-Thistlethwaite code.

    The Dowker-Thistlethwaite code of a knot diagram is defined as follows.

    Start following the knot diagram at some regular point. Label the crossings by a number (starting from number 1) in the order in which they are met. At the end, every crossing gets numbered twice, once by an even number and once by an odd number. When meeting an over-crossing with even number, use instead the negative of this even number as label.

    Then the set of crossings gives a set of pairs (odd, even). Sort this set according to the odd component, and then keep only the even components in the same order. This is the Dowker-Thistlethwaite code.

    INPUT:

    - `code` – list of signed even numbers; the Dowker-Thistlethwaite code of a knot

    OUTPUT: a knot

    Warning

    In general the Dowker-Thistlethwaite code does not describe a knot uniquely. It is not only insensitive on mirror images, but may also mix up non prime knots. For example `[4, 6, 2, 10, 12, 8]` describes the connected sum of two trefoil knots, as well as the connected sum of a trefoil with its mirror (see the corresponding example in the documentation of `connected_sum()`).

    EXAMPLES:

    Sage

        sage: W = Knots()
        sage: K1 = W.from_dowker_code([8,10,2,12,4,6])
        sage: K1.dowker_notation()
        [(5, 2), (9, 4), (11, 6), (1, 8), (3, 10), (7, 12)]

        sage: W.from_dowker_code([6,10,14,12,16,2,18,4,8])
        Knot represented by 9 crossings

        sage: W.from_dowker_code([4,8,10,-14,2,-16,-18,-6,-12])
        Knot represented by 9 crossings

        sage: K3 = W.from_dowker_code([6,-12,2,8,-4,-10]); K3
        Knot represented by 6 crossings
        sage: K3.dowker_notation()
        [(5, 2), (4, 9), (1, 6), (7, 8), (10, 11), (12, 3)]

    Python

        >>> from sage.all import *
        >>> W = Knots()
        >>> K1 = W.from_dowker_code([Integer(8),Integer(10),Integer(2),Integer(12),Integer(4),Integer(6)])
        >>> K1.dowker_notation()
        [(5, 2), (9, 4), (11, 6), (1, 8), (3, 10), (7, 12)]

        >>> W.from_dowker_code([Integer(6),Integer(10),Integer(14),Integer(12),Integer(16),Integer(2),Integer(18),Integer(4),Integer(8)])
        Knot represented by 9 crossings

        >>> W.from_dowker_code([Integer(4),Integer(8),Integer(10),-Integer(14),Integer(2),-Integer(16),-Integer(18),-Integer(6),-Integer(12)])
        Knot represented by 9 crossings

        >>> K3 = W.from_dowker_code([Integer(6),-Integer(12),Integer(2),Integer(8),-Integer(4),-Integer(10)]); K3
        Knot represented by 6 crossings
        >>> K3.dowker_notation()
        [(5, 2), (4, 9), (1, 6), (7, 8), (10, 11), (12, 3)]

    See also

    `dowker_notation()`

    REFERENCES:

    - Wikipedia article Dowker_notation

    - http://katlas.org/wiki/DT_(Dowker-Thistlethwaite)_Codes

  from_gauss_code(gauss)

    Build a knot from a signed Gauss code.

    This makes some arbitrary choice of orientation.

    INPUT:

    - `gauss` – a signed Gauss code

    OUTPUT: a knot

    EXAMPLES:

    Sage

        sage: W = Knots()
        sage: K1 = W.from_gauss_code([2, -1, 3, -2, 1, -3])
        sage: K1.alexander_polynomial()
        t^-1 - 1 + t

    Python

        >>> from sage.all import *
        >>> W = Knots()
        >>> K1 = W.from_gauss_code([Integer(2), -Integer(1), Integer(3), -Integer(2), Integer(1), -Integer(3)])
        >>> K1.alexander_polynomial()
        t^-1 - 1 + t

  from_table(n, k)

    Return a knot from its index in the Rolfsen table.

    INPUT:

    - `n` – the crossing number

    - `k` – positive integer

    OUTPUT: the knot \(K_{n,k}\) in the Rolfsen table

    EXAMPLES:

    Sage

        sage: K1 = Knots().from_table(6,3); K1
        Knot represented by 6 crossings
        sage: K1.alexander_polynomial()
        t^-2 - 3*t^-1 + 5 - 3*t + t^2

        sage: K2 = Knots().from_table(8,4); K2
        Knot represented by 9 crossings
        sage: K2.determinant()
        19
        sage: K2.signature()
        2

        sage: K3 = Knots().from_table(10,56); K3
        Knot represented by 11 crossings
        sage: K3.jones_polynomial()
        t^10 - 3*t^9 + 6*t^8 - 9*t^7 + 10*t^6 - 11*t^5 + 10*t^4 - 7*t^3
        + 5*t^2 - 2*t + 1

        sage: K4 = Knots().from_table(10,100)
        sage: K4.genus()
        4

    Python

        >>> from sage.all import *
        >>> K1 = Knots().from_table(Integer(6),Integer(3)); K1
        Knot represented by 6 crossings
        >>> K1.alexander_polynomial()
        t^-2 - 3*t^-1 + 5 - 3*t + t^2

        >>> K2 = Knots().from_table(Integer(8),Integer(4)); K2
        Knot represented by 9 crossings
        >>> K2.determinant()
        19
        >>> K2.signature()
        2

        >>> K3 = Knots().from_table(Integer(10),Integer(56)); K3
        Knot represented by 11 crossings
        >>> K3.jones_polynomial()
        t^10 - 3*t^9 + 6*t^8 - 9*t^7 + 10*t^6 - 11*t^5 + 10*t^4 - 7*t^3
        + 5*t^2 - 2*t + 1

        >>> K4 = Knots().from_table(Integer(10),Integer(100))
        >>> K4.genus()
        4

    REFERENCES:

    - KnotAtlas, http://katlas.math.toronto.edu/wiki/The_Rolfsen_Knot_Table

  one()

    Return the unit of the monoid.

    This is the trivial knot.

    EXAMPLES:

    Sage

        sage: Knots().one()
        Knot represented by 0 crossings

    Python

        >>> from sage.all import *
        >>> Knots().one()
        Knot represented by 0 crossings