• Nenhum resultado encontrado

From fractional flows to paths

No documento Distributed Inference in Sensor Networks (páginas 36-41)

Linear programming relaxation

4.3 From fractional flows to paths

We solve (4.1) and obtain a fractional flowx?tfas the solution. How can we extract a (hopefully good) path from x?tf? We use a technique based on a core result in network theory: the flow decomposition theorem.

Flow decomposition theorem. The flow decomposition theorem states that any fractional flow can be seen as a mixture of binary flows and circulations. In particular, xtf? can be written as a linear combination of several binary flows and a residual fractional flow distribution:

xtf?1ztf(1)2ztf(2)3z(3)tf +· · ·+ζNztf(N)+x(N)tfR (4.2) where 0 ≤ ζi ≤ 1 are weights,ztf(i) are the binary flows and x(NtfR) is a fractional residual flow. Equa-tion (4.2) expresses the fracEqua-tional flowx?tfas a superposition ofNbinary flows plus an residual fractional leftover.

The number of binary flows is not knowna priori but the flow decomposition theorem provides an upper bound: for a flow in a generic graph, N ≤ P +C where P is the total number of paths and C is the total number of directed cycles. Because we are optimizing over the ST G—which is acyclic by construction—we have C = 0. A bound for P is the number of nodes in the graph; for the ST G:

P ≤ |V|tf=K|V|+ 2.

Since each z(i)tf is a binary flow on the STG, it corresponds to a path in G. By carrying out the decomposition in (4.2) we thus find N paths embedded in x?tf that are (hopefully) good for the prize accumulation problem.

We now explain how to perform the flow decomposition, i.e., we describe a method that takes in a fractional flowx?tfand outputs the data on the right side of (4.2).

Flow decomposition algorithm. The method is iterative. It reveals the data one piece at a time leaving less and less flow in the residual as the iterations proceed. In the first iteration, we look atx?tf

and obtain a weightζ1, a binary flowz(1)tf and a residual fractional flowx(1)tfR:

x?tf1ztf(1)+x(1)tfR.

In the second iteration, we look at the residual x(1)tfR and obtainζ2, ztf(2) and a reduced residual x(2)tfR: x(2)tfR2ztf(2)+x(2)tfR. Thus, at this point:

x?tf1z(1)tf2ztf(2)+x(2)tfR.

And so on. Each iteration looks at the previous residual and tries to decompose it further. The weights ζi decrease along iterations,ζ1 ≥ζ2 ≥ · · · ≥ζN, meaning that the dominant paths are disclosed first.

The method is given as Algorithm 4.1.

Algorithm 4.1Flow Decompositon procedureFINDPATH(Gtf,xtf)

token←s ztf(i)←0|Etf|| ζi←1

whiletoken6=tdo

Outset←FINDOUTGOINGARCSFROMNODE(token, Gtf)

(maxF lowArc, maxF lowM agnitude)←GETMAXFLOWARCFROMSET(Outset, xtf) ztf(i)j←1, wherej←INDEXOF(maxF lowArc)

nextN ode←NODEPOINTEDBYARC(maxF lowArc) ifmaxF lowM agnitude < ζithen

ζi←maxF lowM agnitude end if

token←nextN ode end while

returni, ztf(i)} end procedure

procedureCOMPUTERESIDUALFLOW(xtf,ztf(i)i) returnxtfR←(xtf−ζiztf(i))

end procedure

The mechanics of Algorithm 4.1. For each iteration, we insert a token in the source nodesat the top of the STG and descend the token—from temporal layer down to temporal layer—till it reaches the sink nodetat the bottom of the STG; to lower the token from a given node, we choose the outgoing arc that carries the largest amount of residual flow.

The path traced by the token defines a binary flowz(i)tf . We define the corresponding weightζi to be the minimum flow in the arcs composing the path. Since we inject one unit of flow in the STG, the weights lie in the range[0,1].

We then subtract the flowζiztf(i)from the current residual to obtain the next residual and repeat the procedure (unless the new residual is empty and we stop).

We now detail the elements present inside the algorithm. The variable ztf(i) is the path (binary flow computed by the algorithm at iteration i, token is the current node the algorithm is focusing on, maxF lowM agnitudeis the largest amount of flow departing from a node through a specific arc andxtf

is the fractional flow distribution given as input.

FindOutgoingArcsFromNode finds the set of arcs in the STGGtfthat depart from the given node.

GetMaxFlowArcFromSet locates the arc in given input set with the largest amount of flow.

IndexOf gets the corresponding index number of the input arc.

NodePointedByArc gets the node pointed by the the input arc.

4.4 Numerical results

We tested the performance of the relaxation approach in the graph with20 nodes from figure 1.1.

Figure 4.1 compares the prize accumulated by the linear relaxation against the prize collected by the brute-force search (the optimal solution). Unfortunately, as we can see, the relaxation approach achieves very poor performance. We explain why in the next paragraph.

2 4 6 8 10 12 14 16 18 20 22

1200 1400 1600 1800 2000 2200 2400 2600

[Linear Program − Flow Decomposition Search]

Absolute Total Collected Prize vs. Path Length

Path Length [node]

Absolute Merit

LP−FD Search Optimal Search

Figure 4.1: Prize accumulated by both the brute-force method and the linear relaxation versus path length.

Zigzag behavior of the fractional solution. In the STG, at each transition from temporal layer to the bottom one, we have a subset of arcs associated with a subset of entries of x?tf. Hopefully, the flow decomposition reveals that one of those arcs carries much more flow than the alternative ones for that layer hop. This strongly suggests that an optimal binary solution z?tf uses that leading arc to bridge between those layers.

Unfortunately, for the graph in figure 1.1, we do not see the flowx?tf concentrating in a single arc between layers. Instead, when we apply the flow decomposition method to the optimal solutionx?tf—for several path lengths—we find thatx?tfsnakes around the same subset of best nodes (those with bigger prizes) across the several layers in the STG. This phenomenon is hard to visualize for the graph in

figure 1.1, since its STG is rather complicated to draw. But we can illustrate the same phenomenon for the small graph from figure 4.2. It is easy to find an optimal path with lengthK= 4:1→3→6→7.

v

1

v

2

v

4

v

3

20

20

v

5

v

6

v

7

19 19

5 20

20

Figure 4.2: Small graph with prizes next to nodes.

In figure 4.3 we display a fractional solutionx?tfwith the flow magnitudes written next to the arcs. We see that x?tf keeps flowing through the arcs leading to the best nodes—v1,v2, v3 andv4—thus visiting them several times along the STG journey. The flow decomposition method, applied tox?tf, extracts a path looping around the pair(v1, v3)and a path lopping around the pair(v2, v4). These paths have poor performance in the graph from figure 4.2.

v1,1

v3,1

v4,1 v2,1

l=2

v1,2

v3,2

v4,2 v2,2

l=4=K

v1,0

v3,0

v4,0

v2,0

l=1

s

0.5 1

t

1 0.5

0.5 0.5

0.5 0.5

0.5 0.5

v1,1

v3,1

v4,1

v2,1

l=3

0.5

0.5

Figure 4.3: Zigzag behavior of a fractional solution to the graph in figure 4.2. We omitted the nodes related tov6andv7to focus on the zigzag phenomenon.

Chapter 5

No documento Distributed Inference in Sensor Networks (páginas 36-41)

Documentos relacionados