Jump to content

Talk:Stoer–Wagner algorithm

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This article contains two sample implementations. The first one is C++, contains a reference, and appears to work.

I can't get the second one to work. First, I can't tell for sure what language it is. It mostly looks like C, but the code uses C++ reference syntax in one place:

int contract( int &s, int &t )

Even after changing the references to pointers, I couldn't get a sensible answer.

Finally, will memset(bin, false, sizeof(bin)); clear the entire array, or is

   memset(bin, false, sizeof(bool)*maxn);

correct?

Single Phase Explanation

It seems that the MinimumCutPhase is missing a couple of sentences. Nowhere is it said in text how to actually pick s, t in the phase mincut.

"So, in a single phase, a pair of vertices s and t , and a min s-t cut C is determined" — Preceding unsigned comment added by TheZuza777 (talkcontribs) 04:12, 21 October 2016 (UTC)[reply]

Missing example

There's an example given in the text that seems to refer to a figure that no longer exists. It looks like there was a file called Stoer-wagner_algorithm.png that has been removed. — Preceding unsigned comment added by 12.221.141.99 (talk) 17:33, 11 June 2019 (UTC)[reply]

The example refers to the figures in the original paper; I added a reference to that but perhaps the whole section should be reworked / removed. Chinasaur (talk) 19:33, 17 September 2019 (UTC)[reply]