160 likes | 321 Views
Team Vertex. Jimmy Fifield Nick Marino. Graph Coloring. What is the minimum number of colors needed to color every vertex so that no neighboring vertexes are the same color? NP-Complete problem. Brute force is extremely inefficient as number of colorings increases factorially .
E N D
Team Vertex Jimmy Fifield Nick Marino
Graph Coloring • What is the minimum number of colors needed to color every vertex so that no neighboring vertexes are the same color? • NP-Complete problem. • Brute force is extremely inefficient as number of colorings increases factorially.
Deletion-Contraction Algorithm • Recursive. • X(G) = min{ X(G + uv), X(G / uv) } • u and v cannot be adjacent vertices.
Sequential Program • Graph.java • GraphInputReader.java • ColoringCore.java • ColoringCoreSeq.java • ColoringCoreMain.java • ColoringSeq.java
Graph • Represents a simple graph composed of vertices and edges. • Abstracts away the data structure implementation details, • Provides a way to perform simple operations on the graph (adding/deleting an edge, contracting two vertices,etc).
GraphInputReader • This class takes an input file name in the constructor, and then provides a method to read the file, parse the contents, and create a new Graph object based on the results.
ColoringCore • Interface • Provides the specifications for a graph coloring solver. • There's a single method - run - that takes a Graph as input and returns the chromatic number of that graph.
ColoringCoreSeq • Provides a sequential implementation of the deletion-contraction algorithm.
ColoringMain • This class takes the command line arguments and a ColoringCoreobject. • Input. • Timing measurements. • Utilizes the ColoringCore to calculate the answer.
ColoringSeq • Creates a new sequential core. • Starts the main program.
Parallel Program • Graph.java • GraphInputReader.java • ColoringCore.java • ColoringCoreSMP.java • ColoringCoreMain.java • ColoringSMP.java