You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sage: g = graphs.IcosahedralGraph()
sage: g.chromatic_number(algorithm='MILP')
The bug is in graphs/graph_coloring.py. In particular, this code is bogus:
# - No need to try any k smaller than the maximum clique in
# - the graph No need to try k less than |G|/alpha(G), as each
# color class is at most alpha(G)
# - max, because we know it is not bipartite
from math import ceil
k = max([3, g.clique_number(),ceil(g.order()/len(g.independent_set()))])
Somebody (see #9618) thinks that ceil returns an int, but it returns a float. Oops.
This triggers a bug:
The bug is in
graphs/graph_coloring.py
. In particular, this code is bogus:Somebody (see #9618) thinks that ceil returns an int, but it returns a float. Oops.
CC: @nathanncohen
Component: graph theory
Issue created by migration from https://trac.sagemath.org/ticket/12485
The text was updated successfully, but these errors were encountered: