bankuti_gyongyi

5 Reputation

2 Badges

12 years, 115 days

MaplePrimes Activity


These are answers submitted by bankuti_gyongyi

I also have problem with this command. I don't even understand the max flow value.

I use Maple 16! I solved this directed problem above, and it gave (quickly) the folowing result:

> H := Digraph(6, {[1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 4], [5, 6]}, weighted); DrawGraph(H, style = spring); MaxFlow(H, 1, 4);

 

2, Matrix(6, 6, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 1, (2, 5) = 0, (2, 6) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 1, (3, 6) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 1, (5, 5) = 0, (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = 0})

2 (the max flow value) can not be max, just min... but with other examples it does not seems neither to be minimum... 

Here is another example: 

A := Matrix([[0,1,0,4,0,0],[0,0,1,0,3,0],[0,1,0,0,0,1],[0,0,3,0,1,0],[0,0,0,1,0,4],[0,0,0,0,0,0]]);

A :=matrix of a directed weighted graph.

MaxFlow(N, 1, 6);

MX:=MaxFlow(N, 1, 6):MX;

4, Matrix(6, 6, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (1, 4) = 3, (1, 5) = 0, (1, 6) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 2, (2, 6) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (3, 6) = 1, (4, 1) = 0, (4, 2) = 0, (4, 3) = 2, (4, 4) = 0, (4, 5) = 1, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0, (5, 6) = 3, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = 0})

The structure of the matrix is the same just the weights are different..? 

 

So maybe they corrected the algorithm - as it is quick, but not correct I think...

 

 

Page 1 of 1