Skip to main content
Code Review

Return to Question

Commonmark migration
Source Link

[![graph image][1]][1]graph image

I'm looking for improvements to the algorithm or implementation to better the performance of this solution. It can be assumed that the edges come from normal distribution. [1]: https://i.sstatic.net/SOl4T.png

[![graph image][1]][1]

I'm looking for improvements to the algorithm or implementation to better the performance of this solution. It can be assumed that the edges come from normal distribution. [1]: https://i.sstatic.net/SOl4T.png

graph image

I'm looking for improvements to the algorithm or implementation to better the performance of this solution. It can be assumed that the edges come from normal distribution.

added 64 characters in body
Source Link

I'm looking for improvements to the algorithm or implementation to better the performance of this solution. It can be assumed that the edges come from normal distribution. [1]: https://i.sstatic.net/SOl4T.png

I'm looking for improvements to the algorithm or implementation to better the performance of this solution. [1]: https://i.sstatic.net/SOl4T.png

I'm looking for improvements to the algorithm or implementation to better the performance of this solution. It can be assumed that the edges come from normal distribution. [1]: https://i.sstatic.net/SOl4T.png

added 54 characters in body
Source Link

I have three lists of nodes. sources, sinks, and pipes. there is a directed weighted graph from sources to pipes to sinks. Sources are only connected to pipes and pipes only to sinks. But sources are not directly connected to sinks. Pipes are zero-sum, meaning that the sum of the weights that come to each pipe from sources is equal to the sum of the edges that go from that pipe to sinks.

  • sources
  • sinks
  • pipes

I would like to add the minimum number of edges to thisThere is a directed weighted graph from sinks back to sources so thatto pipes to sinks. Sources are only connected to pipes and pipes only to sinks. But sources also becomeare not directly connected to sinks. Pipes are zero-sum. I know this problem is np-complete I'm interested, meaning that the sum of the weights that come to see if thereeach pipe from sources is any good polynomial approximationequal to this problemthe sum of the edges that would work in real lifego from that pipe to sinks.

I would like to add a number of edges from sinks back to sources so that sinks and sources also become zero-sum. While minimizing the maximum degree of the graph. I've written a sub-optimal solution that I'm posting here for review.

In simpler words: I have a list of sinks and sources. Each sink has a negative number and each source has a positive number so that the sum of all the numbers in the nodes of the graph are zero(no edges so far). I would like to add the minimuma number of edges to this graph so that the sum of the weights of the edges going out/in to each node becomes equal to the number on that node.

graph image [![graph image][1]][1]

I'm looking for improvements to the algorithm or implementation to better the performance of this solution. [1]: https://i.sstatic.net/SOl4T.png

I have three lists of nodes. sources, sinks, and pipes. there is a directed weighted graph from sources to pipes to sinks. Sources are only connected to pipes and pipes only to sinks. But sources are not directly connected to sinks. Pipes are zero-sum, meaning that the sum of the weights that come to each pipe from sources is equal to the sum of the edges that go from that pipe to sinks.

I would like to add the minimum number of edges to this graph from sinks back to sources so that sinks and sources also become zero-sum. I know this problem is np-complete I'm interested to see if there is any good polynomial approximation to this problem that would work in real life.

In simpler words: I have a list of sinks and sources. Each sink has a negative number and each source has a positive number so that the sum of all the numbers in the nodes of the graph are zero(no edges so far). I would like to add the minimum number of edges to this graph so that the sum of the weights of the edges going out/in to each node becomes equal to the number on that node.

graph image

I have three lists of nodes.

  • sources
  • sinks
  • pipes

There is a directed weighted graph from sources to pipes to sinks. Sources are only connected to pipes and pipes only to sinks. But sources are not directly connected to sinks. Pipes are zero-sum, meaning that the sum of the weights that come to each pipe from sources is equal to the sum of the edges that go from that pipe to sinks.

I would like to add a number of edges from sinks back to sources so that sinks and sources also become zero-sum. While minimizing the maximum degree of the graph. I've written a sub-optimal solution that I'm posting here for review.

In simpler words: I have a list of sinks and sources. Each sink has a negative number and each source has a positive number so that the sum of all the numbers in the nodes of the graph are zero(no edges so far). I would like to add a number of edges to this graph so that the sum of the weights of the edges going out/in to each node becomes equal to the number on that node.

[![graph image][1]][1]

I'm looking for improvements to the algorithm or implementation to better the performance of this solution. [1]: https://i.sstatic.net/SOl4T.png

Source Link
Loading
lang-py

AltStyle によって変換されたページ (->オリジナル) /