Question: Given an undirected connected graph G = (V, E) with |V | = n nodes, let u and v be two nodes in G such
Given an undirected connected graph G = (V, E) with |V | = n nodes, let u and v be two nodes in G such that their distance is greater than n/2, i.e., the shortest path between u and v has at least n 2 + 1 edges. (a) Show that there is at least one vertex x in the graph whose removal disconnects u and v. (Hint: Can there be a cycle in G that includes u and v?) (b) Give an O(|V | + |E|)-time (i.e., linear time) algorithm to find such a vertex x.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
