Question: Consider graph G with vertices 1 , 2 , 3 , and 4 , and edges 1 2 , 2 3 , 3 4 ,
Consider graph G with vertices and and edges
and
a Present graph G
b Present the adjacency lists for G
c Show the graph obtained from G by deleting the edge ie the
new graph has one fewer edge than G
d Present the adjacency lists of the graph in c
e Suppose we are given graph G ie its adjacency lists and vertices x
y such that x y is an edge in G ie each of x y is a vertex from
n
What is the complexity of deleting the edge x y from G Explain.
f By a cycle passing through edge xy I mean a cycle whose edges include
x y Length of a cycle is the number of edges on the cycle.
Suppose we are given graph G and vertices x y such that x y is an
edge in G We want to find a shortest cycle that passes through the
edge x y
Present an Om n time algorithm for the problem.
In the event that there is no cycle passing through the edge x y
output an appropriate message.
Hint: Would it help to start by deleing the edge x y
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
