Group Title: Department of Computer and Information Science and Engineering Technical Reports
Title: Performance driven graph enhancement problems
Full Citation
Permanent Link:
 Material Information
Title: Performance driven graph enhancement problems
Series Title: Department of Computer and Information Science and Engineering Technical Reports ; 92-036
Physical Description: Book
Language: English
Creator: Sahni, Sartaj
Paik, Doowon
Affiliation: University of Florida
AT&T Bell Laboratories
Publisher: Department of Computer and Information Sciences, University of Florida
Place of Publication: Gainesville, Fla.
Copyright Date: 1992
 Record Information
Bibliographic ID: UF00095151
Volume ID: VID00001
Source Institution: University of Florida
Holding Location: University of Florida
Rights Management: All rights reserved by the source institution and holding location.


This item has the following downloads:

199267 ( PDF )

Full Text

Performance Driven Graph Enhancement Problems*

Doowon Paika and Sartaj Sahnib

aAT&T Bell Laboratories, Murray Hill, NJ
Computer and Information Sciences Department, University of Florida, Gainesville, FL


Graphs may be used to model systems in which performance issues are crucial. Cost effective perfor-
mance enhancement of these systems can be accomplished by solving a graph enhancement problem
on the associated graph. We define several graph enhancement problems. Some are shown to be NP-
hard while others are polynomially solvable.

When designing systems such as VLSI circuits or communication networks, one needs to make deci-
sions that affect the performance of the resulting design. Often, the system is designed making one set
of choices. The performance of the resulting design is determined. If this is found to be unsatisfac-
tory, then one proceeds to change some of the design decisions so as to bring the system performance
into the desired range. For example, we may design a circuit using certain circuit modules. Associ-
ated with each module is a delay. The circuit can be modeled as a directed acyclic graph (dag) with
vertex weights. The vertices correspond to the circuit modules and the weights to the module delays.
The sum of the vertex weights on any path gives the path length. The length of the longest path in the
dag gives the circuit delay. If this delay exceeds the maximum allowable delay, then one can reduce
the delay by choosing a different (and faster) implementation. However, choosing the faster imple-
mentation has a cost or weight associated with it. This results in a dag optimization problem: find a
least weight vertex set whose upgrading results in a dag in which no path has length more than 6. In a
simplified version of this problem, there is a factor x, 0 < x < 1 such that the upgraded module has a
delay that is x times that of the original module. Let DVUP(x, 6) denote the dag vertex upgrade prob-
lem in which d(i) is the delay of vertex i and w (i) its weight.
In an alternate modeling of signal flow in electronic circuits by dags [CHAN90, GHAN87,
MCGE90], vertices represent circuit modules and directed edges represent signal flow. In a simplistic
model, each edge has a delay of one. A module can be upgraded by replacing it with a functionally
equivalent one using a superior technology. This reduces the delay of all edges incident to/from the
+This research was supported, in part, by the National Science Foundation under grant MIP 91-03379.

module by a multiplicative factor x, 0 < x < 1. In a simplistic model, this reduction factor is the same
for all circuit modules. The cost of the upgrade is reflected in the weight associated with the vertex.
Again, in a simplistic model, each vertex has unit weight (i.e., all vertices cost the same to upgrade).
Since signals can travel along any of the paths of the dag, the performance of the circuit is governed
by the length of the longest path in the dag. We wish to meet certain performance requirements by
upgrading the fewest possible number of vertices. This is stated formally below [PAIK91d]:
LongestPath(x, 8)
Given a dag G = (,E) with positive edge delays upgrade the smallest number of vertices so that the
longest path in the upgraded graph has delay < 6 When a vertex is upgraded, all edges incident
to/from it have their delay changed by the multiplicative factor x So, if edge has delay d
before the upgrade, its delay is x*d following the upgrade. If both v and w are upgraded, its delay
becomes x2*d.
As another example, consider a communication network. This can be modeled as an undirected
connected graph in which the edge delays ( 0) represent the time taken to communicate between a
pair of vertices that are directly connected. Two vertices that are not directly connected can commun-
icate by using a series of edges that form a path from one vertex to the other. The total delay along
the communication path is the sum of the delays on each of the edges on the path. With respect to this
undirected graph model, the following problems may be defined [PAIK9 d]:
1. LinkDelay(x, 6)
In this problem, it is possible to upgrade each of the vertices in the undirected graph. If vertex v is
upgraded, then the delay of each edge incident to v reduces by a factor x, 0 < x < 1 The problem is to
upgrade the smallest number of vertices so that following the upgrades, no edge has delay > 6 .
2. \lh, it, ,tPath(x, )
Upgrading a vertex has the same effect on edge delays as in LinkDelay(x, 8 ). This time, however, we
seek to upgrade the smallest number of vertices so that following the upgrade there is no pair of ver-
tices u and v for which the shortest path between them has delay > 6 .
3. Satellite(6)
When a vertex is upgraded, a satellite up link and down link are placed there. Two vertices with satel-
lite links can communicate in zero time. Let dist(x, y) be the length of the shortest communication

path between vertices x and y. Let CommTime(G) be max { dist (x, y) } where V(G) is the set of
x, y e V(G)
vertices in G. The objective is to upgrade the smallest number of vertices so that CommTime(G) < 6.
Note that there is always a shortest communication path between two vertices that uses either 0 or 2
satellite vertices (to use a satellite link there must be a send and a receive vertex; further there is no
advantage to using more than one satellite link in any communication).
Each of the problems stated above is a simplified version of a more realistic problem. The more
realistic problem has different costs associated with the upgrade of different vertices and the upgrade
factor also varies from vertex to vertex.

Paik, Reddy, and Sahni [PAIK90, 93] model the optimal placement of scan registers in a partial
scan design as well as the placement of signal boosters in lossy circuits as a vertex splitting problem
in a dag. The input dag (which represents the circuit) has edge delays and the objective is to split the
fewest number of vertices so that the resulting dag has no path of length > 8. When a vertex is split, it
is replaced by two copies; one retains the incoming edges and the other the outgoing edges. The dag
vertex splitting problem is denoted DVSP(6).
The dag vertex deletion problem, DVDP(6), is concerned with deleting the fewest number of
vertices from an edge weighted dag so that the resulting dag has no path whose length exceeds 6. In
[PAIK91a], Paik, Reddy, and Sahni used this problem to model the problem of upgrading circuit
modules so as to control signal loss.
Krishnamoorthy and Deo [KRIS79] have shown that for many properties, the vertex deletion
problem is NP-hard. These properties include: resulting graph has no edges, resulting graph is a
clique, each component of the resulting graph is a tree, each component of the remaining graph is
planar, etc. We shall not discuss any of these results here as none of the properties considered in
[KRIS79] apply to graphs with vertex and/or edge weights.
In subsequent sections, we summarize the known results regarding the problems stated above.
We shall make use of the following known NP-hard problems [GARE79].
1. Partition

