ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 29 Jun 2020 20:56:53 +0200Adding edges to a graphhttps://ask.sagemath.org/question/52261/adding-edges-to-a-graph/This is my first time using this forum so please let me know if more information is needed
I am trying to some basic conjecture testing, so I'm not too concerned about runtime. I am trying to count graphs which are "maximal triangle-free and 3-colorable", ie triangle-free and 3-colorable, and adding any missing edge breaks one of those 2 properties. But I don't know how to test that property about adding edges to a graph, since I don't know how to add edges to a graph. I'm mainly using the Sage page on undirected graphs. My rudimentary code so far is below:
> n = 5
> list = []
> for i in range(1, n):
> list.append([])
> for g in graphs(i):
> if g.is_triangle_free() and g.chromatic_number() <= 3:
> list[i-1].append(g)
listbottled-capsMon, 29 Jun 2020 20:55:59 +0200https://ask.sagemath.org/question/52261/adding an edge to a graphhttps://ask.sagemath.org/question/52262/adding-an-edge-to-a-graph/This is my first time using this forum so please let me know if more information is needed
I am trying to some basic conjecture testing, so I'm not too concerned about runtime. I am trying to count graphs which are "maximal triangle-free and 3-colorable", ie triangle-free and 3-colorable, and adding any missing edge breaks one of those 2 properties. But I don't know how to test that property about adding edges to a graph, since I don't know how to add edges to a graph. I'm mainly using the Sage page on undirected graphs. My rudimentary code so far is below:
> n = 5 list = []
> for i in range(1,n):
> list.append([])
> for g in graphs(i):
> if g.is_triangle_free() and g.chromatic_number() <= 3:
> list[i-1].append(g) listbottled-capsMon, 29 Jun 2020 20:56:53 +0200https://ask.sagemath.org/question/52262/can you find the total chromatic number (edge and vertices) of a graph?https://ask.sagemath.org/question/35744/can-you-find-the-total-chromatic-number-edge-and-vertices-of-a-graph/I' m trying to find the total chromatic number of a graph and I was wondering if anyone knew how to do this? I have found the edge and vertex chromatic number but am unable to join the 2. livvy94Sat, 26 Nov 2016 15:00:14 +0100https://ask.sagemath.org/question/35744/