• Keine Ergebnisse gefunden

FPTAS for Instances with Constant Level Size

5.2 The Discrete Power-Delay Tradeoff Problem

5.2.3 FPTAS for Instances with Constant Level Size

Chu and Wong [CW01] cannot be extended to show convergence of this variant in general.

5.2 The Discrete Power-Delay Tradeoff Problem The number of edges entering and traversing a gate are obviously bounded by a constant, so we can assume that |Ei|is bounded byO(lmax).

A level-i solution is an assignment of sizes to all gates in L≤i+1. Different level-i level-isolution

solutions will be distinguished by the sizes of gates in levels iandi+ 1, the delays of all edges in Ei and the power of all gates in L≤i+1. Note that a level-isolution also defines the sizes of all gates in leveli+ 1, as these influence the delays through gates in level i. The basic idea behind the solution enumeration is to iteratively compute level-isolutions for all 1≤i≤l.

Level-1 solutions are computed by enumerating all available sizes for the gates in levels 1 and 2. For i > 1, the algorithm integrates the size assignments for gates inLi+1 into the level-(i−1) solutions by enumerating all possible sizes for gates in level i+ 1. For each combination of level-(i−1) solution and size assignment for Li+1, a new solution is generated.

Thereby solutions are pruned as follows: Given two level-isolutions that only differ in the power consumption of all gates in L≤i+1, we only keep the solution with the smallest power consumption. As both solutions have the same impact on the delays in Ei+2, the solution sets generated in the following levels based on these level-isolutions would only differ in their power consumption. As we are interested in minimizing tr(x, ω), the solutions with larger power consumption are certainly not optimal.

There are at most ζ sizes available for each gate and at most lmax gates per level, therefore at most O ζ2lmax

level-1 solutions and at most O ζ3lmax

level-2 so-lutions are computed etc. When reaching level l, the number of solutions would depend exponentially on l.

Therefore we bound the number of different edge delays in all Ei, and thus the number of level-i solutions. This can be achieved by rounding edge delays: When enumerating level-isolutions, we round delays inEi to the nearest integer multiple of Rm, i.e.delaye(x) is rounded tobdelaye(x)·Rmc ·Rm,x∈Xdisc. Then we perform power pruning using the rounded edge delays for comparison, and only keep the solution with the smallest power consumption cost(x).

As we are interested in a solution whose value is approximately bounded by F, we additionally prune solutions with cost(x) +Dr(x) > F in line 13 of Algorithm 5.6, as these cannot occur in any feasible solution. Here Dr(x) := P

j<iDrj(x) + Dr(x), Djr(x)

P

e∈Eidelaye(x), andDrj(x) is the sum of rounded edge delays inEj.D(x) denotes D(x)

the sum of unrounded delays for all edges.

It is easy to see that after rounding in line 15 there exist only O(m) different delay assignments for each edge: As solutions with cost(x) +D(x)> F ⇔D(x)≤ F−cost(x) are pruned, and edge delays are rounded to the nearest integer multiple of Rm, the largest integer multipleθ that can occur in any solution is bounded:

θ·R

m ≤F−cost(x)≤F ⇔ θ≤ F m

R ≤O(m ),

because R ∈ {12F, F}. Consequently, there are at most O(m) different delay

Algorithm 5.6Power-delay bounded level based dynamic programming

1: procedure FPTASOracle(F, R, )

2: for1≤i≤ldo

3: if i= 1 then

4: compute all level-1 solutions

5: else

6: foreach level-(i−1) solution do

7: compute all level-isolutions by enumerating all size assignments for gates in Li and Li+1

8: end for

9: end if

10: for each level-isolution x do

11: Dr(x)←P

j<iDrj(x) +P

e∈Eidelaye(x)

12: if cost(x) +Dr(x)> F then

13: prune x

14: else

15: round edge delays of all e∈Ei to the nearest multiple ofR/m

16: end if

17: Dri(x)← sum of rounded delays inEi

18: if cost(x)> O(x0) and Dri(x) =Dir(x0) for a level-isol. x0 6=x then

19: prune x

20: else

21: prune x0

22: end if

23: end for

24: i←i+ 1

25: end for

26: returnsolutionxwithcost(x)+P

i≤lDri(x) smallest, or no feasible solution

27: end procedure

assignments for each edge in Ei, and O (m)lmax

different delay assignments for each combination of gate sizes in Li and Li+1. Thus, the number of solutions generated at each level is O ζ2lmax(m)lmaxζlmax

, of which O ζ2lmax(m)lmax are kept.

For all levels we obtain a running time of O nζ3lmax ·(m)lmax