Input: A set ofn positive integers a,, 1 i < n.
Output: "Yes" iffthere is a subset, I, of {1, 2, ..., n} such that
a,= a,/2
Iel z=l

2. Vertex Cover

Input: An undirected graph G = (V, E) and a positive integer k Output: "Yes" iffthere is a subset V c V with IV'| < k such that for each edge (u,v) e E at least one
ofu and v belongs to V'.
3. Dominating Set
Input: An undirected graph G = (V, E) and a positive integer k Output: "Yes" iff there is a subset V c V with IV'| < k such that for u e V-V there is a v e V for
which (u, v) E E.
4. Maximum Clique
Input: A connected undirected graph G = (V, E) and a positive integer k I I|
Output: "Yes" iffthere is a subset V' c Vwith IV' >2 k such that two vertices in V' are joined by an
edge in E.
5. Exact Cover By 3-Sets (X3C)

Input: Set Xwith X = 3q and a collection C = {C, C2, ..., Cm of three element subsets of X such
that UC, =X.
Output: "Yes" iffC contains an exact cover forX, i.e., a subcollection C' c C such that every ele-
ment ofX appears in exactly one member of C'.

6. 3SAT Problem

Input: A boolean function F = C 2 C2 in n variables x1, x2 ..., x. Each clause C, is the dis-
junction of exactly three literals.

Output: "Yes" if there is a binary assignment for the n variables such that F= 1. "No" otherwise.


Let G = (VE,w) be a weighted directed acyclic graph (wdag) with vertex set V, edge set E, and edge
weighting function w. w (i,j) is the weight of the edge < i,j > E. w (i,j) is a positive integer for
< i,j > E E and w (i,j) is undefined if < i,j > E. A source vertex is a vertex with zero in-degree while
a sink vertex is a vertex with zero out-degree. The delay, d(P), of the path P is the sum of the weights
of the edges on that path. The delay, d(G), of the graph G is the maximum path delay in the graph, i.e.,

d(G) = max { d(P)}
Pin G
Let G I Xbe the wdag that results when the vertices of X are deleted from the wdag G. Note that
the deletion of a vertex also requires the deletion of all incident edges.
It is easy to see that DVUP(0,6) is NP-hard. In fact, the problem is NP-hard for dags that are
chains. To prove this, we use the partition problem. Construct a chain ofn vertices with d(i) = w (i)=
a,, 1 i < n. It is easy to see that there is an I such that a a, = a,/2 iffthe minimum cost X such that
n n
eI 1z=1

d(G IX) < a/2 has cost a,/2. Note that when x = 0, a vertex upgrade is equivalent to a vertex
1 1 =-i
deletion. In the remainder of this section, we assume x = 0.

2.1 General Dags

2.1.1 Unit Delay Unit Weight DVUP

A dag G = (V, E) is a unit delay unit weight dag iffd(v) = w (v) = 1 for every vertex v V. A subset X
of Vis k-colorable iff we can label the vertices of Xusing at most k labels and such that no two adja-
cent vertices have the same label. A maximum k-coloring of a dag G is a maximum subset X c Vthat
is k-colorable. A dag G is transitive ifffor every u, v, w E G such that E E and e E, the
edge is also in E. G+ = (V, E+) is the transitive closure of (V, E) iff E E+ if there is a path
(with at least one edge on it) in G from u to v. Note that if G is a dag then G+ is a transitive dag.
The unit delay unit weight DVUP for any 6, 6 2 1 can be solved in O(n3logn) time by using the
O(n 3logn) maximum k-coloring algorithm of [GAVR87] for transitive dags. Before showing how this
can be done, we establish a relationship between the number of vertices of a given set Xthat can be on

any path of G and colorability of X in G Intuitively, X represents the set of vertices that are not
upgraded. So, the number ofXvertices on a path is the delay for that path.

Theorem 1: Let G = (V, E) be a dag and let G+ = (V, E+) be its transitive closure. Let X be a subset of
the vertices in V. G has no path with > 8 vertices ofXiffXis 6 colorable in G+.
Proof: See [PAIK91b]. O
From the preceding theorem, it follows that ifX is a maximum a-coloring of G+, V-X is the
smallest set such that d(G (V-X)) < 8. This implies the correctness of the following three step algo-

step 1: Compute G+ from G
step 2: Compute X, a maximum a-coloring of G
step 3: B = V-Xis the solution for the DVUP instance (G, 6)

The complexity of this is governed by that of step 2 which is O(n3logn). Note that when 6 = 1, a max-
imum 8-coloring is just a maximum independent set and such a set can be found in O(ne) time for
transitive closure graphs with n vertices and e edges [GAVR87]. So, the case 6 < 1 can be solved in
O(n3) time as the graph G+ computed in step 1 may have O(n2) edges even though G may not.

2.1.2 Nonunit Delay Unit Weight DVUP
A dag G = (V, E) is a unit weight dag ifw (v) = 1 for every v V. The case when d(v) is also 1 for all v
was considered in the previous section. So, in this section we are only concerned with the case of unit
weight dags that have at least one vertex with delay > 1. In this section we show that the nonunit
delay unit weight DVUP can be solved in O(n3) time when 8. The problem is NP-hard for 6 2 2 (see
[PAIK91b] for a proof).
Let Xbe a minimum set of vertices such that d(G IX) < 1. Clearly, every v e V with d(v) > 1
must be in X. For each v E Vwith d(v) > 1, let ay, av, ..., aq be the vertices such that < a', v > E and
let by, b, ..., bv be such that < v, bv > e E and let G' be the dag that results when each such v (together
with all edges incident to/from v) are deleted from G and all edges of the form < a' by > are added. To
get G', this transformation is applied serially to all v with d(v) > 1.
Let B = {v I d(v) > 1 and v E V}. Let G' = (V, E') and let C c V be a minimum vertex set such
that d(G' I C) 1. It is easy to see thatA = B u C is a minimum vertex set such that d(G IX) < 1. C can
be obtain in O(n3) time using the unit delay unit weight algorithm (note that G' is a unit delay unit
weight dag), B can be obtained in O(n) time, and G' can be constructed in O(n3) time. So, the overall
complexity of our algorithm to compute Xis O(n 3).

Theorem 2: Non unit delay unit weight DVUP is NP-hard for every 8, 8 2 2.
Proof: See [PAIK91b]. Since the construction of [PAIK91b] generates a multistage graph, DVUP is
NP-hard even when the dags are restricted to be multistage graphs. E

2.2 Trees

2.2.1 Trees With Unit Weight And Unit Delay
When the dag is a rooted tree T such that w (v) = d(v) = 1 for every vertex, the minimum weight vertex
subset X such that d(T X) < 8 can be found in O(n) time by computing the height, h, of each vertex as
defined by:

h (v) vis a leaf
h(v) 1 max {h(u) u is a child of v}, otherwise

X is selected to be the set X = v I h(v) > 6 }. The vertex heights can be computed in O(n) time by a
simple postorder traversal of the tree T [HORO90]. The correctness of the procedure outlined above
is established in Theorem 3. Note that when all vertices have unit weight, the weight of a set, Y, of
vertices is simply its cardinality I Y .

Theorem 3: For any tree T let h (v) be the height of vertex v. The set

X= v { h(v)> 6

is a minimum cardinality vertex set such that d(T IX) < 6.
Proof: The fact that d(T IX) < 6 is easily seen. The minimality ofXis by induction on the number, n,
of vertices in T. For the induction base, we see that when n = 0, IXI = 0 and the theorem is true.
Assume the theorem is true for all trees with < m vertices where m is an arbitrary natural number. We
shall see that the theorem is true when n =m + 1. Consider any tree with n = m + 1 vertices. Let X be
the set of all vertices with height > 6. If IXI = 0, then X is clearly a minimal set with d(T IX) < 6.
Assume IXI > 0. In this case the root, r, of T has h (r) > 8 and so is in X. First, we show that there is a
minimal vertex set W that contains r and for which d(T W) < 6. Let Z be a minimal vertex set for
which d(T Z) 6. Ifr V Z, then let r, u,, u, ..., uh)- be a longest root to leaf path in T. Since h (r) >
8, at least one of the u,'s is in Z. Let u, be any one of the u,'s in Z. Let W = Z + {r} {uj}. Clearly,
I WI = IZ Since all root to leaf paths that include u, also include r, the length of these paths in T I W
is the same as in T Z. The length of the remaining paths in T W is no more than in T IZ. So, W is a
minimal cardinality vertex set such that d(T I W) 8 and furthermore W contains the root r.
Let A (v), A e {X, W}, denote the subset of A that consists only of vertices in the subtree, T(v),
rooted at v. Since d(T(v) X(v)) < 6, d(T(v) I W(v)) < 8, and I T(v)l < m for each v that is a child ofr, it
follows from the induction hypothesis that IX(v) = I W(v) I for each v that is a child of r. Hence, IXI

=1+ I IX(v)I =IWI. O
v is a child of r

2.2.2 General Trees

Since a chain is a special case of a tree and since DVUP for chains with arbitrary weights and delays
has been shown to be NP-hard, we do not expect to find a polynomial time algorithm for general trees.
In this section we develop a pseudo polynomial time algorithm (i.e., one whose complexity is polyno-
mial in the number of vertices and the actual values of the vertex delays and weights). We modify the
definition of height used in the preceding section to account for the vertex delays. We use Hto denote
this modified height.

H(v) = d(v) vis a leaf
Sd(v) + max {H(u) I u is a child of v}, otherwise

For each vertex v, let L (v) be a set of pairs (1, c) such that there is a subset X c T(v) such that

d(T(v) lX) = 6 and I w (u) = c. Let (li, cl) and (12, c2) be two different pairs such that li <1 2 and
u X
c1 < c2. In this case, pair (li, cl) dominates (l2, c2). Let S(v) be the subset of L (v) that results from the
deletion of all dominated pairs. Let S(r) be this set of dominating pairs for the root r of T. Let (1', c')
e S(r) be the pair with least cost c'. It is easy to see that the least weight vertex set W such that
d(T W) 6 has weight c'. We shall describe how to compute S(r). Using the backtrace strategy of
[HOR078, cf. chapter on dynamic programming] we can compute the W that results in d(T W) < 6

and Y w (u) = c' in less time than needed to compute S(r) (however, S(r) and some of the other S's
ue W
computed while computing S(r) are needed for this).
For a leaf vertex v, S(v) is {(0,w (v))} when d(v) > 6 and {(0,w (v)),(d(v),O)} otherwise. For a non
leaf vertex v, S(v) may be computed from the S(u)'s of its children ul, ..., uk,. First, we compute U(v)
as the set of nondominated pairs of the form (1, c) where = max { l/, 12, ... Ik } and c = c, for
some set of pairs (1,, c,) e S(u,), 1 i < k,. Let V(v) and Y(v) be as below:
V(v) {(, c+w (v)) (, c) U(v)}
Y(v)= { ( +d(v), c) l+d(v) < 6 and (1, c) e U(v) }

