help reqd on the problem on network flow
Posted: Tue Nov 25, 2008 2:26 am
Hello all
Plz give ur ideas n suggestions:
We define an n × n grid to be an undirected graph (V,E)
where V = {(i, j) | 1 ? i ? n, 1 ? j ? n}, and two vertices (i, j) and (i?, j?)
are adjacent iff either i = i? and j = j?±1 or j = j? and i = i?±1. Thus, each
vertex in a grid has at most 4 neighbors. We call the vertices with fewer than
4 neighbors boundary vertices (i.e., these are vertices (1, j), (n, j), (i, 1), or
(i, n)). Give an O(m.n^2) algorithm which takes a value n ? N and m ? n^2
starting vertices (i, j) ? [1..n]×[1..n] and determines whether there exists a
set of m vertex-disjoint paths in the n × n grid, each connecting a starting
node with a boundary node.
Thanks n Regards
Plz give ur ideas n suggestions:
We define an n × n grid to be an undirected graph (V,E)
where V = {(i, j) | 1 ? i ? n, 1 ? j ? n}, and two vertices (i, j) and (i?, j?)
are adjacent iff either i = i? and j = j?±1 or j = j? and i = i?±1. Thus, each
vertex in a grid has at most 4 neighbors. We call the vertices with fewer than
4 neighbors boundary vertices (i.e., these are vertices (1, j), (n, j), (i, 1), or
(i, n)). Give an O(m.n^2) algorithm which takes a value n ? N and m ? n^2
starting vertices (i, j) ? [1..n]×[1..n] and determines whether there exists a
set of m vertex-disjoint paths in the n × n grid, each connecting a starting
node with a boundary node.
Thanks n Regards