: The number of levels is bounded by n, and the running time of the pruning step in each level is O ζ3lmax·(m)lmax

if the solutions are stored in a multidimensional array as in Liao and Hu [LH11]. Computing the cost of a level-isolution and finding the level-i solution with the same size assignment in Li and Li+1 and the same delays in Ei can then be done in O(lmax) time, which is assumed to be bounded by a constant.

The rounding error of each edge is bounded by Rm. As there are m edges, the rounding error of all edges is bounded byR. As desired, unscaling the delays of a

5.2 The Discrete Power-Delay Tradeoff Problem

solution returned by the algorithm gives

cost(x) +D(x) +R≤F +R≤(1 +)F.

A Fully Polynomial Time Approximation Scheme

Algorithm 5.7 FPTAS for the discrete power-delay tradeoff problem

1: procedure FPTAS()

2: Compute lower and upper boundsF L < F U ∈R on the optimal valueF

3: k←1, F U1 ←F U, F L1 ←F L

4: whileF Uk/F Lk>2 do

5: k←p

F Uk/F Lk−1,Fk ←p

F UkF Lk/(1 +k)

6: if FPTASOracle(Fk, Fk, k) returns a feasible solution then

7: F Uk+1←(1 +k)Fk

8: else

9: F Lk+1←Fk

10: end if

11: k←k+ 1

12: end while

13: return FPTASOracle(F Uk, F Lk, )

14: end procedure

Algorithm 5.7 presents the FPTAS for problem (5.2). It is based on a binary search technique for the optimal valueFof (5.2) which was originally developed by Ergun et al. [ESZ02] for the restricted shortest path problem, and adapted by Liao and Hu [LH11] for delay-minimizing gate sizing.

In each step the oracle Algorithm 5.6 checks if the guessed valueF is approximately close to F. By Theorem 5.13 the oracle either returns a solution x ∈Xdisc with tr(x, ω) ≤ (1 +)F and we can conclude that F ≤ (1 +)F, or there exists no solution with tr(x, ω)≤F. The approximation ratiodecreases in each step until we are sufficiently close to the optimal solution. Hence the last call to Algorithm 5.6 in line 13 with our desired approximation ratio dominates the running time of the binary search.

Let F U ∈ R≥0 be an upper bound and F L ∈ R≥0 be a lower bound on F, respectively. We obtain a lower bound by summing up the power values of the smallest sizes available for all gates, and the minimum delay value for each edge.

The upper bound can be computed in a similar fashion.

Theorem 5.14 Algorithm 5.7 computes a solution x∈Xdisc with tr(x, ω) ≤(1 + )F in time

O(nζ3lmax·(m/)lmax)

for 0< <1 and constant level sizeζ. For ≥1 this is O(nζ3lmaxm).

Proof. The proof is basically due to Liao and Hu [LH11] and Ergun et al. [ESZ02].

LetF UkandF Lkdenote the upper and lower bound in iterationk, respectively. We

F Uk,F Lk

setk=p

F Uk/F Lk−1 andFk=p

F UkF Lk/(1 +k) and callOracle(Fk, Fk, k)

k, Fk

in iteration k.

If the oracle returns true, F Uk+1 will be set to (1 +)Fk, and F Uk+1/F Lk = (1 + )Fk/F Lk holds. Otherwise F Lk+1 will be updated to Fk and we have F Uk+1/F Lk = F Uk/Fk. The binary search stops as soon as F Uk/F Lk < 2 for somek >0.Let ¯kbe this iteration. In each iteration, the ratioF Uk/F Lkdecreases because

F Uk+1/F Lk+1 ≤(F Uk/F Lk)3/4 ∀k, (5.9) which follows from the definitions of Fk and k. The running time of the oracle algorithm in iteration k is O(nζ3lmax ·(m

k)lmax). As k = p

F Uk/F Lk −1 and F Uk >2F Lk until the last step of the binary search, we have

pF Lk/F Uk≤1/k ≤(2 +

√ 2)p

F Lk/F Uk

by elementary transformation. The total running time of the binary search then is:

O(nζ3lmaxmlmax·P

k≤k¯(1/k)lmax)

= O(nζ3lmaxmlmax·P

k≤¯k(p

F Lk/F Uk)lmax).

It remains to show thatP

k

pF Lk/F Uk=O(1) to get the desired running time of the binary search:

X

1≤k≤¯k

pF Lk/F Uk = X

0≤k<¯k

(F Lk/F Uk)12·(43)k

≤ X

0≤k<¯k

212·(43)k

≤ 212 X

0≤k<¯k

δk

≤ 212/(1−δ)≤6.5,