Now, S(v) is the set of nondominated pairs in V(v) u Y(v). Since S(v) contains only nondominated
pairs, all pairs in S(v) have different I and c values. So, IS(v)| <- min { 6, o } where (0 = w(u).
u 1
Using the technique of [HOR078], S(v) can be computed from the S(u)'s of its children in time
O(min{6,cl}*k). To compute S(r) we need to compute S(v) for all vertices v. The time needed for this
is O(min{6,mcf}*]k) = O(min{6,(}*n)
Note that for unit delay trees, 6 < n and for unit weight trees (0 = n. So in both of these cases the
procedure described above has complexity 0(n2).

2.3 Series-Parallel Dags
A series-parallel digraph, SPDAG, may be defined recursively as:
1. A directed chain is an SPDAG.
2. Let s, and tI, respectively, be the source and sink vertices of one SPDAG Gi and let s2 and t2 be
these vertices for the SPDAG G2. The parallel combination of G, and G2, G /G2, is obtained
by identifying vertex s, with s2 and vertex tj, with t2 (Figure l(c)). G1 2G is an SPDAG. We
restrict G, and G2 so that at most one of the edges , is present. Otherwise,
G1/G2 contains two copies of the same edge.
3. The series combination of G1 and G2, GCG2, is obtained by identifying vertex tl with s2 (Figure
l(d)). G1G, is an SPDAG.

s1 t

(a) G,

s2 t2

(b) G2

(c) G1 /G2

s1 G G, G t 2

(d) GIG2

Figure 1: Series-parallel digraph.

The strategy we employ for SPDAGs is a generalization of that used for trees with general
delays and weights. Let s and t, respectively, be the source and sink vertices of the SPDAG G. Let
D(l,Y,G) be a minimum weight vertex set that contains the vertices in Y, Y c {s, t}, and such that
d(G D(l,Y,G)) I 1and letf (G) be as below:

f(G)={(I,c,Y)\10--1-&6, c= Y w(u)}.
Let (li ,cl ,Yi) and (2 ,c2 ,Y2) be two different triples in f(G). (11 ,cl ,Y1) dominates (2 ,c2 ,Y2)
iff/i 12, c1, c2 and Yi = Y2. Let F(G) be the set of triples obtained by deleting all dominated triples
off(G). If(l' ,c' ,Y') is the least weight triple (i.e., the one with least c) in F(G) then the least weight

W such that d(G I W) 6 has weight c'. We shall show how to compute F(G) and hence (l' ,c',Y').
The actual W may be obtained using a backtrace step as described in [HORO78].

2.3.1 G Is A Chain
Consider the case when G has only two vertices s and t. F(G) is constructed using the code:
F(G) := { (0, w (s)+w (t), {s, t}) }
if d(s) 6 then F(G) := F(G) u { (d(s), w (t), {t}) }
if d(t)< 6 then F(G) := F(G) u{ (d(t), w (s), {s}) }
if d(s)+d(t) 6 then F(G) := F(G) u { (d(s)+d(t), 0, 0) }
When G is a chain with more than two vertices, it may be regarded as the series composition of two
smaller chains G, and G2. In this case F(G) may be constructed from F(CG) and F(G2) using the algo-
rithm to construct F(GC G2) described in the next section.

2.3.2 G is of the form GCG2
The following lemma enables us to construct F(GC G2) from F(GC) and F(G2).

Lemma 1: If(l, c, Y) e F(GC G), then there is an (1I ,cY ,Y ) F(G ) and an (/2 ,c2 ,Y2) e F(G2) such

(a) D(li ,Y, ,Gi)= D(l,Y,GG2) n V(G,)
(b) D(12,Y ,G2) =D(1,Y,GIG2) r V(G2)
(c) D(1,Y, GG2) =D(1 ,Y1 ,Gi) uD(12 ,Y2 ,G2)

(d) c = w (u), ci = W (u),C2 w(u)
u e D(I,Y,GIG2) u e D(1 ,Y1,G1) u e D(12,2,G2)
Proof: See [PAIK91c]. O
Lemma 1 suggests the following approach to obtain F( GC2) from F(GC) and F(G2):
Stepi: Construct a set Z of triples such that F(GCG2) c Z. This is obtained by combining together
all pairs of triples (li ,c ,Yj) e F(Gi) and (12 ,c2 ,Y2) E F(G2).
Step2: Eliminate from Z all triples that are dominated by at least one other triple of Z.
The triples (li ,cl ,Yi) and (12 ,C2 ,Y2) are compatible iff( tj e Y, and s2 E Y2 ) or ( t V Y, and
s2 Y Y2 ). Only compatible triples may be combined. Assume that we are dealing with two compati-
ble triples. We first obtain the triple (1, c, Y) as below:
if t E Y,
then (1, c, Y) := ( +12, 1 c2 -w (t), Y1uY2-{t1 })
else (1, c, Y) := ( +12-d(t), c +c2, Y1uY2-{t })
Next, (1, c, Y) is added to Z provided i 6. G = Gi/G2
When G = G1/G2 we use Lemma 2 which is the analogue of Lemma 1.

Lemma 2: If(l, c, Y) e F(Gi/G2), then there is an (1i ,cl ,Y) e F(Gi) and an (2 ,2 ,Y2) e F(G2)
such that

(a) D(li ,Y, ,G) =D(1,Y,GiG2) n V(G,)
(b) D(12 ,2 ,G2)=D(1,Y,GiG2)n V(G2)
(c) D(/,Y, GG2) =D(1 ,Y1 ,Gi) uD(12 ,2 ,G2)

(d) c= w (u), cl = W (u), c2 w(u).
u e D(I,Y,GIG2) u e D(1 ,Y1,G1) u e D(12,2,G2)
Proof: Similar to that of Lemma 1. O
To obtain F(G1/G2) from F(GI) and F(G2) we use the two step approach used to compute
F(GIG2). For step 1, we compute the triple (1, c, Y) obtained by combining (li ,cl ,Y1) E F(G1) and
(/2 ,c2 ,Y2) E F(G2). The triples are compatible iff Y = Y2. Again, only compatible triples may be
combined. For compatible triples, (1, c, Y) is obtained as below:
1:=max {l, /2}

1 := c +-C2- Y W ()
u e Yi
Y:= Y
Next, (1, c, Y) is added to Z.

2.3.3 Complexity
The series-parallel decomposition of an SPDAG can be determined in O(n) time [VALD79]. By keep-
ing each F(G,) as four separate lists of triples, one for each of the four possible values for the third
coordinate of the triples, F(G G2) and F(G //G2) can be obtained in O( I F(G 1) I F(G ) | )time from
F(GI) and F(G2). Since F(GI) (F(G2)) contains only non dominated triples, it can contain at most four
triples for each distinct value of the first coordinate and at most four for each distinct value of the
second coordinate (these four must differ in their third coordinate). Hence, IF(GI) I 4*min { 6 + 1,

I w(u) } and IF(G2)A| 4*min 6 + 1, w (u) }. So, we can obtain F(G) for any SPDAG in
u e V(G1) u e V(G2)

time O(n*min {82, ( 2 w(u))2} ). For SPDAGs with unit delay or unit weight, the complexity is
u e V(G)
O(n2). To see this, note that for unit weight or unit delay SPDAGs, IF(G1) I 4 | V(G1) and IF(G2)
4|1V(G2)|. So, t(G)-t(GI)+t(G2)+ 161 V(Gi)|*V(G2) .

2.3.4 Extension To General Series Parallel Dags
The algorithm for series parallel dags may be extended to obtain an algorithm of the same asymptotic
complexity for general series parallel dags (GSPDAG). These were introduced in [LAWL78,
MONM77, SIDN76]. The extension may be found in [PAIK91c].

3 LinkDelay(x,6)
When 6 = 0 and x > 0, LinkDelay(x,8) can be solved in linear time. In case G has an edge with delay >
0, then the link costs cannot be made 0 by upgrading any subset of the vertices. If G has no edge with
delay > 0, then no vertex needs to be upgraded. For all other combinations of 6 and x, LinkDelay(x,8)
is NP-hard.

Theorem 4: [PAIK91d] LinkDelay(x,8) is NP-hard whenever 6 # 0 or x = 0.
Proof: Let G = (V, E) be an instance of the vertex cover problem. We obtain from G, an instance G' of
LinkDelay(x,8) by associating a delay with each edge of G. If = 0, this delay is one and if 6> 0 this
delay is any number in the range (6, 8/x] (in case x = 0, the range is (0, -)). Since 0 < x < 1, upgrading
vertex set A results in all links having a delay < 6 iffA is a vertex cover of links in G' and hence of the
edges in G. So, G' has an upgrading vertex set of size < k iffG has a vertex cover of size < k. O

[PADH92] considers the link delay problem for trees and series-parallel graphs. For both cases,
she develops a linear time algorithm. The case for trees is easily solved using a tree traversal algo-
rithm. First, note that when 6 =0 and x > 0, the problem has a solution iff all edges have zero delay.
In this case, no vertex is to be upgraded. A simple examination of the edge delays suffices to solve
this case. When 6 > 0 and x = 0, we begin by removing all edges with delay less than 8. This leaves
behind a forest of trees. Trees with a single node are removed from consideration. From each of the
remaining trees, the parents of all leaves are marked for upgrading and edges incident to these parents
deleted (as their delay is now zero). The result is a new forest from which single node trees are
removed and the parents of leaves upgraded. This process continues until the forest becomes empty.
When, > 0 and x > 0, we first verify that there is no edge with delay greater than 61x2. This is a
necessary and sufficient condition for the existence of a solution. Next, for each edge (u, v) with delay
d such that x*d > > x2*d, both u and v are upgraded. Following this, we remove all edges with delay
< 8 from the tree and upgrade vertices in the resulting forest using the forest upgrading scheme just
described for the case 6 > 0 and x = 0. The correctness of the algorithm is easily established and using
appropriate data structures, it can be implemented to have complexity O(n) where n is the number of
vertices in the tree.
For the case of series-parallel graphs, [PADH92] proposes a dynamic programming algorithm
which uses the series-parallel decomposition of the graph. For each (series-parallel) graph in the
decomposition, she keeps track of the best solution that (a) necessarily upgrades the source vertex but
not the sink, (b) necessarily upgrades the sink vertex but not the source, (c) necessarily upgrades both
the source and sink, and (d) upgrades neither the source nor the sink. Since only four solutions are
recorded in each stage of the decomposition, the resulting dynamic programming algorithm has com-
plexity O(n) where n is the number of vertices in the input series-parallel graph.

4 ShortestPath(x,8)
We note that while at first glance ShortestPath(0,0) may appear to be identical to either the vertex
cover or the dominating set problem, this is not so.

Theorem 5 : [PAIK91d] ShortestPath(x,8) is NP-hard whenever x = 0 or 6 > 0.
Proof: We shall prove this here only for the case x = 8 = 0. Let X, q, C, and m be as in the definition
ofX3C. Construct an instance G = (V, E) of ShortestPath(0,0) as below:
a) G is a three level graph with a root vertex r. This is the only vertex on level 1 of the graph.
b) The root has m + q + 2 children labeled C1, C2, ..., Cm, Zi, Z2, ..., Zq+2. These are the level 2
nodes of the graph. Child C, represents set C,, 1 < i < m while child Z, is just a dummy node in G.
c) The graph G has 3q nodes on level 3. These are labeled 1, 2, ..., 3q. Node i represents element i
ofX, 1 i < 3q.
d) Each node C, on level 2 has edges to exactly three nodes on level 3. These are to the nodes that
represent the members of C,, 1 < i < m.
We shall show that the input X3C instance has answer "yes" iffthe ShortestPath(0,0) instance G
has an upgrade sets of size < q + 1. First, suppose that the answer to the X3C instance is "yes". Then
there is a C' c C such that C' is an exact cover ofX. Since W = 3q and |C,| =3, 1 K i = {r} u C'. One may verify that S is an upgrade set for G and IS' = q + 1.
Next, suppose that G has an upgrade set S of size < q + 1. If r S, then the shortest path from r
to at least one of the Z,'s has length > 0 as at least one of the q + 2 Z,'s is not in S and every r to Z, path
must use the edge (r, Z,). So, r E S. When the vertices in S are upgraded, every vertex in G must have
at least one zero length edge incident to it as otherwise the shortest paths to it have length 2 1. In par-
ticular, this must be the case for all 3q level three vertices. Upgrading the root r does not result in any
of these 3q vertices having a zero length edge incident to it. So, this is accomplished by the remaining
< q vertices in S. The only way this can be accomplished by an upgrade of < q vertices is if these
remaining vertices are a subset of {C C2, ..., Cm} and this subset is an exact cover ofX (this would, of
course, require IS| = q + 1). So, S {r} is an exact cover of the input X3C instance.
Hence, the X3C instance has output "yes" iffG has an upgrade set of size < q + 1. O

