Answer to Question #180081 in C++ for Anushree

Question #180081

Solving graph colouring problem using Fine-Grained Locks in c++.



you have to implement a parallel greedy graph colouring algorithm where

each thread is assigned a partition. You consider the number of threads k as one of the

parameters. All the vertices (n being the total number of vertices) in the graph are randomly

partitioned into p partitions and each partition is assigned to a thread. Note that unless mentioned

otherwise, you can assume that p is equal to k.



Input to the program will be a file, named input_params.txt, consisting of the number of

threads followed by the no. of vertices in the graph. From the next line, there should be the

representation of the graph in adjacency matrix format. The sample input file is as follows:


2 5

1 2 3 4 5

1 0 0 0 1 0

2 0 0 0 1 1

3 0 0 0 0 1

4 1 1 0 0 1

5 0 1 1 1 0


1
Expert's answer
2021-04-10T18:03:05-0400
Dear Anushree, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS