![]() |
We now provide a concrete example to illustrate the combinatorial
filtering process and the last step of the algorithm of applying a
maximum flow algorithm (such as Edmonds-Karp). For the environment
given in Fig. 11(a), visibility cell
decomposition procedure [5] will give us the shadow
sequence I-state in Fig. 11(b). Applying the
filter then gives us the bipartite graph in
Fig. 11(c). Note that each shadow becomes a
vertex (sometimes two vertices) of the bipartite graph. Once the
bipartite graph is constructed, the task of determining lower and
upper bounds on shadows at
can be transformed into a
max-flow problem. To achieve this, we first augment the graph by
adding a source vertex
and sink vertex
. An edge is added
between
and each shadow at
as well as each appeared
shadow, and an edge is added between
and each shadow at
as well as each disappeared shadow. The end result of doing this to
the graph in Fig. 11(c) is
Fig. 11(d).
After obtaining the extended graph, capacities need to be assigned to edges of the graph before running max-flow. Let
be an edge in the graph from vertex
to vertex
, and denote the capacity and flow on the edge as
, respectively. Suppose that we want to obtain the upper bound on the number of targets in shadow
. The edges of the original bipartite graph will always have infinite capacities, which we do not mention again. For each edge between
and and a shadow indexed
, let
. In our example these indices are 1-5, 10, 12, and 18. For each edge between a disappearing shadow indexed
, and
, let
. These are 9 and 14 in our example. Since we want as many targets to go to
as possible, we let
for
and
. After running the max-flow algorithm, the maximum possible number of targets that can end up in
is given by