5 Satellite(6)
Satellite(0) is trivially solved. First, zero length edges are eliminated by combining their endpoints u
and v into a single vertex uv. Remaining edges previously incident to u or v are now incident to uv.
Duplicate edges are replaced by a single edge with the lower cost. If the resulting communication
graph has at most one vertex, no satellite links are needed. When the number of vertices exceeds one,
each vertex must be a satellite vertex. We shall show that Satellite(6) is NP-hard for every 6, 8 > 0.

Lemma 3 : Let G be a communication graph. Let S be the subset of vertices of G that are satellite
vertices and let N be the remaining vertices (i.e., the non-satellite vertices). CommTime(G) < 1 iffthe
following are true:

(a) The vertices ofN define a clique of G.
(b) Each vertex ofN is adjacent to a vertex of S (i.e., S is a dominating set of G) unless S= 0.
Proof: IfN contains two vertices that are not adjacent in G, then the shortest path between them is of
length at least two regardless of whether or not this shortest path utilizes satellites. So, the subgraph
of G induced by the vertices of N is a clique. For (b), assume that S # 0. If N contains a vertex v that
is not adjacent to at least one satellite vertex then v is at least distance two from every satellite vertex s
e S. Hence, CommTime(G) > 1. O

Theorem 6: [PAIK91d] Satellite(6) is NP-hard for 6 > 1.
Proof: We shall only present the proof for the case 6 = 1. The complete proof can be found in
[PAIK91d]. The proof uses the max clique problem. Let G be a connected undirected graph with n
vertices. Let G' be the graph obtained by adding to G n edges of the type (i, i') where i is a vertex of G
and i' is a new vertex (Figure 2). The number of vertices in G' is 2n. All edges of G' have unit cost.
We claim that G has a clique of size > k, for any k 2 3 iffG' has a vertex subset S, ISI < 2n k < 2n 3,
such that by making the vertices of S satellite vertices, CommTime(G')=l. To see this, letA4, .| >2 3, be
any subset of vertices in G. IfA forms a clique in G, then by making all vertices of G' except those in
A satellites, the communication time in G' becomes at most one as the vertices of A satisfy the condi-
tions of Lemma 3 on non-satellite vertices. So, if G has a clique of size > k, then G' has a satellite sub-
set S of size I 2n k. Next, suppose that G' has a satellite subset S of size I 2n k < 2n 3. Let N be
the remaining vertices of G'. IfN contains a vertex i' that is not in G, then from Lemma 3 it follows
that IN1 < 2 as the largest clique in G' that includes vertex i' has only two vertices in it (the other ver-
tex being vertex i). In this case, ISI > 2n 2. So, N contains no vertex that is not in G. Since N forms a
clique in G' (Lemma 3), it forms a clique in G. Hence, if IS| < 2n k < 2n 3, G contains a clique of
size 2 k 2 3. While the NP-hard formulation of the max clique problem does not restrict k to be > 3, it
is easy to see that the problem remains NP-hard under this restriction. So, Satellite(l) is NP-hard. O

(a) G

(b) G'

Figure 2: Construction of Theorem 6.

6 LongestPath(x,6)
Lemma 4: LongestPath (0,0) is NP-hard.
Proof: Let G be a connected undirected graph. We shall construct an instance G' of LongestPath(0,0)
such that G has a vertex cover of size k < n iff G' has a vertex upgrade set A' of size k < n. To get
G', orient the edges of G to begin at a higher index vertex. I.e., if (i, j), i < j, is an edge of G, then j> is a directed edge of G' (Figure 3). All edges of G' have unit delay. It is easy to see that G' is a dag
and that A is a vertex cover of G iffA' =A is a vertex upgrade set of the LongestPath(0,0) instance G'.

1 2 1 25

5 5

3 4 3 4

(a) G' (b) G

Figure 3: Construction for Lemma 4.

To show that LongestPath(x,6) is NP-hard for x = 0 and 6 > 0, we use the subgraph J,,, (Figure 4)
which is comprised of n directed chains of size q that share a common vertex r. This set of n chains is
connected to a two vertex directed chain . Each edge of J,, has unit delay. We see that the
longest path in J,,, has length q and that by upgrading the single vertex r, we can make the delay of
this subgraph q 2. However, to reduce the delay to q 3, we need to upgrade at least n + 1 vertices.

Lemma 5: LongestPath(x,8) is NP-hard for 6 > 0.
Proof: Let G be any instance of LongestPath(0,0) in which all edge delays are one. A corresponding
instance G' of LongestPath(x,8) is obtained by attaching a copy of J,, [j+2 in case x = 0 and Q, (Figure
5) in case x > 0 to each vertex v of G that has in-degree zero. This is done by identifying the s vertex
ofJn, L +2 with vertex v (i.e., these two vertices are the same). Note that n is the number of vertices in
G. Let m be the number of vertices in G that have zero in-degree. One may verify that for any k, k < n,
G has an upgrade set of size < k iff G' has one of size < m + k. Hence, LongestPath(x,8) is NP-hard for
8>0. o

