Problem with HOMFLY polynomial of a link

asked 2020-09-27 19:38:06 +0100

brb gravatar image

updated 2024-04-22 20:18:09 +0100

FrédéricC gravatar image

I am trying to compute the homfly polynomial of some links, given as braids, and I am running in some problems.

For example:

b = [3, 2, 1, 6, 5, 4, 3, 2, -3, -4, 3, -7, 5, 4, 7, -2, -3, -4, -5, -6, -1, -2, -3, -4, -5, -6, -7, 7]
Br = BraidGroup(8)
B = Br(b)
L = Link(B)
L.homfly_polynomial()

and I get the following error:

---------------------------------------------------------------------------
SignalError                               Traceback (most recent call last)
<ipython-input-7-b500a53dcd1e> in <module>()
    3 braidd = Br(b)
    4 linkk = Link(braidd)
----> 5 linkk.homfly_polynomial()

/home/user/SageMath/local/lib/python3.7/site-packages/sage/knots/link.py in homfly_polynomial(self, var1, var2, 
normalization)
   2630             s += ' {} {}'.format(i, cr)
   2631         from sage.libs.homfly import homfly_polynomial_dict
-> 2632         dic = homfly_polynomial_dict(s)
   2633         if normalization == 'lm':
   2634             return L(dic)

/home/user/SageMath/local/lib/python3.7/site-packages/sage/libs/homfly.pyx in 
sage.libs.homfly.homfly_polynomial_dict (build/cythonized/sage/libs/homfly.c:1471)()
     98     link = str_to_bytes(link)
     99     cdef Term ter
--> 100     sig_on()
    101     cdef Poly* c_output = homfly(link)
    102     sig_off()

SignalError: Segmentation fault

The problem seems to be with some specific diagram of the 2 components unlink (as the one in the previous example). Also, my memory goes up like crazy after trying to compute the homfly polynomial of these particular diagrams/braids.

edit retag flag offensive close merge delete

Comments

Thanks for the report. The method homfly_polynomial is defined in the file src/sage/knots/link.py.

Not sure how to fix that, but here is a more direct reproducer.

slelievre gravatar imageslelievre ( 2020-09-28 16:15:25 +0100 )edit

Executing the code in the question ends up computing this:

from sage.libs.homfly import homfly_polynomial_dict

s = ('2 2 14 1 11 1 50 2 1 7 1 8 -1 9 -1 12 1 18 1 23 1 0'
     ' -1 1 -1 2 -1 20 -1 21 -1 22 -1 23 -1 24 -1 25 -1 3'
     ' -1 4 -1 5 -1 6 -1 7 -1 15 -1 16 -1 17 -1 18 -1 19 -1'
     ' 25 1 3 1 11 -1 14 -1 19 1 24 1 4 1 12 -1 13 -1 16 1'
     ' 21 1 1 1 6 1 8 1 10 1 13 1 17 1 22 1 0 1 5 1 9 1 10'
     ' -1 15 1 20 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 -1 9'
     ' -1 10 1 11 1 12 1 ...
(more)
slelievre gravatar imageslelievre ( 2020-09-28 16:15:38 +0100 )edit