Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8946219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:27:13+00:00 2026-06-15T12:27:13+00:00

Input: Graph G (assume all edges have unit weights), source-destination vertex pairs (X1, Y1)

  • 0

Input: Graph G (assume all edges have unit weights), source-destination vertex pairs (X1, Y1) , (X2 Y2) , …, (Xk, Yk) (all of them are distinct).

Output: Routes R1 (from X1 to Y1), R2(from X2 to Y2), … , Rk (from Xk to Yk) such that R1, R2, …, Rk do not share any vertices between them. No need to optimize the route length.

What algorithm to use? What would be the complexity of this problem? I need a theoretically strong solution, not a heuristics works-most-of-the-time solution.

The most obvious solution is to assign each free vertex(not in X1, X2, .. Xk, or Y1, Y2, …, Yk) to one of the k paths and see if they actually form paths in the required way. There are possible n^k assignments ( (n-2k)^k to be more precise). Can we do better? What if we assume the graph to be a 2d grid structure? (Equivalent to solving https://play.google.com/store/apps/details?id=com.bigduckgames.flow game, but without fill every square requirement).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T12:27:14+00:00Added an answer on June 15, 2026 at 12:27 pm

    You can find one of the possible solutions in this paper: “The disjoint paths problem in quadratic time” by Ken-ichi Kawarabayashi, Yusuke Kobayashi, Bruce Reed (pdf).

    This solution is not trivial but efficient – only O(N2) time complexity, where N is the number of vertices. It is efficient only if K is a small constant.


    It is also possible to solve this as Multi-commodity flow problem. But I doubt any multi-commodity-specific algorithm is efficient enough. Because general multi-commodity flow problem (when flow for at least one commodity is greater than one) is NP-hard.

    It is unlikely that this is solvable as a single-commodity flow problem. For example, here is a counter-example to the following proposal:

    …limiting the S to X2 and T to Y2 edges to capacity 0.5? If there is a pair of disjoint routes with the required match-up, then it is possible to have a total flow of 1.5 from S to T… I am sure this method will give an accurate report of whether there is a set of disjoint paths.

                                               counter-example graph

    It is easy to find a flow of capacity 1.5 (this flow is shown on diagram). But there is no way to connect both (green and red) pairs of vertices with disjoint paths.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanna get all input from my pages timeline. so I read graph.facebook.com/pageid/feed with
Input: I have a LaTeX file, with plain text & math formulas. Desired output:
There are many basic graph algorithms such as topological sort, strongly/weakly connected components, all-pairs/single-source
I have a directed graph with millions of vertices and edges. A set of
Lets assume I have created a facebook app.So all those who(Admin) have facebook fan
Input: Graph G Output: several independent sets, so that the membership of a node
I have problem which I want to draw a function graph with any input
I need to read some data from an input file and plot a graph
I have created an application that creates bar graph based on inputs read from
Input @StartDate = '01/25/2010' @EndDate = '02/06/2010' I have 2 CTEs in a stored

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.