Theorem 7: [PAIK91d]

q-1 vertices

0 0--0

n chains



Figure 4: J, g.

n chains

Figure 5: Q,.

(a) Longest Path (x,6) is NP-hard when x = 0 and 6 = 0 and also when x 2 0 and 6 > 0.
(b) Longest Path (x,6) is polynomially solvable when x > 0 and 6 = 0.
Proof: (a) has been proved in Lemmas 4 and 5. For (b), if the dag has an edge with delay > 0, then it
has no vertex upgrade set. If there is no such edge, then no vertex needs to be upgraded to ensure that
the longest path has zero length. 1

Let G/Xbe the wdag that results when each vertex v inXis split into two v' and vo such that all edges
< v,j > E are replaced by edges of the form < v,j> and all edges < i,v> E are replaced by edges of
the form < i,v'> I.e., outbound edges of v now leave vertex vo while the inbound edges of v now
enter vertex v'. Figure 6(b) shows the result, G/X, of splitting the vertex 6 of the dag of Figure 6(a).
The dag vertex splittingg problem (DVSP) is to find a least cardinality vertex setX such that d(G/X) < 6
,where 6 is a prespecified delay. For the dag of Figure 6(a) and = 3, X= {6} is a solution to the
DVSP problem.

51 5

(a) A dag (b) Vertex 6 split

Figure 6: Example of vertex splitting

