push-relabel | A push-relabel network flow solver in JavaScript
kandi X-RAY | push-relabel Summary
kandi X-RAY | push-relabel Summary
This library is an implementation of Goldberg and Tarjan’s [push-relabel algorithm] for solving network flow problems in JavaScript. It use relabel-to-front ordering as well as the global and gap relabelling heuristics, as described by [Cherkassy and Goldberg] giving it a run time on the order of |V|^3 in the worst case.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of push-relabel
push-relabel Key Features
push-relabel Examples and Code Snippets
Community Discussions
Trending Discussions on push-relabel
QUESTION
I sort of understand how the push-relabel algorithm works. As per my understanding, it works by maintaining a preflow, however this results in there being excess flow at some nodes. Then, on a node with excess, the push operation will either push flow forward if it can, or backwards if it has reached capacity. However, if there are no adjacent nodes of a lower height, it will relabel the node to have a greater height.
I can see how this works on a normal graph. So why even introduce the residual graph? In every explanation of the algorithm I see, these operations are performed on the residual graph, which is confusing to me.
...ANSWER
Answered 2021-Mar-09 at 13:08The point of the residual graph is that there is no special casing for forward versus backward pushes. All there is is pushing flow on a residual arc from a higher label to a lower one. The way that push-relabel directs flow to the sink is by not allowing the sink's label to increase from zero.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install push-relabel
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page