Looks like a problem somewhere!

35 views
Skip to first unread message

Hany Ibrahim

unread,
Apr 18, 2022, 4:41:31 PM4/18/22
to sage-devel
Guys,
I was playing with sage executing this code:
d = {0: [2,3,5], 1: [3,4,5], 2: [4],3:[5]}; H = Graph(d);                                                                               H.is_line_graph()

The output was like this:
Exception                                 Traceback (most recent call last)
<ipython-input-6-d1df3a7a0511> in <module>
----> 1 H.is_line_graph()

/usr/lib/python3/dist-packages/sage/graphs/line_graph.pyx in sage.graphs.line_graph.is_line_graph (build/cythonized/sage/graphs/line_graph.c:2286)()
    220     if g.is_connected():
    221         try:
--> 222             R, isom = root_graph(g)
    223             if certificate:
    224                 return True, R, isom

/usr/lib/python3/dist-packages/sage/graphs/line_graph.pyx in sage.graphs.line_graph.root_graph (build/cythonized/sage/graphs/line_graph.c:7147)()
    621
    622     if not is_isom:
--> 623         raise Exception(error_message)
    624
    625     return R, isom

Exception: It looks like there is a problem somewhere. Youfound a bug here ! Please report it on sage-devel,our google group !

Emmanuel Charpentier

unread,
Apr 18, 2022, 5:26:54 PM4/18/22
to sage-devel

WorksForMe(TM) in 9.6.rc0 :

sage: d = {0: [2,3,5], 1: [3,4,5], 2: [4],3:[5]};
sage: H=Graph(d)
sage: H.is_line_graph()
False

HTH,

dmo...@deductivepress.ca

unread,
Apr 18, 2022, 5:30:00 PM4/18/22
to sage-devel
What version of sage are you using?  This should have been fixed in version 9.2 (and later) by trac ticket #29740.

Hany Ibrahim

unread,
Apr 19, 2022, 1:32:24 AM4/19/22
to sage-devel
Ok I see. I am using older version
Sage version: SageMath version 9.0, Release Date: 2020-01-01
OS: Ubuntu 20.04.4 LTS
Installation by the standard package of Ubuntu: sudo apt-get install sagemath sagemath-common

Thank you.
Reply all
Reply to author
Forward
0 new messages