Uniform Planar Embedding Is Np-Complete*
Total Page:16
File Type:pdf, Size:1020Kb
Matthias F.M. Stallmann Department of Computer Science North Carolina State University Raleigh, NC 27695-8206 August, 1990 UNIFORM PLANAR EMBEDDING IS NP-COMPLETE* MATTHIAS F.M. STALLMANN Key Words. planar graphs, book embedding, NP-completeness. An instance of the uniform planar embedding (UPE) problem is described by giving a (planar) graph G = (V, E) and a set of uniformity constraints of the form (v : el.. .ed,w : fl . fd), where {el,. ,ed} is the set of edges incident on vertex v and {fl,. ,fd} the set incident on w -f- v (v and w must have the same degree). A positive instance is one in which G has a planar embedding that satisfies all uniformity constraints, that is, for each constraint the cyclic permutation of el.. ed around v is the same as that of fl . .Aaround w. Uniformity constraints arise in VLSI design applications, where, in a hierarchical design, modules of the same type are required to observe the same pin order. The usual method for enforcing this constraint is to fix the pin order for all modules before doing the layout. The resulting single-layer routing problem can be solved easily in linear time [5],but puts unnecessary restrictions on the layout. UPE is a more general formulation of sin,gle-layerrouting, which does not impose pin order in advance. Single layer routing pro L lems are important for two reasons: a) one layer, typically metal, may have superior electrical characteristics, making it desirable to place all important connections on this layer, or b) a multi-layer problem may be decomposed into single layers in order to make it more tractable. Consider the single-layer routing problem shown in Figure 1, where x, y, and z are three modules of the same type. If the fixed pin sequence 1,2,3,4 is enforced, as in [5], it is easy to show that there is no planar embedding for the desired interconnections. Figure 2 shows an embedding in which x, y, and 2 observe the same pin sequence. The corresponding (positive) instance of UPE is given by the graph in Figure 3 (note: multiple edges are allowed), and the two uniformity constraints (x : abed, y : e fdc) and (x : abed, z: ebfa). This note shows that the UPE problem is NP-complete in general, complementing another recent result, that UPE can be solved in polynomial time as long as the number of biconnected components of G is fixed [7]. * written August 6, 1990 The use of UPE in hierarchical layout problems is a strengthening of the notion of strong planarity as proposed by Lengauer [4]. Strong planarity only requires that the pins of each module be on the external face when the module is embedded, while UPE also requires that two modules of the same type have their pins embedded in the same sequence around that face. In order to prove the main result, we first introduce a restricted book embedding problem that reduces to UPE. Book embedding, introduced by Bernhart and Kainen [I],may be formulated as follows: Given a graph G = (V, E), where V = {O, . ,n - I}, and a pagenumber k, does there exist a partition of E = (El,. , Ek) and a (cyclic) permutation v of V, so that G+ (V, Ei U C), where C = {{~(i),v(i + 1 mod n)} 1 0 < i < n - I}, is outerplanar for 1 < )< k? Book embedding is NP-complete even if G is planar and k is 2 [9]. An instance of the fixed-partition book embedding (ME) problem is an instance of book embedding in which E = (El,.. , Ek) is specified. We show that FPBE is NP-complete and that FPBE reduces to UPE. It is interesting to note that when the permutation v (but not the partition) is fixed, book embedding becomes circle graph k-coloring, which is NP-complete for fixed k 2 4 [8] (k = 2 is trivial and k = 3 is still open). LEMMA1. FPBE is NP-complete. Proof. FPBE is clearly in NP. We give a reduction from the non-betweenness (NB) problem to FPBE, where NB is defined as follows: Given a set {ao,.. ,an_l} and a list of constraints Cl, . , Cm, where each constraint has the form (ai,ajak), meaning a; does not occur between a, and ah, is there a permutation TT such that the sequence an(o).. ar(n-l) satisfies all the constraints? NP-completeness of NB follows easily from that of BETWEENNESS, as defined in [3] (the NP-completeness proof for BETWEENNESS is found in [6]; the statement and proof for NB is found in [2]). From an instance (ao,. , an-l; Cl,. .,ern) of NB, construct a graph G = (V, E) as follows. V = {ao,. ,an-l} U {x}, where x $ {ao,. ,a,,-I}, and E = El U . U Era,where E = {{six}, {ai, a^}}, given that Cv = (a,, ajat). It is easy to see that a permutation arp) . air(n-l)satisfies all constraints if and only if xar(~). a+-l) can be formed into a cycle so that for each p, the edges of Ep can be embedded on the same side of the cycle. This is equivalent to saying that the instance of NB is positive if and only if the instance of FPBE defined by G and E = (El,.. ,Em)is positive. 0 THEOREM2. UPE is NP-complete. Proof. UPE is clearly in NP, and, because of Lemma 1, it suffices to reduce FPBE to UPE. Given an FPBE problem on G = (V, E) with pagenumber k, we can define a planar graph G" = (V", E") and a set of uniformity constraints C relating vertices in V" so that G has a book embedding with respect to (El,. , Ek)if and only if G" has a uniform embedding with respect to constraint set C. For j = 1,.. , k let V" = {q} U {wi,, 1 i E V} and Ej'= {e;, = {v,,wi,j} \ i E V} U {{w;,,,, wi2,,} ] {il, ;^} E Ej}. Now let G" be the disjoint union of components Gp((V,, Ey). Let Figure 4 shows G and a partition of E into two layers for a typical FPBE problem. Figure 5 shows the resulting GI1. 0 The graph G in the reduction of Theorem 2 has multiple connected components, but could easily be modified to have a single connected component. It could not be modified to have any fixed number of biconnected components, however, beca,use of the results described in [7]. REFERENCES [I] F. BERNHARTAND B. KAINEN,The book thickness of a graph, Journal of Combinatorial Theory UP. - B,. 27 (1979).~ ,. .- 320 331. [2] D. BOVETAND A. PANCONESI,Inclusion relationships among permutation problems, Discrete Applied Mathematics, 16 (1987), pp. 113 - 123. [3] M. R. GAREYAND D. S. JOHNSON,Computers and Intractability: A Guide to the Th,eory of NP-Completeness, W.H. Freeman, 1979. [4] T. LENGAUER,Hierarchical planarity testing algorithms, in Automata, Languages, and Program- ming: 13th ICALP, Lecture Notes in Computer Science 226, Springer Verlag, 1986, pp. 215 - 225. [a] M. MAREK-SADOWSKAAND T.-K. TARNG,Single-layer routing for VLSI: Analysis and algo- rithms, IEEE Transactions on Computer Aided Design, CAD-2 (1983), pp. 246 - 259. [6] J. OPATRNY,Total ordering problem, SIAM Journal on Computing, 8 (1979), pp. 111-114. [7] M. STALLMANN,Constrained planar embedding problems, in Proceedings 27th Annual Allerton Conference on Communication, Control, and Computing, 1989, pp. 58 - 67. [8] W. UNGER,On the k-colouring of circle graphs, in Proceedings 5th Annual Symposium on Theo- retical Aspects of Computer Science, 1988, pp. 61 - 72. 9 A. WIGDERSON, The complexity of the Hamiltonian circuit problem for maximal planar graphs, Tech. Rep. 298, EECS Department, Princeton University, 1982. z pin 4 (a) z pin 2 (6) Y pin 4 (c) Y pin 3 (4 pin pin. pin pin x pin 2 (6) Y pin 2 (f1 x pin 1 (a) FIG.1. A single-layer routing problem FIG. 2. Uniform solution to routing problem 2. 3. Graph corresponding to the routing probleni E2 FIG.4. A fixed-partition book embedding problem 6 FIG. 5. Graph for UPE problem corresponding to the FPBE problem .