Question: Consider the problem: given an undirected graph and a, , c, b is there a simple path from a to c that goes via b.
Consider the problem: given an undirected graph and a, , c, b is there a simple path from a to c that goes via b. Make every undirected edge into two anti parallel edges each with capacity 1 each. Add a source s and a directed edge of capacity 2 from s to b. Add a sink t and two directed edges from a, c into t each with capacity 1. Explain how the maximum flow answers the question above about if a simple path from a to c via b exists. Can you do the same algorithm for checking for a, b, c in a directed graph if there is a directed path from a to c that goes via b? If yes show how, else explain why not. In all algorithm, always explain how and why they work. ALWAYS, analyze the time complexity of your algorithm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
