Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please answer them all using Java and give the pseudocode clearly. thank you!! 2) (30 pts) Consider the Minimum Cost Vertex Coloring Problem in which

please answer them all using Java and give the pseudocode clearly. thank you!! image text in transcribed
2) (30 pts) Consider the Minimum Cost Vertex Coloring Problem in which we assign different colors to the adjacent vertices on a given graph G = (VE). The objective is to color the vertices of the graph with minimum total coloring cost. Let V = n be the number of vertices in the graph G. Input: A graph G = (VE), where V is the set of vertices and is the set of edges of the graph G. Colors (1, 2, ..., Cn) with prices P = P1, P2, ...,P.). Output: Color assignments of the vertices having minimum total coloring cost. Ex: For the graph G in figure, the set of vertices is V = {01, 22, ..., V10} and the set of edges is E = {(W1,), (01,05), (1, 26), (12, 13), (12, 07), ..., (07, 010)}. We are given n = 10 different colors, namely C1, C2, ..., C10. Let the price of using these colors be P=(3, 2, 1, 2, 4, 3, 2, 3, 4, 2). For instance, the price of using color for one time is P2 = 2 and for two times is 2 x P2 = 4. As an example in the figure, we use color for 4 times (price = 4 x P2 = 8), color cy for 3 times (price = 3 x P = 3), and color for 3 times (price = 3 x 4 6). Hence, we color the graph G using three different colors with total cost 8 +3+ 6 = 17. a. (15 pts) Design a greedy algorithm that solves the Minimum Cost Ver- ter Coloring Problem using a greedy color selection rule. Give the pseudocode of your algorithm. h 15 pts) What is the time complexity of your algorithm? Is it efficient? Can your algorithm find the optimum solution? c. (10 pts) Step-by-step implement your algorithm on the instance given in the example

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

Evaluate the integral. 4y - 7y - 12 - -dy J1 y(y + 2)(y - 3)

Answered: 1 week ago

Question

How does selection differ from recruitment ?

Answered: 1 week ago