Tải bản đầy đủ - 0 (trang)
4 Bhandari's Modified Dijkstra Algorithms

4 Bhandari's Modified Dijkstra Algorithms

Tải bản đầy đủ - 0trang

This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks.



The first two steps of ordinary Dijkstra will permanently label nodes B and D, respectively, with distances 5 and 6. Some time later, node E

will be visited and given the label {8, from C}. Ordinarily, node D will not then be rescanned, because it is permanently labeled. In

Bhandari's method it will be rescanned, however, leading to an update for node D now that we realize that D is also reachable over the

longer (hop-wise) path A-C-E-D that has the lower net cost of three. Similarly in the next step of the modified algorithm, the label at B is

updated to reflect the longer but lower cost route using the negative edge E-D.

In summary, the modified algorithm is:



procedure ModifiedDijkstra(source s, target t) {

CurrentNode := s

initialize each node's Label, [P], and [D] to null

append node s to [P] and Ds to [D]

do while [P] does not contain all nodes{



ModifiedScanFromNode (CurrentNode)

find node x not in [P] with minimum Dx

append node x to [P]

append Dx to [D]([D]is the vector of Di values for nodes in [P])

CurrentNode := x }}



procedure ModifiedScanFromNode(i) {

for every adjacent node j {

if Dj > Di + dij {

Label@[j] := (Di + dij, i)

if j in [P] {

remove j from [P] and Dj from [D]}

} else { make no change }}}



[ Team LiB ]



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

. it. Thanks



[ Team LiB ]



4.5 k-Shortest Path Algorithms

It is easy to see that if one can find the shortest route through a graph one could also build up a succession of routes with increasing

length. By removing or disqualifying the edges of the shortest path and repeating the process one would find the next-shortest path that

does not use any edges of the first path, and so on. The family of successively longer paths thereby obtained is an example of one notion

of k-shortest paths (ksp).

There is an extensive literature on slightly different notions of k-shortest paths, each of which relates to different problems. Topkis, for

instance, is interested in a set of k-shortest paths through a network of trunk groups Topk88]

