Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1449 > unrolled thread

Re: NetworkFlow example

Started byAndrzej Kozlowski <akoz@mimuw.edu.pl>
First post2011-04-03 10:59 +0000
Last post2011-04-09 11:14 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: NetworkFlow example Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-04-03 10:59 +0000
    Re: NetworkFlow example "Jon Harrop" <usenet@ffconsultancy.com> - 2011-04-09 11:14 +0000

#1449 — Re: NetworkFlow example

FromAndrzej Kozlowski <akoz@mimuw.edu.pl>
Date2011-04-03 10:59 +0000
SubjectRe: NetworkFlow example
Message-ID<in9jve$f9g$1@smc.vnet.net>
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
>
>

[toc] | [next] | [standalone]


#1564

From"Jon Harrop" <usenet@ffconsultancy.com>
Date2011-04-09 11:14 +0000
Message-ID<inpf2b$91d$1@smc.vnet.net>
In reply to#1449
"Andrzej Kozlowski" <akoz@mimuw.edu.pl> wrote in message 
news:in9jve$f9g$1@smc.vnet.net...
> 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}}}

Mathematica 7 hangs at this point. So these functions were broken for over 
10 years?!

Cheers,
Jon.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web