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 7035981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:22:09+00:00 2026-05-28T01:22:09+00:00

I am implementing this algorithm for a directed graph. But the interesting thing about

  • 0

I am implementing this algorithm for a directed graph. But the interesting thing about this graph nodes have also their own flow capacities. I think, this subtle change of the original problem must be handled in a special way. Because, In original max-flow problem It was okay to find any path from start to finish(actually, in Edmonds-Karp algorithm, we need to do BFS, and choose the first path that reaches the final node) But with this node-capacity extension, we need to be more careful about ‘this path selection’ job. I know it because, I implemented the original-algorithm and found myself getting smaller flow values than max-flow, I doubt that it has to do with this node-capacity restrictions.

I put a lot effort on this and came up with some ideas like transforming the initial graph into a graph which has no capacity constraint on nodes by adding self loops (adding self loops to each node and finding paths which includes this self-loops for each node on the path) or adding virtual nodes and edges whose weights supersede the initial node-capacity constraints) However, I am not convinced that any of these are nice solution for this problem.

Any idea would be much appreciated.

Thanks in advance.

  • 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-05-28T01:22:10+00:00Added an answer on May 28, 2026 at 1:22 am

    There’s a simple reduction from the max-flow problem with node capacities to a regular max-flow problem:

    For every vertex v in your graph, replace with two vertices v_in and v_out. Every incoming edge to v should point to v_in and every outgoing edge from v should point from v_out. Then create one additional edge from v_in to v_out with capacity c_v, the capacity of vertex v.

    So you just run Edmunds-Karp on the transformed graph.

    So let’s say you have the following graph in your problem (vertex v has capacity 2):

    s --> v --> t
       1  2  1
    

    This would correspond to this graph in the max-flow problem:

    s --> v_in --> v_out --> t
       1        2         1
    

    It should be apparent that the max-flow obtained is the solution (and it’s not particularly difficult to prove either).

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

Sidebar

Related Questions

I am implementing my own RSA algorithm in ruby to learn more about the
I've been thinking of implementing this system, but can't help but feel there's a
Just a quick question about how you would go about implementing this. I want
I have seen this link: Implementing Mutual Exclusion in JavaScript . On the other
I have this question: Does implementing a custom MembershipProvider class needs you to implement
I was implementing a routing algorithm in javascript, but when I assign a negative
I'm implementing the Verhoeff algorithm for a check digit scheme, but there seems to
Have/Want List Matching Algorithm I am implementing an item trading system on a high-traffic
I'm implementing the A* search algorithm from this pseudo on wikipedia's article: function A*(start,goal)
I'm implementing a A* search algorithm but I keep running into problems with the

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.