7.1 Complexity Results
Ifw (i,j) = 1 for every edge in the wdag, then the edge weighting function w is said to be a unit weight-
ing function and we say that G has unit weights. When 6 = 1, the unit weight DVSP can be solved in
linear time as every vertex that is not a source or sink has to be split. However, for every 6 2 2, the
problem is NP-hard [PAIK90]. To show this, for each instance F of 3SAT, we construct an instance GF
of the unit weight DVSP such that from the size of the solution to GF we can determine, in polynomial
time, the answer to the 3SAT problem for F. This construction employs two unit weight dag subassem-
blies: variable subassembly and clause subassembly.

Variable Subassembly
Figure 7(a) shows a chain with 6 1 vertices. This chain is represented by the schematic of Fig-
ure 7(b). The variable subassembly, VS(i), for variable x, is given in Figure 7(c). This is obtained by
combining together three copies of the chain H6_i with another chain that has three vertices. Thus, the
total number of vertices in the variable subassembly VS(i) is 38. Note that d(VS(i)) = 8 + 1. Also,
note that if d(VS(i)X) < 8, then IXI 2 1. The only X for which IXI = 1 and d(VS(i)X) < 6 are X=
{ x, } andX= { x, }. Figure 7(d) shows the schematic for VS(i).

(a) Chain with 6 1 vertices (b) Schematic



(c) VS(i) (d) Schematic

Figure 7: Variable subassembly for DVSP.

Clause Subassembly
The clause subassembly CS(j) is obtained by connecting together four 6 1 vertex chains with
another three vertex subgraph as shown in Figure 8(a). The schematic for CS () is given in Figure
8(b). The number of vertices in CS(') is 46 1 and d(CS()) = 26. One may easily verify that if IXI =
1, then d(CS()/X) > 6 So, ifd(CS(j)/X) < 6 ,then IXi > 1. Since 6 2 2, the only Xwith IXi = 2 for
which d(CS()/X) < 6 are such thatXc {j1,,j2, lj3,}. Furthermore, everyXc {J1, J2,, l,3} with IXI = 2
results in d(CS(j)/X) 6.
To construct GF from F, we use n VS(i)'s, one for each variable x, in F and m CS(')'s, one for
each clause Cj in F. There is a directed edge from vertex x, (x,) of VS(i) to vertex ljk of CS'() iffx, (x,)
is the k'th literal of Cj (we assume the three literals in Cj are ordered). For the case F = (xI+x2 +x4)
(Y +X3 +X4) (X +x2 +X), the GF of Figure 9 is obtained.
Since the total number of vertices in GF is 36n + (46 1)m, the construction of GF can be done in
polynomial time for any fixed 6.

Theorem 8: Let F be an instance of 3SAT and let GF be the instance of unit weight DVSP obtained
using the above construction. For 6 > 2, F is satisfiable iffthere is a vertex set X such that d(GF/X) < 6
and IXI =n +2m.

J11 1


(a) CS(I) (b) Schematic

Figure 8: Clause assembly for DVSP.

Proof: IfF is satisfiable then there is a binary assignment to the x,'s such that F has value 1. Let
b l,b2, ... b, be this assignment. Construct a vertex setXin the following way:
1. x, is inXifb, = 1. Ifb, = 0, then x, is inX.
2. From each CS(/) add exactly two of the vertices 1,, 1,2, ,j3 to X. These are chosen such
that the literal corresponding to the vertex not chosen has value 1. Each clause has at
least one literal with value 1.
We readily see that IXI = n + 2m and that d(GF/X) < 6.
Next, suppose that there is an X such that IXI = n + 2m and d(GF /X) < 8. From the construction
of the variable and clause assemblies and from the fact that IXi =n + 2m, it follows that Xmust con-
tain exactly one vertex from each of the sets {x,, x, }, 1 < i < n and exactly 2 from each of the sets
{lj, ,j2, I,3 }, 1 lIl e Xand j12 e Xand I,3 e X. Consider the Boolean assignment b, = 1 iffx, E X. Suppose that ljk A X
and ljk = x, (x). Since d(GF/X) < 6, vertex x, (x,) must be split as otherwise there is a source to sink
path with delay greater than 6. So, x, (x,) E Xand b, = 1 (0). As a result, the k'th literal of clause C, is
true. Hence, b ... b, results in each clause having at least one true literal and F has value 1. O

Theorem 9: DVSP is NP-hard for unit weight multistage graphs when 6 2 4.
Proof: See [PAIK90]. n

Figure 9: GF for F= (x1 +x2+24) (x i+3+24) (x1 +x2+x3).

7.2 Polynomially Solvable Cases

When the wdag G is a rooted tree the DVSP problem can be solved in linear time by performing a pos-
torder [HORO90] traversal of the tree. During this traversal we compute, for each node x, the max-
imum delay, D (x), from x to any other node in its subtree. Ifx has a parent z and D (x) +w (z,x) exceeds
6, then the node x is split and D (z) is set to 0. Note that D (x) satisfies:

D (x) = max {D (y) + w (x,y) }
y is a child ofx
Another polynomially sovlable case is when the dag is a series-parallel graph. For such graphs
dynamic programming can be used to obtain a quadratic time algorithm [PAIK91a]. For general dags,
a backtracking algorithm has been formulated in [PAIK90] and heuristics have been developed and
evaluated in [PAIK90, 93].

Let G be a wdag as in the previous section and let X be a subset of the vertices of G. Let G-X be the
wdag obtained when the vertices in X are deleted from the wdag G. This vertex set deletion is also
accompanied by the deletion of all edges in G that are incident to a deleted vertex. The dag vertex
deletion problem (DVDP) is to find a least cardinality vertex set X such that d(G -X) < where 6 is a
prespecified graph delay.

Lemma 6: Let G = (VE,w) be a weighted wdag and let 6 be a prespecified delay value. Let Max-

EdgeDelay= max { w (i,j) }.

(a) The DVDP has a solution iff6 > 0.
(b) The DVSP has a solution iff6 2 MaxEdgeDelay.
(c) For every 8 2 MaxEdgeDelay, the size of the DVDP solution is less than or equal to that of the
DVSP solution.
(a) Since d(G-V) = 0, there must be a least cardinality set X such that d(G-X) < 6.
(b) Vertex splitting does not eliminate any edges. So, there is no X such that d(G/X) < MaxEdgeDe-
lay. Further, d(G/V) = MaxEdgeDelay. So, for every 8 2 MaxEdgeDelay, there is a least cardi-
nality set X such that d(G /X) 6.
(c) Let X be a solution to the DVSP. Since d(G/X) < 6, d(G-X) < 6. Hence the cardinality of the
DVDP solution is < IXI. O

