This document describes a method for calculating a lower bound on the number of colors needed to color a graph. It involves creating an adjacency matrix and storing neighbors in an array. It sorts the nodes by degree and recursively searches subgraphs, starting with high degree nodes, to find fully connected components and isolated nodes as pruning steps. The maximum number of neighbors found is returned as a potential lower bound.
This document describes a method for calculating a lower bound on the number of colors needed to color a graph. It involves creating an adjacency matrix and storing neighbors in an array. It sorts the nodes by degree and recursively searches subgraphs, starting with high degree nodes, to find fully connected components and isolated nodes as pruning steps. The maximum number of neighbors found is returned as a potential lower bound.
This document describes a method for calculating a lower bound on the number of colors needed to color a graph. It involves creating an adjacency matrix and storing neighbors in an array. It sorts the nodes by degree and recursively searches subgraphs, starting with high degree nodes, to find fully connected components and isolated nodes as pruning steps. The maximum number of neighbors found is returned as a potential lower bound.
getLB(Graph, number of nodes) Create adjacency matrix Find all neighbours of all nodes, store them in a jagged array Create array of degrees Heapsort array of degrees Loop: for all nodes, in descending order of degrees, that have more neighbours than the current lower bound: Call the recursiveSearh(Graph, adjacency matrix, node’s neighbours, lowerBound) Compare return value to previous lowerBound. If return value greater, overwrite lowerBound Return lowerBound ------------------------------------------------------------------------------------------------------------------------------------------ recurisveSearch(Graph, adjacency matrix, node’s neighbours, lowerBound) If the call has more neighbours than the lowerbound Create adjacency matrix of neighbours Count connections in the matrix, save into sum variable If sum = max value of neighbours adjacency return the number of neighbours as lowerBound Else if sum + 2 = max value of neighbours adjacency return the number of neighbours as lowerBound (pruning step) Else if sum = 0 it’s an isolated node, return previous lowerBound (pruning step) Else Create smaller array for new set of neighbours Find the node with the least edges Remove the node (only 1 at a time) Recall recursiveSearch(Graph, adjacency matrix, new neighbours, lowerBound) Else return previous lowerBound (pruning step)
Lower bound based on:
http://www.personal.kent.edu/~rmuhamma/GraphTheory/MyGraphTheory/coloring.htm Heapsort based on Jason Harrisons algorithm’s modified version provided for CCN (2018-200-KEN1210)