What algorithms efficiently find a largest possible set of paths from u to v such that each pair of paths in the set is intermediate-vertex-disjoint?
-
Let G be an undirected graph, and let u and v be two distinct, nonadjacent vertices in G. Two paths from u to v are intermediate-vertex-disjoint if the only vertices that these paths share are u and v. Give an algorithm that efficiently finds a largest possible set of paths from u to v such that each pair of paths in the set is intermediate-vertex-disjoint. What is the time complexity in terms of n, m and r(u, v), where r is the maximum number of such paths in a set. (Hint: Think about the maximum flow problem.) This is a question, I found somewhere but dint know how to approach it using max-flow.
-
Answer:
You can solve this using max flow. First you split each node x in two nodes x1 and x2. All edges going to x now go to x1 and all edges leaving from x now leave from x2. Each of these edges will have capacity 1. You also add for each x an edge from x1 to x2 of capacity 1. Now you can run max flow from u2 to v1. The resulting max flow gives you the number of vertex disjoint paths. The solution can't have more than n paths so using Ford-Fulkerson you will get a solution that takes O(nm) time (with n the number of nodes and m the number of edges).
Cosmin Negruseri at Quora Visit the source
Related Q & A:
- Why generally to find a Euler cycle is easier than Hamilton cycle for the same set of nodes?Best solution by Computer Science
- Is it possible to find a relative in Jacksonville, Florida?Best solution by Yahoo! Answers
- Where can I find a list of the largest forums on the Internet?Best solution by theforumfinder.org
- What would be a good student exchange program from the U.S to the U.K?Best solution by Yahoo! Answers
- Where to find a good pair of over ear headphones under $100?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.