Let IDVSP I (IDVDP I) be the size of solution to the DVSP (DVDP).

Lemma 7: For every 8, 8 2 0, there is a wdag G = (VE,w) with MaxEdgeDelay < 6 such that IDVSP /
IDVDP I = number of nodes that are neither source nor sink.
Proof: Consider the wdag of Figure 10. d(G {v}) = 6. However, since every edge has weight 8, it is
necessary to split every vertex that is not a source or sink to get the delay down to 8. O

Figure 10: Construction for Lemma 7.

Corollary 1: For every 8 2 MaxEdgeDelay and every wdag G such that d(G) > 6, 1 < IDVSPI /
IDVDP I < number of nodes that are neither source nor sink.

Proof: The lower bound follows from Lemma 6 part (c) and the upper bound follows from the obser-
vation that IDVSP < number of nodes that are neither source nor sink and |DVDP > 1. Note that the
source and sink vertices of a wdag never need to be split. E

8.1 Complexity Results
Paik, Reddy, and Sahni [PAIK91a] have shown that the DVDP problem is NP-hard for unit weight
dags with 8 2 0 as well as for unit weight multistage graphs with 6 2 2. We shall present only the
proof for the case of unit weight dags and 6= 0. The interested reader is referred to [PAIK91a] for the
remaining proofs.

Theorem 10: Unit weight DVDP is NP-hard for 6 = 0.
Proof: Let G be an instance of unit weight DVDP and let X be such that d(G -X) = 0. So, X must con-
tain at least one of the two end-points of each edge of G. Hence, X is a vertex cover of the undirected
graph obtained from G by removing directions from the edges. Actually, every vertex cover problem
can be transformed into an equivalent DVDP with 8 = 0. Let U be an arbitrary undirected graph.
Replace each undirected edge (u,v) of U by the directed edge < min{u,v},max{u,v}> to get the
directed graph V Vis a wdag as one cannot form a cycle solely from edges of the form < i,j> where i
tex cover instance Udoes. Hence, unit weight DVDP with 8 = 0 is NP-hard. D

8.2 Polynomially Solvable Cases
As in the case of the DVSP problem, the DVDP problem can be solved in linear time when the wdag
is a tree and in quadratic time when the wdag is a series-parallel graph. The algorithms are similar to
those for the corresponding DVSP cases and can be found in [PAIK91a].

[CHAN90] P. K. Chan, "Algorithms For Library-Specific Sizing Of Combinational Logic", Proc.
27th DAC Conf, 1990 pp. 353-356.
[GARE79] M. R. Garey, and D. S. Johnson, "Computers and Intractability", W. H. Freeman and
Company, San Francisco, 1979.
[GAVR87] F. Gavril, "Algorithms For Maximum k-colorings And k-coverings Of Transitive
Networks, Vol. 17, pp. 465-470, 1987.
[GHAN87] S. Ghanta, H. C. Yen, and H. C. Du, "Timing Analysis Algorithms For Large Designs",
University of Minnesota, Technical Report, 87-57,1987.
[HORO78] E. Horowitz, and S. Sahni, "Fundamentals of Computer Algorithms", Computer Sci-
ence Press, Maryland, 1978.

[KRIS79] M. Krishnamoorthy and N. Deo, "Node deletion NP-complete problems", SIAM Jr on
Computing, Vol 8, No 4, 1979, pp 619-625.
[LAWL78] E. L. Lawler, "Sequencing Jobs To Minimize Total Weighted Completion Time subject
to precedence constraints", Annals of Discrete Math. 2, 1978, 75-90.
[LEE90] D. H. Lee and S. M. Reddy, "On Determining Scan Flip-flops In Partial-scan Designs",
Proc. of International Conference on Computer Aided Design, November 1990.
[MCGE90] P. McGeer, R. Brayton, R. Rudell, and A. Sangiovanni-Vincentelli, "Extended Stuck-
fault Testability For Combinational Networks", Proc. of the 6th MIT Conference on
Advanced Research in VLSI, MIT Press, April 1990.
[MONM77] C. L. Monma and J. B. Sidney, "A General Algorithm For Optimal Job Sequencing
With Series-Parallel Constraints", Technical Report No. 347, School of Operations
Research and Industrial Engineering, Cornell University, Ithaca, N.Y., July 1977.
[PADH92] V. Padhye, "Upgrading vertices in trees and series-parallel graphs to bound link
delays," University of Florida, Sept. 1992.
[PAIK90] D. Paik, S. Reddy, and S. Sahni, "Vertex Splitting In Dags And Applications To Partial
Scan Designs And Lossy Circuits", University of Florida, Technical Report, 90-
[PAIK91a] D. Paik, S. Reddy, and S. Sahni, "Deleting Verticies To Bound Path Lengths", Univer-
sity of Florida, Technical Report, 91-4, 1991.
[PAIK91b] D. Paik, and S. Sahni, "Upgrading Circuit Modules To Improve Performance", Univer-
sity of Florida, Technical Report, 1991.
[PAIK91c] D. Paik, and S. Sahni, "Upgrading Vertices In Trees, Series-Parallel Digraphs And Gen-
eral Series Parallel Digraphs", University of Florida, Technical Report, 1991.
[PAIK91d] D. Paik, and S. Sahni, "NP-hard Network Upgrading Problems", University of Florida,
Technical Report, 1991.
[PAIK93] D. Paik, S. Reddy, and S. Sahni, "Heuristics for the placement of flip-flops in partial
scan designs and the placement of signal boosters in lossy circuits", Proc. VLSI Design
'93, IEEE, 1993.
[SIDN76] J. B. Sidney, "The Two Machine Flow Line Problem With Series-Parallel Precedence
Relations", Working paper 76-19, Faculty of Management Science, University of
Ottawa, November 1976.
[VALD79] J. Valders, R. E. Tarjan, and E. L. Lawler, "The recognition of Series Parallel digraphs",
SIAMJ. Comput., 11 (1982), pp. 298-313.

University of Florida Home Page
© 2004 - 2010 University of Florida George A. Smathers Libraries.
All rights reserved.

Acceptable Use, Copyright, and Disclaimer Statement
Last updated October 10, 2010 - - mvs