Question: Question 2 ( 4 marks ) A 2 - colouring of an undirected graph with ( n ) vertices and ( m
Question marks
A colouring of an undirected graph with n vertices and m edges is the assignment of one of two colours eg black or white to each vertex of the graph so that no two adjacent nodes have the same colour. So if there is an edge u ; v in the graph, either node u is black and v is white, or vice versa. Give an mathrmOmathrmnmathrmm time algorithm to a colour graph, or determine that no such colouring exists and justify the running time. For this problem, you are not allowed to assume the existence of any "blackbox" algorithms. You may write a pseudocode instead of a full detailed algorithm.
Question marks
Consider the following strategy for finding a shortest path from vertex start to vertex goal in a given connected graph:
Initialize path to start
Initialize VisitedVertices to start
If start goal, return path and exit. Otherwise, continue
Find the edge start v of minimum weight such that v is adjacent to start and v is not in VisitedVertices.
Add v to path.
Add v to VisitedVertices.
Set start equal to v and go to step
Does this strategy always find a shortest path from the start to goal? Either explain intuitively why it works or give a counter example
Question marks
Show the execution of Dijkstra's shortest path algorithm on the following graph starting from vertex Copy and paste the information below into your assignment document and complete the following table, Dhow the length of the best paths found so far for each vertex after each relaxation step. The first line in the table is filled out for you.
Next Vertex Tentative Distance from Start Vertex Edge Connecting Next Vertex to Cloud oo oo oo oo oo oo
I will be awarded full marks if you adequately answer the questions addressed. You will be awarded partial marks if your response demonstrates:
Application of the major and alternative approaches, methods, or algorithms to solve the problem.
Evidence of appropriate logic.
Evidence of correct computational skills and data structures.
Inclusion of appropriate comments or explanations.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
