#31001 closed defect (fixed)

Some bugs concerning the trivial knot diagram

Reported by: soehms Owned by:
Priority: major Milestone: sage-9.3
Component: algebraic topology Keywords: knot, link, jones polynomial, alternating, khovanov homology
Cc: mmarco Merged in:
Authors: Travis Scrimshaw Reviewers: Sebastian Oehms
Report Upstream: N/A Work issues:
Branch: f86f3ec (Commits, GitHub, GitLab) Commit: f86f3ec186f513d424d39895705197cf97f25a24
Dependencies: Stopgaps:

Status badges

Description

This ticket is related to #30346 which fixed a segmentation fault in the method homfly_polynomial applied to the trivial knot diagram. Here we treat similar cases for the methods is_alternating, khovanov_homology and jones_polynomial.

While the first two cases produce errors you get a wrong result in the third case (which is the result for two unknots that do not cross each other):

sage: Ua = Link([]); Ua
Link with 1 component represented by 0 crossings
sage: Ua.khovanov_homology()
Traceback (most recent call last):
...
ValueError: max() arg is an empty sequence

sage: Ua.is_alternating()
Traceback (most recent call last):
...
IndexError: list index out of range

sage: Ua.jones_polynomial()
-sqrt(t) - 1/sqrt(t)
sage: Ub = Link(BraidGroup(2).gen(0))
sage: Ub.jones_polynomial()
1

Change History (10)

comment:1 follow-up: Changed 12 months ago by tscrim

The bug for the Jones polynomial originates in the braid group code with trying to deal with the fact that it wants to remove unbraided strands.

comment:2 in reply to: ↑ 1 Changed 12 months ago by soehms

Replying to tscrim:

The bug for the Jones polynomial originates in the braid group code with trying to deal with the fact that it wants to remove unbraided strands.

Indeed, algorithm='statesum' returns the correct result:

sage: U=Link([])
sage: U.jones_polynomial(algorithm='statesum')
1

Explicitly the bug is in the method braid. I think the problem is a kind of dilemma: The correct result of the method braid for the trivial diagram would be one of the braid group on one strand. But since the braid group construction doesn't allow to define it the one of the braid group on two strands is returned the closure of which are two isolated unknots.

The clearest way to fix this would be to implement the trivial group as the braid group on one strand, but probably annoying to work this through all methods of the class.

Another possibility is to let the generator of the two strand braid group be the braid of the trivial diagram. But this disturbs the recursive structure of the method. So, I don't know what to do here!

comment:3 follow-up: Changed 12 months ago by tscrim

  • Authors set to Travis Scrimshaw
  • Branch set to public/knots/fix_trivial_issues-31001
  • Commit set to a49c33d5a7e286fc9e755469c8d8017002d1374d
  • Status changed from new to needs_review

I think it is just best to special case stuff in the Link code. That is the best way to ensure consistency of assumptions.


New commits:

a49c33dFix some corner cases for the trivial knot without crossings.

comment:4 in reply to: ↑ 3 Changed 11 months ago by soehms

Replying to tscrim:

I think it is just best to special case stuff in the Link code. That is the best way to ensure consistency of assumptions.

You are right! But, shouldn't we add a note in the braid method pointing out that - on the one hand - the closure of the trivial diagram's braid is the union of two unknots (mathematically) which - on the other hand - is consistent with the braid closure construction according to the note in the docstring of the class. Maybe the phrasing of the latter should take the unknot into account, as well.

Furthermore, in the note you add to is_alternating I think we should say that the result may return False even though isotopic alternating diagrams exist (to make clear that the term is used differently as in the Hoste-Thistlethwaite table). I mean for example this:

sage: K5_2 = Link([[1, 4, 2, 5], [3, 8, 4, 9], [5, 10, 6, 1], [7, 2, 8, 3], [9, 6, 10, 7]])
sage: K5_2.is_alternating()
True
sage: K5_2b = Link(K5_2.braid())
sage: K5_2b.is_alternating()
False

Once this is done, you may switch to positive review.

comment:5 Changed 11 months ago by git

  • Commit changed from a49c33d5a7e286fc9e755469c8d8017002d1374d to f86f3ec186f513d424d39895705197cf97f25a24

Branch pushed to git repo; I updated commit sha1. New commits:

f86f3ecUpdating some of the documentation to clarify alternating definition.

comment:6 Changed 11 months ago by tscrim

All good suggestions. I have done them. Please check that they are satisfactory.

comment:7 Changed 11 months ago by soehms

  • Reviewers set to Sebastian Oehms
  • Status changed from needs_review to positive_review

LGTM

comment:8 follow-up: Changed 11 months ago by tscrim

Thank you. I hope you are doing well.

comment:9 in reply to: ↑ 8 Changed 11 months ago by soehms

Replying to tscrim:

Thank you. I hope you are doing well.

Thank you, too! Yes, everthing for me and my family is o.K. I hope the same is true for you! Have a nice Chrismas time!

comment:10 Changed 11 months ago by vbraun

  • Branch changed from public/knots/fix_trivial_issues-31001 to f86f3ec186f513d424d39895705197cf97f25a24
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.