Re: NetworkFlow example
- To: mathgroup at smc.vnet.net
- Subject: [mg117907] Re: NetworkFlow example
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sun, 3 Apr 2011 06:59:54 -0400 (EDT)
Well, at least the examples from Pemmaraju and Skiena's book seem to work without problems in Mathematica 8.01: << Combinatorica` g = GridGraph[2, 2, 2]; NetworkFlow[g, 1, 8, All] {{{2, 1}, {3, 1}, {5, 1}}, {{1, 0}, {4, 1}, {6, 0}}, {{1, 0}, {4, 0}, {7, 1}}, {{2, 0}, {3, 0}, {8, 1}}, {{1, 0}, {6, 1}, {7, 0}}, {{2, 0}, {5, 0}, {8, 1}}, {{3, 0}, {5, 0}, {8, 1}}, {{4, 0}, {6, 0}, {7, 0}}} ShowGraph[ Highlight[ GridGraph[3, 3, 3], {First[Transpose[NetworkFlow[g, 1, 27, Edge]]]}]] and so on. But I haven't tried anything else. Andrzej Kozlowski On 2 Apr 2011, at 09:40, Jon Harrop wrote: > Can anyone give an example use of the NetworkFlow function that works in > Mathematica 7? > > The only example I have found is: > > https://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread/thread/e0b2be1c4e4c88f0/ > > but it just hangs, as other people have observed before me: > > https://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread/thread/5280780aaebc2158 > > -- > Dr Jon Harrop, Flying Frog Consultancy Ltd. > http://www.ffconsultancy.com > >