[

. Sheir gives an algorithm for k-shortest paths

where paths may contain loops as a means of enumerating a succession of increasing path lengths through a graph, for applications in

project scheduling etc. [Shei76]. Other variants of k-shortest paths derive their differences from issues such as whether they pertain to

simple graphs or multigraphs and whether the k-successive paths are disjoint in certain ways or simply distinct. A classification system and

notes on dozens of different k-shortest path algorithms is contained in [Grov89]. Our purpose now is not to survey that whole domain, but

to flag for readers that the simple phrase "k-shortest paths" is by no means a unique specification. There are, however, three particular

classes of ksp algorithm that are of interest here:

1.



k-shortest link-disjoint paths: This is the set of k-successively longer paths in a multigraph where paths may share spans

among the set of routes they take, but are disjoint at the link level (i.e., any one link on a span is an element of only one path at

most), and the set of paths as a whole respects the finite capacity on every span of the network.



2.



k-shortest distinct routes: This is the set of routes over the spans of a network where each is merely distinct from the others

and they can be ranked in increasing order of either geographical or logical (hop count) distance.



3.



k-shortest span-disjoint routes: This is the set of routes over the spans of a network where each is span-disjoint from the

others and they can be ranked in increasing order of either geographical or logical (hop-count) distance.



In all cases we are interested only in non-looping paths so for simplicity this is not included in each of the criteria stated, nor do we restate

this in the subsequent discussion of ksp. As an example to work with in developing these ksp concepts let us reconsider Figure 4-11 as a

simple graph where the edge weights given are now interpreted as distances. In this case ksp criteria 1 produces:

Shortest path: A-B-C-G-H (distance = 14)



Second path: A-D-F-H (distance = 25)



Third path: infeasible: graph is disconnected through cut {(A-B), (B-C), (D-F), (G-H)}.

But because we are working with a simple graph in this case there is no distinction between a route and a path. If we interpret the simple

graph as representing a transport network with non-zero link quantities on every span, then this result is also an instance of the

k-successive span-disjoint routes. Not surprisingly the graph becomes disconnected quickly due to insisting on span disjointness among

the succession of routes. One use for this set of routes is as a simple (but non-optimal) way of finding a span-disjoint route pair for a 1+1

APS setup or more generally to arrange a k-way split of the demand flow between a pair of nodes over mutually span disjoint routes.

Let us next consider the set of k-shortest link-disjoint paths in a multigraph (criteria 1 above). This path-set is one that can be efficiently

used in mesh-restorable networks or for closely modeling the behavior of a distributed span-restoration algorithm. To provide an example

of this type of ksp we now let the edge weights in Figure 4-11 become the span capacities; that is, the number of unit-capacity links in

parallel on each span. At the same time, for simplicity we will shift our measure of path length to that of logical hop count so that shortest

and next shortest routes will be more apparent by inspection. (Note, however, that with hop length there can be more than one

equal-length route existing at each increasing hop length.)

Figure 4-14 steps through the process of developing this particular ksp path-set. In (a) we note that the shortest route is of length 3 and

that there are actually five different 3-hop routes from A to H in the graph. In such cases one can apply an arbitrary rule or simply leave it

up to the internal order of execution of a program (such as follows) to determine the order of claiming paths off of the equal length routes.

Let us consider capacity on the route A-C-G-H first. On this route we find span capacities of 6, 3, 6 respectively so the feasible number of

paths to follow this route is min(6, 3, 6) = 3 and span C-G is effectively removed from the graph at this point since all of its capacity is used.



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

. it. Thanks

The updated remaining capacities on other spans are marked by *. Next, in (b) seven paths are realized over route A-D-F-H, seven being

the limit set by the capacity of span A-D. The process goes on until no more paths are feasible on any route. The graph of remaining

capacity is always disconnected at this stopping state. In practice it is often one of the end nodes that is simply isolated, as is the case

here (node A), when all of its local egress capacity is consumed.



Figure 4-14. Illustrating the concept of k-shortest link-disjoint paths in a capacitated graph.



As mentioned, when working with hop count as the measure of length, there may not be a single unique route of each successive length,

so the ksp outcome is dependent on the internal program details of choosing over equal-hop-length routes. To illustrate, onFigure 4-14 we

also show the outcome of another of the possible sequences that could be followed. In this case it makes no difference to the total path

count, but the path details differ. A detailed study has shown in fact that although the path construction details vary with the order taken, it

is quite rare for this process to yield a total number of paths that is less than the theoretical maximum number of such paths (the

"max-flow" measure below) as a result of the order-dependency in the relatively low average degree that characterizes transport networks

[DuGr94].

This dependency of the path-set details only arises from the use of logical hop count as a distance measure. With unit-hop totals as the

cost measure, different routes can often have exactly the same total costs, so which is chosen then depends only on the execution order

or other particulars of the program implementation. In practice, if span distances are real-valued (or, say, integer but resolved to within 1

km lengths), then every path length usually has a unique distance total of its own and the "successive length" hierarchy defined by ksp

becomes uniquely defined. Highly symmetric networks or contrived assignments of real-valued distances to edges can, of course, be

devised as counter-examples to this—where two paths will also have the same real-valued length—but in practice which typical variations

in span lengths drawn from the real-world, or if a small random value is added to each spans's distance, the ksp flow and detailed path-set

construction become uniquely defined and repeatable.

We summarize with the following pseudo-code of the k-shortest link-disjoint paths algorithm. The approach is to run a single-shortest path

algorithm in a simple graph abstraction of the multigraph at each stage. As long as a span in the multigraph has unused capacity

remaining (edge weight not zero) then an edge is retained in the simple graph to represent the possibility of a route that traverses that

span.



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks



procedure ksp(capacitated graph G, source s, target t) {

CreateSimpleGraph(G, G*) {

for every edge i in G {

if capacityi > 0 {

create a corresponding single edge in G*

}}}

k := 0

repeat {

k := k + 1

route(k) := ShortestPath(G*, s, t)

no.paths(k) := min(set of capacities on route(k))

for every span i in route (k) {

capacityi := capacity i - no.paths(k)

if capacityi = 0 {

remove i from G*

}}

output route(k), no.paths(k)}

until route(k) cannot be found}

2

2

The complexity of this procedure can be stated initially as O(kn ) where k is the number of distinct routes in the resultant path-set andn

arises from each call to the basic shortest path algorithm. But k is really an output, not an input to the problem. So to make a proper

statement of computational complexity one needs to somehow bound k. One approach is to say k is at most the number of distinct routes

S

between source and target. That however is an extremely loose bound as there are O(2 ) distinct routes in the worst case.S is the number

N

of spans, hence this is also the same as O(2 ). If an explicit hop limit,H, is applied to limit the length of any route considered this improves

H

the bound on k to O(2 ) but this is still very high. The reason these are wildly high bounds for

k is they do not reflect the elimination of

remaining distinct route possibilities as spans are exhausted at each iteration. A better bound for k is based on recognizing that at

termination of this procedure the network is always disconnected. In fact, the process usually discovers a minimal-capacity cut-set of the

graph. Since there can be at most S spans in any cut-set, it follows thatk is O(S): that is, that in the worst casek=S iterations would be

2

required to disconnect the graph, reaching the stopping condition. Thus the procedure above has a theoretical time complexity of O(Sn )

3

which is also equivalent to O(n ) because S is related to n through the network average node degree. Additional optimizations can,

however, lead to an extremely fast ksp algorithm that is theoretically and experimentally O(nlogn) [MaGr94].

Let us now consider ksp criterion 2 on the list above—that is; k-shortest distinct routes. First let us illustrate the set of such routes on our

example network, so as to contrast this criterion with that of disjoint routes and k-shortest paths. Figure 4-15 again uses the network of

Figure 4-11 and A, H as the end-nodes. InFigure 4-15(a) the complete set of (fully) disjoint routes at all lengths is shown. In (b) the set of

distinct routes that exist only at hop lengths of 3 and 4 are shown.Figure 4-15(c) shows the additional distinct routes that exist at 5 and 6

hops. The main point is that there are vastly more distinct routes than there are disjoint routes. A distinct route only has to differ in one

span from previously enumerated routes, whereas each disjoint route differs from others in its set on every span on its route. One

approach to an algorithm for finding the set of simply distinct paths is to extend the ksp-like aspect of iteration of a single shortest route

finding routine on a simple graph, with appropriate span exclusions on each entry. For example if, on the first iteration, the shortest route

found is {S1-S2 ... Sm} then subsequent iterations would find the remaining shortest route first with S1 excluded, then with S2 excluded,

and so on. But it can be seen then that each of the latter paths is itself then a template for a series of further exclusions and shortest route

finding calls. In other words, it leads to a search tree for all distinct routes that is effectively a depth-first search (DFS) rooted on each span

of the initial shortest route. As a practical matter, therefore, it is easier to obtain the k-shortest distinct routes by length sorting the outcome

from an all-distinct routes routine, which is based on a general DFS, and is a separately required capability in any case. In other words,

rather than develop an extension to ksp to find the k-shortest distinct routes, we will move on to a DFS forall distinct routes. With only a

length sort to be added this will also provide the k-shortest distinct routes.



Figure 4-15. k-shortest disjoint and distinct routes (up to six hops) in the example network.



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks



4.5.1 All Distinct Routes

The set of all distinct routes on a graph up to a certain hop (or distance) limit,H, is needed in certain problem formulations for mesh network

capacity design. As with ksp, our interest is only in non-looping routes. Finding all distinct routes can be a challenging task, however,

n

n

simply because there are O(2 ) such routes possible between node pairs in a graph ofn nodes (and Q(2 ) in a fully connected mesh onn



nodes). More specifically, if we have a network of S spans and are using a hop limitH < S we could expect a bound of

.In many

planning problems, however, the set of such routes needs to be computed only once for a given topology and may then be stored and

used as a sort of database for different optimization studies that need various subsets or filtered selections of routes from the set of all

distinct routes for their formulation.

The algorithm for all-distinct routes (equivalently all distinct paths in a simple graph) is a type of depth-first search (DFS) algorithm. This

algorithm thus also serves as an example to introduce DFS as a basic method underlying other algorithms to follow. In DFS in general,

one starts at a source or root node that is problem-specific. Here, it is one of the end nodes of the node pair between which all distinct

paths are desired. From this node one takes an excursion out on any span incident at the source, marking that span as having been

visited. At the node thus reached, this is repeated. At each node the rule is to take an unmarked span, mark it, and head further down to a

next node if possible. For all distinct routes, whenever the target node is discovered, the process records a route and backs up to the

penultimate node in the route. If all spans are marked at that node, it backs up again. At the first such node found during this backtracking,

where there is an unmarked span, the DFS search branches down that span and continues as above. Any time the search depth reaches

H hops (or an accumulated distance limit) without discovery of the source, or if a loop is discovered in the route, the process also backs

up. A potential loop is discovered when the unmarked span currently branched upon leads to a node that is already a parent of the node

from which branching just occurred. In this case the span is marked and the branch is not taken. An important detail is that as the process

backs up from any node, all spans at the node that it is leaving, except the one to the parent to which it is returning, are unmarked upon

departure from the node. This is necessary so that spans that are part of an early route discovery are left free to be incorporated in distinct

routes later discovered from different approaches. But the current search path will not be explored any further in that direction. Thus, when

a whole region of the search tree is completed, all spans are left unmarked except the one incident on the source from this region. A

pseudo-code version of the algorithm follows.



procedure AllDistinctRoutes(graph G, source node, target node) {

node := source

depth := 0

[route] := [null]

Repeat {

all booleans := false



StepAhead(done_at_this_node)

if not done_at_this_node {

if node in [route] {

loop := true }

if node = target {

foundroute := true }

if depth = H {

hoplimit := true }}

if done_this_node or loop or hoplimit {

Backup

} else if foundroute {

record_route



Backup}

} Until node = source and unmarked_spans(source) = null}



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks.



procedure StepAhead(done_at_this_node) {

done_at_this_node := false

span := next([unmarked_spans(node)])

if span = null {

done_at_this_node := true

return

} else {

node :=neighbor(node, span)

mark(span)

depth := depth + 1

[route] := [route] + [node]}

return}



procedure Backup {

find_parent([route])

unmark([spans(node)] - [(node,parent)])

[route] := [route] - [(node,parent)]

depth := depth - 1

node := parent

return}

Figure 4-16 illustrates the DFS operation on the example network ofFigure 4-11 (Section 4.3.2) for a hop limit ofH = 3. The graph structure

of Figure 4-11 is reflected in the DFS search tree structure in that each node (other than the source node) appears at each level

sub-tended by the other nodes reachable from it. The blown up region with numbered arrows shows the sequence of "StepAhead" and

"Backup" operations that explore the branch from the source A having first span (A-B).



Figure 4-16. Operation of the depth-first search to find all distinct routes.



[ Team LiB ]



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

. it. Thanks



[ Team LiB ]



4.6 Maximum Flow: Concept and Algorithm

Let us now consider finding the maximum flow between two nodes in a capacitated network. First we will look at the important max-flow

min-cut theorem and then an algorithm to find the maximum flow quantity, and the role ofksp in providing path sets that closely approximate

the max-flow quantities.



4.6.1 The Min-Cut Max-Flow Theorem

A cut in a graph is a set of edges which, if removed, disconnect the graph. Alternately a cut in graphG can be thought of as specifying a

partition of the vertices of the graph into set P and its complement

cut (or cut-set) and the capacity of the cut, C(P,



. The set of edges (v,w) with v



P and w



is the corresponding



)is the sum of the capacities of each edge in the cut.



Equation 4.6



The min-cut max-flow theorem states that the largest flow that can be sent between two nodes cannot exceed the capacity of the minimum

cut between the two nodes. A bit more formally, if Fi,j is a flow (over possible many routes) between nodesi,j, then



Equation 4.7



and, specifically, if Fi,j is the maximum feasible flow, then there is a cut which hasC(P,



) = Fi,j and is the cut which has minimum



capacity over all cuts that separate i,j. In other words:



Equation 4.8



The min-cut max-flow theorem is easily understood if one thinks about bottlenecking arguments. It we think of it as a kind of bottleneck

theorem it states equivalently that between any two nodes of a network, some set of edges over which flow may be sent will be saturated

and act like a bottleneck, limiting the maximum flow. Let us again use the graph of Figure 4-11 for an example. In Figure 4-17 a sample of

five cuts are shown which separate source and target nodes A, H. There are many other cuts that also separate A, H but the point that this

sample illustrates is the same for the set of all such cuts. The point is that among the capacities of cuts 1 through 5, which are 15, 38, 25,



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks

37 and 22, respectively, the minimum is 15. Thus, regardless of any other the details, there can be no construction of a path-set between

A-H in this graph that has a capacity of more than 15. This is not dependent on routing details or cleverness of the routing algorithm: the

max-flow can't exceed the min-cut. In the example it is evident that the edges adjacent to node A themselves only support a total of 15

flow units. All the other edges in the graph could be given 100 or 1000 units of capacity but it would make no difference to the maximum

feasible flow between A, H (or H, A) because of the 15-unit capacity bottleneck defined by the {A-B, A-C, A-D} cut. Note that in finding the

maximum flow based on min-cut considerations we do not obtain a routing solution that realizes the max-flow, we only learn the max-flow

quantity for which some feasible path construction must exist.



Figure 4-17. Max-flow min-cut theorem says there is always a bottleneck somewhere that limits

the flow between nodes. The bottleneck is the min-cut.



4.6.2 Maximum Flow Algorithm

The max-flow min-cut theorem itself gives us, at least in principle, a way to compute the maximum feasible flow between nodes: find all

cuts of the graph (that partition the nodes of interest), compute the capacity of each cut, and take the smallest value. The trouble with this

n

approach is that the number of cuts grows exponentially with graph size. For a fully connected graph there are (2 -2) possible cuts. There

3

is, however, a polynomial time algorithm (O(n )) to find the maximum flow called the flow augmentation algorithm. It finds the maximum

flow quantity and in doing so identifies a minimum-weight cut.

The procedure is to find any initial feasible flow from source to target, say the flow over the shortest route, and then augment or improve

the flow iteratively until no further improvements are possible. The key to finding the flow augmenting opportunities is the adoption of a

directed orientation to edges of the graph as the algorithm proceeds. Basically, as we route an initial flow over an edge we give it the

direction that is implied by the initial flow and create an equal flow on an imaginary parallel edge with opposite direction. The imaginary

reverse direction flows in effect provide a means to represent that we may be willing to "take back" some of the initial flow assignment on

certain edges, if the overall flow can be improved. These adjustments effectively sense and saturate all edges in the min-cut. The process

is most easily seen by stepping through an example.

In choosing an example, however, Figure 4-11 will no longer serve us well because the min-cut of that network is indeed just the one

identified around node A with capacity of 15, which is also the capacity found by k-shortest paths. A more useful example to portray the

flow augmentation technique is one where the min-cut is located out in the "body" of the network, and where the ksp procedure would not

necessarily match the max-flow result. Hence let us work with the network in Figure 4-18 to find the max-flow from A–F. All edges have

unit length except B-C and D-E, which have an arbitrarily high length. The capacities are as shown in Figure 4-18(a). The topology is

contrived so that the ksp result and max-flow will not be identical to support later discussion of the trap topology concept.



Figure 4-18. Finding the max-flow quantity by the flow augmentation algorithm.



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks

.



Because edges B-C, D-E are "long" the shortest path is A-D-C-F with a flow of 6. And yet if we route such a flow we will find that no further

flow between A-F is possible, because the graph of remaining capacity is disconnected. At the same time, however, we can directly

identify the min-cut {B-C, A-D} with a capacity of 12. Thus, we start out seeing that ksp is quite different than max-flow in this example and

that at completion of the max-flow procedure we should expect a total flow solution of 12.



Step 1. Let us say a shortest path algorithm is used to find the initial flow of six. In Figure 4-18(b) we represent this initial flow,

f1.

Step 2. In (c) we draw the updated edge capacities (i.e., the remaining capacities on the edges after taking the initial flow) and

we create reverse-direction arcs of the same capacity as that in the forward direction associated with each initial flow over each

edge. Arcs with zero capacity are drawn as dashed lines.

Step 3. Next we search for an augmenting flow in the graph of (c), respecting the directionality of arcs now present. There is

only one route feasible: A-B-C-D-E-F with a directed flow, f2, of six.

Step 4. We again update the remaining capacities, treating the artificial arcs the same as any other, and adding any new

reverse arcs associated with the augmenting flow. The result is (e).

Step 5. In (e) there are no more paths feasible, so we halt. The max-flow result is the sum of the initial flow f1 plus the one

augmenting flow f2 found. The corresponding min-cut is also identifiable at this stage among the set of forward arcs left with

zero-capacity. Partition {A,B} {C,F,E,D} is identified as the min cut (corresponding to cutset A-D, B-C). Other cutsets are

contained within set of forward arcs having zero capacity upon termination, but all of these have higher cut magnitudes in the

graph of actual capacities. For example, C-F, D-C, A-D is also a cutset comprised of zero-capacity edges in Figure 4-18(e), but

those edges have total weight of 18 in Figure 4-18(a).



A key point for understanding the max-flow algorithm is that at the end of the example in Figure 4-18, f1 and f2 lead to identification of the

max-flow quantity of 12, but the routes of f1 and f2 (in (b) and (d) above), are not the actual routes of a path-set that realizes a flow of 12 in

this graph. One reason they cannot be is the edge C-D has capacity 6, not 12. In fact edge C-D is not used in a path construction to realize

max-flow in this network. If one path takes it, the other is blocked out. The max flow algorithm in effect realizes this aspect of the graph

through its reverse direction flow arcs. Figure 4-19 shows the actual construction that yields max flow inFigure 4-18. Pseudo-code for the

flow-augmenting max-flow algorithm is as follows:



[View full width]

procedure MaximumFlow(graph G, source node, target node) {



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks

i := 0

tot_flow := 0



find_shortest_path(G, source, target, [route])

flow := min(capacity of spans in [route])

repeat {

split_new_flow_edges(flow, [route])

find_shortest_path(source, target)

update_capacities(flow, [route])

if [route] not = [null] {

flow := min(capacity of spans in [route])

tot_flow := tot_flow + flow)}

} until [route] = [null] }



