# Problem with HOMFLY polynomial of a link

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.homfly_polynomial()


and I get the following error:

---------------------------------------------------------------------------
SignalError                               Traceback (most recent call last)
<ipython-input-7-b500a53dcd1e> in <module>()
3 braidd = Br(b)

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)()
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 close merge delete

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.

( 2020-09-28 09:15:25 -0600 )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)
( 2020-09-28 09:15:38 -0600 )edit