Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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".
Example:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions

Question

=+1. What activities at the synapse are affected by drugs?

Answered: 1 week ago

Question

Conduct a needs assessment. page 269

Answered: 1 week ago