procedure find_shortest_path(source node, target node){

This can be an implementation of Dijkstra's algorithm with the added consideration of

each edge being treated as a directed pair of arcs, each with its own capacity.}



procedure split_new_flow_edges(flow, [route]) {

For any edge that is not yet "split" into a pair of anti-directional arcs that is

traversed by an initial or augmenting flow, convert the original edge into one forward arc

with capacity = (original capacity - flow value) and a reverse direction arc with capacity

equal to the flow value.}



procedure update_capacities(flow, [route]) {

For all forward and reverse-direction arc pairs, decrease their capacity by the amount

of any initial or augmenting flow that crosses them. }



Figure 4-19. In the max-flow algorithm edges are split into arcs representing the original flow

and the prospect of reversing that initial flow decision in a later flow-augmenting stage.



Note that the flow augmenting steps need not only involve flows over the reverse direction arcs. For instance, if the capacity of edge A-D

was eight (instead of six), then an additional iteration would find additional "conventional" flow of two on route A-D-E-F for a total flow of

14. In addition note that edges are not split into a pair of opposing directional edges until such time that a flow is actually routed over them

because it is only at that time that a "forward" sense is defined for the edge. This is illustrated in Figure 4-19.

A way to understand the role of the reverse direction arcs is that they represent the willingness to "give back" some of the initially

