Ch8_Graphs
Ch8_Graphs
Graphs
• Vertex or Node
• Edge
• Naming Nodes
• Adjacent Nodes or Neighbors
• Degree of a Node
• Multigraph
Complete Graphs
• Clique - fully connected set of nodes
Chromatic Number
• n-colorable - Colorable using n colors.
• Are the following graph 3-colorable?
• 2-colorable?
• We want no adjacent
colors.
• How to determine in
an algorithmic way?
Coloring with Independent Sets
• Determine the
Maximal Independent
set. (Not maximum)
{A,B,C,D,E,F,G,H,I,J}
• A is in the set.
• Is B?
• Is C?
• D? E? F? G? H? I? J?
Maximal Independent Set
• {A,B,C,D,E,F,G,H,I,J}
• A is in the set.
• Is B?
• Is C?
• D? F? G? H? I? J?
• {A,D,G,H,I} Maximal
Independent Set
• All of these could be
painted a single color.
Maximal Independent Set
• Unused: {B,C,E,F,J}
• B is in the set?
• Is C? E? F? J?
Maximal Independent Set
• Unused: {B,C,E,F,J}
• B is in the set?
• Is C? E? F? J?
• {B, E, J}
• All of these could be
painted a second
color.
Maximal Independent Set
• Unused {D,F,}
• D is in the set.
• Is F?
• {D, F}
• All of these could be
painted a third color.
Maximal Independent Set
• A different set of choices
could have resulted in a
different coloring.
• This procedure does not
ensure minimal coloring.
• {A,F,G,H,I}
• {B,D, J}
• {C}
• {E}
Maximal Independent Set
• {A,D,G,H,I}
• Maximal means no
unused node could be
added.
• With the choices we
have made, this is as big
as this set can get.
• Maximal does NOT mean
this is the biggest
possible set.