Problem 10. (10 marks) Let G- (V, E) be a directed graph with source s E...
Suppose we are given a directed acyclic graph G with a unique source and a unique sink t. A vertex v ¢ {s,t} is called an (s,t)-cut vertex if every path from s to t passes through v, or equivalently, if deleting v makes t unreachable from s. Describe and analyze an algorithm to find every (s, t)-cut vertex in G t
(b) A source in a directed graph is a node with no incoming edges. A sink is a node with no outgoing edges. Assume that we know that every DAG has at least one sink. Use this fact to explain why every DAG must have at least one source. (c) Consider the following graph algorithm which takes a DAG G as input. function COMPUTESOMETHING(DAG G) Lempty linked list S stack of all source nodes in G while S is non-empty...
Say that we have an undirected graph G(V, E) and a pair of vertices s, t and a vertex v that we call a a desired middle vertex . We wish to find out if there exists a simple path (every vertex appears at most once) from s to t that goes via v. Create a flow network by making v a source. Add a new vertex Z as a sink. Join s, t with two directed edges of capacity...
et NV,E] be a capacitated directed network with unique fixed source and unique fixed sink, no edges into the source, and no edges out of the sink. To eadh vertex u,e V, assign a number μj equal to 0 or-1. To each edge (Unuj)e E, assign a number yy defined by yy -max (0, H, - Hj). (See the discussion immediately preceding Example 10.) a. Prove that-t +pj + yi,2 0 for all i and j. b. Prove that yy...
Problem 6 (20 points). Let G- (V,E) be a directed Let E' be another set of edges on V with edge length '(e) >0 for any e EE. Let s,t EV. Design an algorithm runs in O(lV+ E) time to find an edge e'e E' whose addition to G will result in the maximum decrease of the distance from s to t. Explain why your algorithms runs in O(V2+E') time. graph with edge length l(e) >0 for any e E...
Let (G, s, t, c) be a flow network G = (V, E), A directed edge e = (m u) is called always fu ir f(e) e(e) forall maximum fiows f: it is called sometimes fullit f(e)for some but not all maximum flows: it is caled never fulit f(e) <c(e) for all maximum flows. Let (S, V S be a cut. That is, s E S,teV S. We say the edge u, ) is crossing the cut ifu E SandrEV\...
1. Consider a directed graph with distinct and non-negative edge lengths and a source vertex s. Fix a destination vertex t, and assume that the graph contains at least one s-t path. Which of the following statements are true? [Check all that apply.] ( )The shortest (i.e., minimum-length) s-t path might have as many as n−1 edges, where n is the number of vertices. ( )There is a shortest s-t path with no repeated vertices (i.e., a "simple" or "loopless"...
You are given a flow network G with n >4 vertices. Besides the source sand the sink t, you are also given two other special vertices u and v belonging to G. Describe an algorithm which finds a cut of the smallest possible capacity among all cuts in which vertex u is at the same side of the cut as the sources and vertex v is at the same side as sink t. Hint: it is enough to ad two...
Let e be the unique lightest edge in a graph G. Let T be a spanning tree of G such that e /∈ T . Prove using elementary properties of spanning trees (i.e. not the cut property) that T is not a minimum spanning tree of G.