ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 28 Mar 2018 15:35:12 +0200problems with gauss code for knotshttps://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials).
However, I am running in some problems. For example:
A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial:
A.alexander_polynomial()
I get the following error:
ValueError ... Traceback (most recent call last)
in ()
1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]])
----> 2 A.alexander_polynomial()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var)
1792 R = LaurentPolynomialRing(ZZ, var)
1793 # The Alexander polynomial of disjoint links are defined to be 0
-> 1794 if len(self._braid_word_components()) > 1:
1795 return R.zero()
1796 t = R.gen()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self)
1445 ([-2, 1, 1], [4, 4], [6])
1446 """
-> 1447 ml = list(self.braid().Tietze())
1448 if not ml:
1449 return tuple()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self)
666 C1 = newPD[newPD.index(heads[-a])]
667 C1[C1.index(-a)] = newedge + 1
--> 668 C2 = newPD[newPD.index(tails[-b])]
669 C2[C2.index(-b)] = newedge + 2
670 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1])
ValueError: [5, 8, 6, 1] is not in list
----------------------------------------
I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!Mon, 26 Mar 2018 14:33:03 +0200https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/Comment by slelievre for <p>I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials).
However, I am running in some problems. For example:</p>
<pre><code>A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
</code></pre>
<p>Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial: </p>
<pre><code>A.alexander_polynomial()
</code></pre>
<p>I get the following error:</p>
<pre><code>ValueError ... Traceback (most recent call last)
in ()
1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]])
----> 2 A.alexander_polynomial()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var)
1792 R = LaurentPolynomialRing(ZZ, var)
1793 # The Alexander polynomial of disjoint links are defined to be 0
-> 1794 if len(self._braid_word_components()) > 1:
1795 return R.zero()
1796 t = R.gen()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self)
1445 ([-2, 1, 1], [4, 4], [6])
1446 """
-> 1447 ml = list(self.braid().Tietze())
1448 if not ml:
1449 return tuple()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self)
666 C1 = newPD[newPD.index(heads[-a])]
667 C1[C1.index(-a)] = newedge + 1
--> 668 C2 = newPD[newPD.index(tails[-b])]
669 C2[C2.index(-b)] = newedge + 2
670 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1])
ValueError: [5, 8, 6, 1] is not in list
</code></pre>
<hr>
<p>I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!</p>
https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41765#post-id-41765Welcome to Ask Sage! Thank you for your question!Mon, 26 Mar 2018 15:06:22 +0200https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41765#post-id-41765Comment by slelievre for <p>I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials).
However, I am running in some problems. For example:</p>
<pre><code>A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
</code></pre>
<p>Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial: </p>
<pre><code>A.alexander_polynomial()
</code></pre>
<p>I get the following error:</p>
<pre><code>ValueError ... Traceback (most recent call last)
in ()
1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]])
----> 2 A.alexander_polynomial()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var)
1792 R = LaurentPolynomialRing(ZZ, var)
1793 # The Alexander polynomial of disjoint links are defined to be 0
-> 1794 if len(self._braid_word_components()) > 1:
1795 return R.zero()
1796 t = R.gen()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self)
1445 ([-2, 1, 1], [4, 4], [6])
1446 """
-> 1447 ml = list(self.braid().Tietze())
1448 if not ml:
1449 return tuple()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self)
666 C1 = newPD[newPD.index(heads[-a])]
667 C1[C1.index(-a)] = newedge + 1
--> 668 C2 = newPD[newPD.index(tails[-b])]
669 C2[C2.index(-b)] = newedge + 2
670 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1])
ValueError: [5, 8, 6, 1] is not in list
</code></pre>
<hr>
<p>I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!</p>
https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41767#post-id-41767Possibly related to:
- [https://ask.sagemath.org/question/39416/different-results-for-alexander-polynomials/](https://ask.sagemath.org/question/39416/different-results-for-alexander-polynomials/)Mon, 26 Mar 2018 15:11:37 +0200https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41767#post-id-41767Comment by slelievre for <p>I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials).
However, I am running in some problems. For example:</p>
<pre><code>A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
</code></pre>
<p>Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial: </p>
<pre><code>A.alexander_polynomial()
</code></pre>
<p>I get the following error:</p>
<pre><code>ValueError ... Traceback (most recent call last)
in ()
1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]])
----> 2 A.alexander_polynomial()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var)
1792 R = LaurentPolynomialRing(ZZ, var)
1793 # The Alexander polynomial of disjoint links are defined to be 0
-> 1794 if len(self._braid_word_components()) > 1:
1795 return R.zero()
1796 t = R.gen()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self)
1445 ([-2, 1, 1], [4, 4], [6])
1446 """
-> 1447 ml = list(self.braid().Tietze())
1448 if not ml:
1449 return tuple()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self)
666 C1 = newPD[newPD.index(heads[-a])]
667 C1[C1.index(-a)] = newedge + 1
--> 668 C2 = newPD[newPD.index(tails[-b])]
669 C2[C2.index(-b)] = newedge + 2
670 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1])
ValueError: [5, 8, 6, 1] is not in list
</code></pre>
<hr>
<p>I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!</p>
https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41775#post-id-41775I can observe the same error in Sage 8.2.beta8.Mon, 26 Mar 2018 16:46:18 +0200https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41775#post-id-41775Comment by danieleC for <p>I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials).
However, I am running in some problems. For example:</p>
<pre><code>A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
</code></pre>
<p>Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial: </p>
<pre><code>A.alexander_polynomial()
</code></pre>
<p>I get the following error:</p>
<pre><code>ValueError ... Traceback (most recent call last)
in ()
1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]])
----> 2 A.alexander_polynomial()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var)
1792 R = LaurentPolynomialRing(ZZ, var)
1793 # The Alexander polynomial of disjoint links are defined to be 0
-> 1794 if len(self._braid_word_components()) > 1:
1795 return R.zero()
1796 t = R.gen()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self)
1445 ([-2, 1, 1], [4, 4], [6])
1446 """
-> 1447 ml = list(self.braid().Tietze())
1448 if not ml:
1449 return tuple()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self)
666 C1 = newPD[newPD.index(heads[-a])]
667 C1[C1.index(-a)] = newedge + 1
--> 668 C2 = newPD[newPD.index(tails[-b])]
669 C2[C2.index(-b)] = newedge + 2
670 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1])
ValueError: [5, 8, 6, 1] is not in list
</code></pre>
<hr>
<p>I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!</p>
https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41776#post-id-41776It seems that the braid function is not working properlyMon, 26 Mar 2018 19:40:20 +0200https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41776#post-id-41776Comment by slelievre for <p>I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials).
However, I am running in some problems. For example:</p>
<pre><code>A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
</code></pre>
<p>Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial: </p>
<pre><code>A.alexander_polynomial()
</code></pre>
<p>I get the following error:</p>
<pre><code>ValueError ... Traceback (most recent call last)
in ()
1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]])
----> 2 A.alexander_polynomial()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var)
1792 R = LaurentPolynomialRing(ZZ, var)
1793 # The Alexander polynomial of disjoint links are defined to be 0
-> 1794 if len(self._braid_word_components()) > 1:
1795 return R.zero()
1796 t = R.gen()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self)
1445 ([-2, 1, 1], [4, 4], [6])
1446 """
-> 1447 ml = list(self.braid().Tietze())
1448 if not ml:
1449 return tuple()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self)
666 C1 = newPD[newPD.index(heads[-a])]
667 C1[C1.index(-a)] = newedge + 1
--> 668 C2 = newPD[newPD.index(tails[-b])]
669 C2[C2.index(-b)] = newedge + 2
670 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1])
ValueError: [5, 8, 6, 1] is not in list
</code></pre>
<hr>
<p>I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!</p>
https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41784#post-id-41784Yes, the issue can be reduced to:
sage: A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
sage: A.braid()
Traceback (most recent call last)
...
ValueError: [5, 8, 6, 1] is not in listMon, 26 Mar 2018 23:47:06 +0200https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41784#post-id-41784Comment by brb for <p>I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials).
However, I am running in some problems. For example:</p>
<pre><code>A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
</code></pre>
<p>Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial: </p>
<pre><code>A.alexander_polynomial()
</code></pre>
<p>I get the following error:</p>
<pre><code>ValueError ... Traceback (most recent call last)
in ()
1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]])
----> 2 A.alexander_polynomial()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var)
1792 R = LaurentPolynomialRing(ZZ, var)
1793 # The Alexander polynomial of disjoint links are defined to be 0
-> 1794 if len(self._braid_word_components()) > 1:
1795 return R.zero()
1796 t = R.gen()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self)
1445 ([-2, 1, 1], [4, 4], [6])
1446 """
-> 1447 ml = list(self.braid().Tietze())
1448 if not ml:
1449 return tuple()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self)
666 C1 = newPD[newPD.index(heads[-a])]
667 C1[C1.index(-a)] = newedge + 1
--> 668 C2 = newPD[newPD.index(tails[-b])]
669 C2[C2.index(-b)] = newedge + 2
670 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1])
ValueError: [5, 8, 6, 1] is not in list
</code></pre>
<hr>
<p>I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!</p>
https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41793#post-id-41793Thanks! Any idea on how to fix it?Tue, 27 Mar 2018 15:26:10 +0200https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41793#post-id-41793Comment by slelievre for <p>I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials).
However, I am running in some problems. For example:</p>
<pre><code>A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
</code></pre>
<p>Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial: </p>
<pre><code>A.alexander_polynomial()
</code></pre>
<p>I get the following error:</p>
<pre><code>ValueError ... Traceback (most recent call last)
in ()
1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]])
----> 2 A.alexander_polynomial()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var)
1792 R = LaurentPolynomialRing(ZZ, var)
1793 # The Alexander polynomial of disjoint links are defined to be 0
-> 1794 if len(self._braid_word_components()) > 1:
1795 return R.zero()
1796 t = R.gen()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self)
1445 ([-2, 1, 1], [4, 4], [6])
1446 """
-> 1447 ml = list(self.braid().Tietze())
1448 if not ml:
1449 return tuple()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self)
666 C1 = newPD[newPD.index(heads[-a])]
667 C1[C1.index(-a)] = newedge + 1
--> 668 C2 = newPD[newPD.index(tails[-b])]
669 C2[C2.index(-b)] = newedge + 2
670 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1])
ValueError: [5, 8, 6, 1] is not in list
</code></pre>
<hr>
<p>I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!</p>
https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41806#post-id-41806This issue is now tracked at [Sage Trac ticket #25050](https://trac.sagemath.org/ticket/25050).Wed, 28 Mar 2018 15:18:13 +0200https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41806#post-id-41806Comment by slelievre for <p>I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials).
However, I am running in some problems. For example:</p>
<pre><code>A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
</code></pre>
<p>Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial: </p>
<pre><code>A.alexander_polynomial()
</code></pre>
<p>I get the following error:</p>
<pre><code>ValueError ... Traceback (most recent call last)
in ()
1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]])
----> 2 A.alexander_polynomial()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var)
1792 R = LaurentPolynomialRing(ZZ, var)
1793 # The Alexander polynomial of disjoint links are defined to be 0
-> 1794 if len(self._braid_word_components()) > 1:
1795 return R.zero()
1796 t = R.gen()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self)
1445 ([-2, 1, 1], [4, 4], [6])
1446 """
-> 1447 ml = list(self.braid().Tietze())
1448 if not ml:
1449 return tuple()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self)
666 C1 = newPD[newPD.index(heads[-a])]
667 C1[C1.index(-a)] = newedge + 1
--> 668 C2 = newPD[newPD.index(tails[-b])]
669 C2[C2.index(-b)] = newedge + 2
670 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1])
ValueError: [5, 8, 6, 1] is not in list
</code></pre>
<hr>
<p>I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!</p>
https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41807#post-id-41807@brb -- sorry, I don't know how to fix it. I opened a ticket, cc-ing developers involved in the initial implementation of this functionality.Wed, 28 Mar 2018 15:20:07 +0200https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41807#post-id-41807Comment by brb for <p>I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials).
However, I am running in some problems. For example:</p>
<pre><code>A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
</code></pre>
<p>Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial: </p>
<pre><code>A.alexander_polynomial()
</code></pre>
<p>I get the following error:</p>
<pre><code>ValueError ... Traceback (most recent call last)
in ()
1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]])
----> 2 A.alexander_polynomial()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var)
1792 R = LaurentPolynomialRing(ZZ, var)
1793 # The Alexander polynomial of disjoint links are defined to be 0
-> 1794 if len(self._braid_word_components()) > 1:
1795 return R.zero()
1796 t = R.gen()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self)
1445 ([-2, 1, 1], [4, 4], [6])
1446 """
-> 1447 ml = list(self.braid().Tietze())
1448 if not ml:
1449 return tuple()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self)
666 C1 = newPD[newPD.index(heads[-a])]
667 C1[C1.index(-a)] = newedge + 1
--> 668 C2 = newPD[newPD.index(tails[-b])]
669 C2[C2.index(-b)] = newedge + 2
670 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1])
ValueError: [5, 8, 6, 1] is not in list
</code></pre>
<hr>
<p>I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!</p>
https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41808#post-id-41808Thanks a lot!!Wed, 28 Mar 2018 15:35:12 +0200https://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/?comment=41808#post-id-41808