Question: Implement a non - deterministic polynomial algorithm ( NOT greedy algorithm ) for solving the graph coloring problem. Your program should be able to read
Implement a nondeterministic polynomial algorithm NOT greedy algorithm for solving the graph coloring problem.
Your program should be able to read a graph description from a file and seek a random solution to
the corresponding decision problem.
The format of the file should be as follows:
st line: number of vertices and number of edges in the graph, separated by a space.
nd to th line: pair of vertex IDs, describing the start and end vertex of an edge.
Vertex IDs start from
The graph is considered to be undirected. For example, the values listed below describe the graph
shown on the right:
The maximum number of vertices is
The input of your program should consist of:
The name of the graph description file.
The maximum number of colors to use
The maximum number of random solutions checked before answering No
Example:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
