• 沒有找到結果。

4 Algorithms for the MDBS Problem

4.1 Optimal Solutions for Special Cases

Optimal solutions can be found for the MDBS problem in polynomial time for regular linear networks and regular ring networks, as illustrated in Fig. 4. In such networks, each vertex is connected to one or two adjacent vertices and has an interference relation with each neighbor withinh hops from it, where h ≥ 2. In a regular linear network, we assume that the sink t is at one end of the network. Clearly, the maximum degree ofGI is2h. We will show that an optimal solution can be found if the number of slotsk ≥ h + 1. The slot assignment can be done in a bottom-up manner. The bottom node is assigned to slot 0. Then, for each vertexv, s(v) = (k+ 1) mod k, where k is the slot assigned tov’s child.

Theorem 2 For a regular linear network, ifk ≥ h + 1, the above slot assignment achieves a report latency of|V | − 1, which is optimal.

Proof. Clearly, the slot assignment is interference-free. Also the report latency of|V | − 1 is

clearly the lower bound. 2

For a regular ring network, we first partition vertices excludingt into left and right groups as illustrated in Fig. 4(b) such that the left group consists of the sink nodet and |V |−12 other nodes counting counter-clockwise fromt, and the right group consists of those |V |−12 nodes counting clockwise fromt. Now we consider the ring as a spanning tree with t as the root and left and right groups as two linear paths. Assuming that|V |−12 ≥ 2h and k ≥ 2h, the slot assignment works as follows:

1. The bottom node in the left group is assigned to slot 0.

2. All other nodes in the left group are assigned with slots in a bottom-up manner. For each nodei in the left group, we let s(i) = (j + 1) mod k, where j is the slot of i’s child.

3. Nodes in the right group are assigned with slots in a top-down manner. For each node i in the right group, we let s(i) = (j − c) mod k, where j is the slot assigned to i’s

12

0 1 2 0

t (a)

(b)

1 2 0 1 2 0

1

0 2

3 1 3

2

1 2

0

3

size:11 t

left group right group

l1

r1

r2 1

0

2 3

1 2

3

2 0

0 1

3 size:12

t

left group

right group

l1

r1

r2

Figure 4: Examples of optimal slot assignments for regular linear and ring networks (h = 2).

Dotted lines mean interference relations.

parent andc is the smallest constant (1 ≤ c ≤ k) that ensures that s(i) is not used by any of its interference neighbors that have been assigned with slots.

It is not hard to prove the slot assignment is interference-free because nodes receives slots sequentially and we have avoided using the same slots among interfering neighbors.

Although this is a greedy approach, we show thatc is equal to 1 in step 3 in most of the cases except when two special nodes are visited. This gives an asymptotically optimal algorithm, as proved in the following theorem.

Theorem 3 For a regular ring network, assuming thatk ≥ 2h and |V |−12 ≥ 2h, the above slot assignment achieves a report latencyL(G) = |V |−12 + h, which is optimal within a factor of 1.5.

Proof. We first identify three nodes on the ring (refer to Fig. 4(b)):

• l1: the bottom node in the left group.

• r1: the first node in the right group.

13

• r2: the node that ish hops from l1 counting counterclockwise.

The report latency of each node can be analyzed as follows. The parent of node x is denoted bypar(x).

A1. For each nodei in the left group except the sink t, the latency from i to par(i) is 1.

A2. The latency fromr1 tot is h.

A3. For each node i next to r1 in the right group but before r2 (counting clockwise), the latency fromi to par(i) is 1.

A4. The latency fromr2 topar(r2) is 1 if the ring size is even; otherwise, the latency is 2.

A5. For each nodei in the right group that is a descendant of r2, the report latency fromi to par(i) is 1.

It is not hard to prove that A1, A2, and A3 are true. To see A4 and A5, we make the following observations. The functionpari(x) is to apply i times the par() function on node x. Note that par0(x) means x itself.

O1. When the ring size is even, the equality s(pari−1(l1)) = s(pari(r2)) holds for i = 1, 2, ..., |V |−12 − h − 1. More specifically, this means that (i) l1 and par(r2) will receive the same slot, (ii)par(l1) and par2(r2) will receive the same slot, etc. This can be proved by induction by showing that thei-th descendant of t in the right group will be assigned the same slot as the (h + i − 1)-th descendant of t in the left group (the induction can go in a top-down manner). This property implies that when assigning a slot to r2 in step 3, c = 1 in case that the ring size is even. Further, r2 and its descendants will be sequentially assigned to slotsk − 1, k − 2, ..., k − h, which implies thatc = 1 when doing the assignments in step 3. So properties A4 and A5 hold for the case of an even ring.

O2. When the ring size is odd, the equalitys(pari(l1)) = s(pari(r2)) holds for i = 1, 2, ...,

|V |−12 − h. This means that (i) par(l1) and par(r2) will receive the same slot, and 14

(ii)par2(l1) and par2(r2) will receive the same slot, etc. Again, this can be proved by induction as in O1. This property implies thatc = 2 when assigning a slot to r2 in step 3, andc = 1 when assigning slots to descendants of r2. So properties A4 and A5 hold for the case of an odd ring.

The equality of slot assignments pointed out in O1 and O2 is illustrated in Fig. 4(b) by those numbers in gray nodes. In summary, the report latency of the left group is|V |−12 . When the ring size is even, the report latency of the right group is the number of nodes in this group, |V |2 , plus the extra latencyh − 1 incurred at r1. SoL(G) = |V |2 + h − 1 = |V |−12 + h.

When the ring size is odd, the report latency of right group is the number of nodes in this group, |V |−12 , plus the extra latencyh − 1 incurred at r1 and the extra latency 1 incurred at r2. SoL(G) = |V |−12 + h.

A lower bound on the report latency of this problem is the maximum number of nodes in each group excludingt. Applying |V |−12 as a lower bound and using the fact that |V |−12 2h, L(G) will be smaller than 1.5 × |V |−12 , which implies the algorithm is optimal within a factor of 1.5. Note that the condition|V |−12 ≥ 2h is to guarantee that t will not locate withinh hops from r2. Otherwise, the observation O2 will not hold. 2

相關文件