Ask Your Question

chrisalex0207's profile - activity

2023-03-25 17:21:19 +0100 received badge  Notable Question (source)
2023-01-23 17:50:42 +0100 received badge  Popular Question (source)
2017-07-25 01:21:30 +0100 commented answer How do I print a graph after I find all_graph_colorings?

Oh wow! thanks mate!

2017-07-25 01:21:09 +0100 commented answer How do I print a graph after I find all_graph_colorings?

Wow! Thank you!

2017-07-23 02:29:31 +0100 received badge  Student (source)
2017-07-22 23:27:59 +0100 asked a question How do I print a graph after I find all_graph_colorings?

Code is as follows:

from sage.graphs.graph_coloring import chromatic_number
from sage.graphs.independent_sets import IndependentSets
from sage.graphs.graph_coloring import number_of_n_colorings
from sage.graphs.graph_coloring import first_coloring
from sage.graphs.graph_coloring import all_graph_colorings 
g=Graph([[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 13], [1, 14], [1, 22], [1, 23], [1, 25], [1, 27], [1, 30], [1, 32], [2, 3], [2, 4], [2, 5], [2, 6], [2, 17], [2, 18], [2, 21], [2, 24], [2, 26], [2, 28], [2, 29], [2, 31], [3, 4], [3, 9], [3, 10], [3, 17], [3, 18], [3, 22], [3, 23], [3, 25], [3, 27], [3, 30], [3, 32], [4, 9], [4, 10], [4, 13], [4, 14], [4, 21], [4, 24], [4, 26], [4, 28], [4, 29], [4, 31], [5, 9], [5, 14], [5, 17], [5, 21], [5, 23], [6, 10], [6, 13], [6, 18], [6, 22], [6, 24], [9, 13], [9, 18], [9, 21], [9, 23], [10, 14], [10, 17], [10, 22], [10, 24], [13, 17], [13, 21], [13, 22], [14, 18], [14, 23], [14, 24], [17, 21], [17, 22], [18, 23], [18, 24], [25, 28], [25, 29], [26, 27], [26, 30], [27, 31], [28, 32], [29, 32], [30, 31]])
all=all_graph_colorings(g,4)
show(all)

This prints:

<generator object all_graph_colorings at 0x7f1bd8e9c370>