5. (This question goes slightly beyond what was covered in the lectures, but you can solve it by combining algorithms that we have described.)
A directed graph is said to be strongly connected if every vertex is reachable from every other vertex; i.e., for every pair of vertices u, v, there is a directed path from u to v and a directed path from v to u.
A strong component of a graph is then a maximal subgraph that is strongly connected. That is all vertices in a strong component can reach each other, and any other vertex in the directed graph either cannot reach the strong component or cannot be reached from the component.
(Note that we are considering directed graphs, so for a pair of vertices u and v there could be a path from u to v, but no path path from v back to u; in that case, u and v are not in the same strong component, even though they are connected by a path in one direction.)
-
Given a vertex v in a directed graph D, design an
algorithm for com- puting the strong connected component containing the vertex v. Give a high-level description of the algorithm, in terms of ADTs and algo- rithms described in the lectures. (For full marks, the algorithm should run it time O(n + m), where n is the number of vertices and m is the number of edges of D.) -
It is well known that strong connected components partition the ver- tices of a graph. Describe how to extend your algorithm of part 1 to an algorithm for computing all the strong connected components of a directed graph. (Only a high-level description is required.)
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- Let G be a graph with n vertices. If the maximum size of an independent set in G is k, clearly explain why the minimum size of a vertex cover in G is n - k.arrow_forwardConsider an undirected graph G with 100 nodes. The maximum number of edges to be included in G so that the graph is not connected isarrow_forward3. Kleinberg, Jon. Algorithm Design (p. 519, q. 28) Consider this version of the Independent Set Problem. You are given an undirected graph G and an integer k. We will call a set of nodes I "strongly independent" if, for any two nodes v, u € I, the edge (v, u) is not present in G, and neither is there a path of two edges from u to v. That is, there is no node w such that both (v, w) and (u, w) are present. The Strongly Independent Set problem is to decide whether G has a strongly independent set of size at least k. Show that the Strongly Independent Set Problem is NP-Complete.arrow_forward
- Can you help me solve this exercise? Please note that the greedy approach described in the advice paragraph does not work.arrow_forwardA graph is biconnected if every pair of vertices is connectedby two disjoint paths. An articulation point in a connected graph is a vertex that woulddisconnect the graph if it (and its adjacent edges) were removed. Prove that any graphwith no articulation points is biconnected. Hint : Given a pair of vertices s and t and apath connecting them, use the fact that none of the vertices on the path are articulationpoints to construct two disjoint paths connecting s and t.arrow_forwardGive an example of a graph that has all 3 of the following properties. (Note that you need to give a single graph as the answer.) (i) It is connected (ii) It has one articulation point. (iii) The graph needs at least 4 colors for a valid vertex coloring (iv) The graph does not have a 4-clique (that is, a clique of 4 vertices) as a subgraph.arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY