Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cayley graph side error

Why is the following code giving me error? I want to construct several cayley graphs at once and find their chromatic numbers. Though in the below example, the graphs are all bipartite, but in a general example, how do we proceed?

import itertools
from sage.graphs.graph_coloring import chromatic _number
G=SymmetricGroup(4)
l=[G((1,2)),G((1,3)),G((1,4)),G((2,3)),G((2,4)),G((3,4))]
m=itertools.combinations(l,4)
H=[G.cayley_graph(list(s)) for s in m]
I=[h.to_undirected() for h in H]
k=[i.chromatic_number for i in I]
k

The error I got on the console is Value error: option 'side' must be 'left', 'right' or 'twosided' pointing to cayley graph construction. Kindly help me in this regard. Thanks beforehand.

Cayley graph side error

Why is the following code giving me error? I want to construct several cayley graphs at once and find their chromatic numbers. Though in the below example, the graphs are all bipartite, but in a general example, how do we proceed?

import itertools
from sage.graphs.graph_coloring import chromatic _number
chromatic_number
G=SymmetricGroup(4)
l=[G((1,2)),G((1,3)),G((1,4)),G((2,3)),G((2,4)),G((3,4))]
m=itertools.combinations(l,4)
H=[G.cayley_graph(list(s)) for s in m]
I=[h.to_undirected() for h in H]
k=[i.chromatic_number for i in I]
k

The error I got on the console is Value error: option 'side' must be 'left', 'right' or 'twosided' pointing to cayley graph construction. Kindly help me in this regard. Thanks beforehand.