sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.41k stars 474 forks source link

HOMFLY polynomial hangs on certain links #33211

Open e8a5670a-52d4-4723-a7e5-2be2370e1b59 opened 2 years ago

e8a5670a-52d4-4723-a7e5-2be2370e1b59 commented 2 years ago

In the two below examples, the only difference is that -5 and -3 are switched. The first HOMFLY polynomial is computed very fast, while for the second one Sage just dies and I have to restart it. I tried lots of bigger and more complicated links and HOMFLY always works fine for them, but for some reason the second braid below is problematic.

sage: Br = BraidGroup(7)
sage: L1 = Link(Br([3, 4, 5, 6, 2, 3, 1, 2, 4, 5, 3, 4, -5, -4, -5, -3, -2, -4]))  # works super fast
sage: print(L1.homfly_polynomial())
sage: L2 = Link(Br([3, 4, 5, 6, 2, 3, 1, 2, 4, 5, 3, 4, -5, -4, -3, -5, -2, -4]))  # hangs forever
sage: print(L2.homfly_polynomial())
1 - M^-2 + L^-2 - 2*L^-2*M^-2 - L^-4*M^-2
ERROR: 'killed'

Communication with the Sage server is failing.

CC: @miguelmarco @slel

Component: algebraic topology

Keywords: homfly

Issue created by migration from https://trac.sagemath.org/ticket/33211

slel commented 2 years ago

Changed keywords from none to homfly

slel commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,10 +1,10 @@
 In the two below examples, the only difference is that -5 and -3 are switched. The first HOMFLY polynomial is computed very fast, while for the second one Sage just dies and I have to restart it. I tried lots of bigger and more complicated links and HOMFLY always works fine for them, but for some reason the second braid below is problematic.

-sage: Br=BraidGroup(7) -sage: L1=Link(Br([3, 4, 5, 6, 2, 3, 1, 2, 4, 5, 3, 4, -5, -4, -5, -3, -2, -4])) #works super fast +sage: Br = BraidGroup(7) +sage: L1 = Link(Br([3, 4, 5, 6, 2, 3, 1, 2, 4, 5, 3, 4, -5, -4, -5, -3, -2, -4])) # works super fast sage: print(L1.homfly_polynomial()) -sage: L2=Link(Br([3, 4, 5, 6, 2, 3, 1, 2, 4, 5, 3, 4, -5, -4, -3, -5, -2, -4])) #hangs forever +sage: L2 = Link(Br([3, 4, 5, 6, 2, 3, 1, 2, 4, 5, 3, 4, -5, -4, -3, -5, -2, -4])) # hangs forever sage: print(L2.homfly_polynomial()) 1 - M^-2 + L^-2 - 2L^-2M^-2 - L^-4*M^-2 ERROR: 'killed'

miguelmarco commented 2 years ago
comment:2

I can't reproduce the error.

What version of Sage and OS are you using?

e8a5670a-52d4-4723-a7e5-2be2370e1b59 commented 2 years ago
comment:3

I tried it in CoCalc (Sage ver. 9.4, Ubuntu 20.04) and in my local Docker container (Sage ver. 9.2, Mac OS Big Sur), and see this error in both cases. I also now tried https://sagecell.sagemath.org/ where both links worked fine for some reason.

slel commented 2 years ago
comment:4

Since SnapPy is installed on SageCell, perhaps it helps computing HOMFLY there?