Question: IN JAVA: Implement a non - deterministic polynomial algorithm for solving the graph coloring problem. Your program should be able to read a graph description

IN JAVA: Implement a non-deterministic polynomial 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:
1st line: number of vertices V and number of edges E in the graph, separated by a space.
2nd to (E+1) th line: pair of vertex IDs, describing the start and end vertex of an edge.
Vertex IDs start from 0.
The graph is considered to be undirected. For example, the values listed below describe the graph
shown on the right:
56
01
12
23
34
42
14
The maximum number of vertices is 100.
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".
 IN JAVA: Implement a non-deterministic polynomial algorithm for solving the graph

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!