Question: Suppose, as an interview question, you are told that you have a goat and a wolf that need to go from a node, s, to
Suppose, as an interview question, you are told that you have a goat and a wolf that need to go from a node, s, to a node, t, in a directed acyclic graph, G. To avoid the wolf eating the goat, their paths must never share an edge. Describe a polynomial-time algorithm for finding two edge-disjoint paths in G, if such paths exist, to provide a way for the goat and the wolf to go from s to t without risk to the goat.
Step by Step Solution
3.41 Rating (164 Votes )
There are 3 Steps involved in it
The algorithm for finding two edgedisjoint paths in a directed acyclic graph can be solved using a variation of the FordFulkerson algorithm The algori... View full answer
Get step-by-step solutions from verified subject matter experts
