Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1449
| From | Andrzej Kozlowski <akoz@mimuw.edu.pl> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: NetworkFlow example |
| Date | 2011-04-03 10:59 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <in9jve$f9g$1@smc.vnet.net> (permalink) |
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
>
>
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
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
csiph-web