Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that will compute the chromatic number of a graph and color the verticies using the chromatic number of colors. The input to

Write a program that will compute the chromatic number of a graph and color the verticies using the chromatic number of colors. The input to the program is a file containing the graph. The input file contains the number of verticies and the number of edges at the top and the list of edges at in the subsequent lines. The output file contains the chromatic number at the top and the coloring of verticies using the chromatic number of colors in the subsequent lines. The verticies are named 1,2,3... and the colors are also named 1,2,3...

A brute force algorithm to solve the coloring problem is given. Translate the algorithm into a Java program. The program must be based on the algorithm.

The given psuedocode can be found here: https://pastebin.com/73msEv00

input file -----> output file

5 7 3

4 2 1 1

1 5 2 2

2 3 3 3

4 3 4 1

5 4 5 3

1 2

2 5

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

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions

Question

5. Discuss the role of the Web in career management.

Answered: 1 week ago

Question

4. Design a career management system.

Answered: 1 week ago