with δ = 216 < 1 and F L0 := F L, F U0 := F U. The first equality follows from equation (5.9). The first and second inequality hold because F Uk > 2F Lk and 212·(43)k+1 ≤δ·212·(43)k. Putting together, binary search takesO(nζ3lmaxmlmax).

Now consider the stage when the binary search terminates and F U¯k/F L¯k < 2.

We call the oracle once more with input (F U¯k, F L¯k, ), where is the desired approximation ratio. Solutions x are pruned if cost(x) +Dr(x) > F U¯k, which ensures that at least one solution is not pruned and Algorithm 5.6 returns a feasible solution. In the end we choose the solution x withcost(x) +P

i≤lDri(x) minimal.

5.2 The Discrete Power-Delay Tradeoff Problem

Since we only round down edge delays, the rounded solution fulfills tr(x, ω)≤F+F Lk¯≤(1 +)F.

With the running time from the binary search, the total running time of our algo-rithm is O(nζ3lmaxmlmax) +O(nζ3lmaxmlmax·(1)lmax) =O(nζ3lmaxmlmax ·(1)lmax).

For >1 this isO(nζ3lmaxmlmax).

Remark 5.15 Depending on the closeness of the upper and lower bound, the delay values might all be rounded to zero. This can be checked easily in advance by rounding the maximum delay value that can occur in any solution. If this value is rounded to zero, it is not necessary to run the oracle algorithm and we can simply check if the power of the minimum size solution is smaller than the guessed value Fk, and use this output to continue with the binary search.

6 Lagrange Relaxation based Gate Sizing

Lagrangian relaxation is one of the mathematically best-founded approaches for gate sizing. A Lagrange multiplier is introduced for each timing constraint in the convex program, and the arrival time variables can be eliminated if the Lagrange multipliers fulfill the flow conservation rule at all vertices v ∈Vinner in the timing graph. The existence of a strongly feasible solution guarantees a zero duality gap.

Despite being based on the convex program formulation of the continuous relax-ation, the approach can be discretized by solving a discrete Lagrange primal prob-lem, which is successfully applied in practice.

The projected gradient method solves the dual problem for the continuous relax-ation, but the convergence rate is unknown. No convergence guarantee exists for the discretized algorithm.

The literature on the Lagrange relaxation approach is extensive, but theoretical aspects were often not considered. We give the first comprehensive discussion of this approach both from a theoretical and practical perspective.

First we formulate the Lagrange primal and dual problem following the groundwork paper of Chen, Chu and Wong [CCW99]. In practice, the dual problem is usually tackled by variants of the projected subgradient method. Wang et al. [WDZ07]

proved that the dual objective function is differentiable, allowing the use of the projected gradient method. In Section 6.2 we analyze properties of the dual func-tion, convergence guarantees of the projected gradient method that have not been considered before, and alternatives to this method.

In each iteration of the projected gradient method, the Lagrange primal problem needs to be solved in order to get a new descent direction (Section 6.3), which is the power-delay tradeoff problem discussed in Chapter 5. Because no approxima-tion algorithms are known for the discrete power-delay tradeoff problem except for special cases, no convergence guarantees for the discretized Lagrangian relaxation approach exist.

The Lagrange multipliers are projected to the space of non-negative network flows in the timing graph in each iteration of the projected gradient method. This can be formulated as a quadratic minimum cost flow problem and be solved in strongly polynomial time. We compare exact, approximate and heuristic projection algo-rithms in Section 6.4.

The performance of the discretized Lagrangian relaxation approach and the diffi-culties in obtaining approximations are discussed in Section 6.5.

Finally, we show that convergence of the projected gradient method for the contin-uous relaxation can still be guaranteed if electrical constraints and constraints on placement density are incorporated into this framework (Section 6.6).

6.1 Lagrangian Relaxation Formulation

Recall the convex program (4.10) for the continuous relaxation:

mincost(x)

subject to av+delaye(x)≤aw ∀e= (v, w)∈E.

Recall that the arrival time variables are fixed for all v ∈ Vstart∪Vend. We relax the timing constraints as in Chen et al. [CCW99] by introducing a non-negative Lagrange multiplier λe for each constraint and e ∈ E. Let λ := (λ1, . . . , λm) be the vector of these multipliers. The upper and lower bounds on the gate sizes (i.e.

x∈Xcont) are kept as these are easier to handle. The Lagrange function augments

L(λ, a, x)ˆ

the objective function with the relaxed constraints:

L(λ, a, x)ˆ := cost(x) + X

e=(v,w)∈E

λe(av+delaye(x)−aw), (6.1) and the Lagrange primal problem is to minimize the Lagrange function:

inf L(λ, a, x)ˆ (6.2)

subject to x∈Xcont.