Question: Q3. Map Coloring Please refer to supplied code with this homework. It creates a simple class data structure to represent a graph. You can add/delete

 Q3. Map Coloring Please refer to supplied code with this homework.

Q3. Map Coloring Please refer to supplied code with this homework. It creates a simple class data structure to represent a graph. You can add/delete edges in the graph, and can assign a particular value (Red, Green, Blue) to a node in graph. We studied famous map coloring problem in the class, in which you have to color each node such that no two adjacent nodes are assigned same map color. We can solve this problem with a backtracking algorithm, and it can be further improved with arc-consistency applied. In the provided code, the function makeArcConsistent is to be developed so that it shrinks the domain values of nodes, as some of the variables have been assigned the values. Q3. Map Coloring Please refer to supplied code with this homework. It creates a simple class data structure to represent a graph. You can add/delete edges in the graph, and can assign a particular value (Red, Green, Blue) to a node in graph. We studied famous map coloring problem in the class, in which you have to color each node such that no two adjacent nodes are assigned same map color. We can solve this problem with a backtracking algorithm, and it can be further improved with arc-consistency applied. In the provided code, the function makeArcConsistent is to be developed so that it shrinks the domain values of nodes, as some of the variables have been assigned the values

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!