committed capacity on an edge, if it supports a later flow augmentation. To see this in the example we can look at the "naive" shortest path

flow and the path-set that actually corresponds to the max-flow value found, which are shown in Figure 4-20(a) and (c), respectively. The

comparison makes it clear how the initial routing is revised by effectively cancelling or rescinding the decision to route flow over the

diagonal edge (b), which is the key to realizing the max-flow value in this case. It also makes the point that the augmenting flows are only

intermediate vehicles to discover the max-flow quantity. They do not serve directly as the routes over which a feasible set of paths equal to

the max-flow can be constructed. The point of the algorithm is to find the max-flow value, not the max-flow path-set. The set of possibly

infeasible routes that nonetheless identify the max-flow quantity can, however, guide construction of the actual max-flow path-set by

excluding all edges that have no flow on them in either direction as well as any edge that has been split and (at the end of the procedure)

has forward and reverse arcs of equal (i.e., cancelling) flow. A set of actual paths that follows routing on this template set of edges and

conforms to the capacity of those edges is then a feasible max-flow path-set construction.



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

. it. Thanks



4.6.3 The Trap Topology

In the example just shown, we can see that ksp (with k=2) and max-flow are not equivalent. ksp will, by "greedily" first taking the shortest

route for 6 paths, make it impossible for itself to discover any further paths. In contrast, the max-flow solution requires using two routes,

