Ask Your Question

connected sum of knots

asked 2018-04-11 13:14:13 +0200

anonymous user


updated 2023-01-09 23:59:46 +0200

tmonteil gravatar image

Hi! I was trying to recursively construct connected sums of knots, but I seem to run in to some problems when connect summing a knot to itself more than two times:

B = BraidGroup(2)

trefoil = Knot(B([1,1,1]))

K = trefoil.connected_sum(trefoil)

L = K.connected_sum(trefoil)

This does not work:

ValueError                                Traceback (most recent call last)

ipython-input-1-7b977cf99468 in module()

 2 trefoil = Knot(B([Integer(1),Integer(1),Integer(1)]))

 3 K = trefoil.connected_sum(trefoil)

--> 4 L = K.connected_sum(trefoil)

/home/sc_serv/sage/local/lib/python2.7/site-packages/sage/knots/knot.pyc in connected_sum(self, other)

294         return Knot(B(list(b1.Tietze())

295                       + [(abs(i) + b2s) * Integer(i).sign() for i in b2.Tietze()]

--> 296                       + [b1s]))


/home/sc_serv/sage/local/lib/python2.7/site-packages/sage/knots/knot.pyc in __init__(self, data, check)

 104         if check:

 105             if self.number_of_components() != 1:

  --> 106                 raise ValueError("the input has more than 1 connected component")


  108     def __repr__(self):

 ValueError: the input has more than 1 connected component

Am I doing something wrong here? Thanks in advance!

edit retag flag offensive close merge delete



Note that, calling t the trefoil knot and tt its connected sum with itself, one gets different errors when trying the connected sum of tt with t, versus of t with tt. Indeed, defining:

B = BraidGroup(2)
t = Knot(B([1, 1, 1]))
c = Knot.connected_sum
tt = c(t, t)

one attempt gives:

sage: c(tt, t)
Traceback (most recent call last)
ValueError: the input has more than 1 connected component

while the other attempt gives:

sage: c(t, tt)
Traceback (most recent call last)
ValueError: generators not in the group
slelievre gravatar imageslelievre ( 2018-04-12 15:03:03 +0200 )edit

so it does not work either way? the result should be the same! anyway, it seems to have problems even when all knots are called in different ways, very weird!

danieleC gravatar imagedanieleC ( 2018-04-12 16:34:59 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-13 14:03:37 +0200

slelievre gravatar image

This points to a bug in the code to compute connected_sum.

This issue is now tracked at

Thanks for reporting!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2018-04-11 13:14:13 +0200

Seen: 452 times

Last updated: Apr 13 '18