[1]

neither of which is the shortest route. In other words, in the topology of Figure 4-18 ksp is trapped by its "greedy" nature. In fact, in all

cases where max-flow and ksp differ, it is always due in one form or another to a manifestation of a trap topology, which is a canonical

form of subnetwork structure in which taking a path on the shortest route(s) reduces the total number of paths that can be found. Figure

4-21 illustrates the trap topology in its minimal and higher order general form. There are at most two edge-disjoint paths between nodes 1

and 4. One path is 1-5-3-4, and the other is 1-2-6-4. However, if we choose the path 1-2-3-4, which may be shorter and hence chosen by

ksp, then only one edge-disjoint path from 1 to 4 can be created. This construction serves as an existence proof of the difference between

successive shortest path buildup of a total flow and true max-flow. It also gives insight as to what happens: in the trap topology, taking the

capacity on the shortest route first, as k-shortest paths is defined, foregoes the opportunity to create more total flow on two longer routes.

This is the sense in which ksp is a greedy algorithm. Note that as expected the capacity of the min-cut in Figure 4-21(a) or (b) is two, equal

to the maximum flow capacity. The question of practical interest is how often does a ksp path-set support less than the maximum flow?

[1]



In this context, "greedy" is a technical term in computing science. It refers to an algorithm that operates by

maximizing some goal on a particular subproblem. A complete solution is not approached globally, rather it is

developed as the accumulation of the greedily- (or myopically-) solved subproblems.



Figure 4-21. Canonical form of the trap topology—where ksp and max-flow may differ.



4.6.4 k-Shortest Paths as an Approximation to Maximum Flow

This question just posed was given theoretical and experimental treatment in [DuGr94]. The study compared max-flow andk-shortest paths

restoration quantities in over 300 randomly generated 50-node transport network models. The test networks varied systematically in

average nodal degree (network connectivity) and in average span locality. Locality is a measure defined in [DuGr94] to reflect the degree



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

4 Bhandari's Modified Dijkstra Algorithms

Tải bản đầy đủ ngay(0 tr)

×