arxiv: v1 [cs.cg] 28 Apr 2009

Similar documents
CS 491G Combinatorial Optimization Lecture Notes

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

On a Class of Planar Graphs with Straight-Line Grid Drawings on Linear Area

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

CIT 596 Theory of Computation 1. Graphs and Digraphs

Logic, Set Theory and Computability [M. Coppenbarger]

Lecture 6: Coding theory

arxiv: v2 [math.co] 31 Oct 2016

Monochromatic Plane Matchings in Bicolored Point Set

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 )

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx

Lecture 2: Cayley Graphs

On the Spectra of Bipartite Directed Subgraphs of K 4

Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

2.4 Theoretical Foundations

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

Now we must transform the original model so we can use the new parameters. = S max. Recruits

Lecture 4: Graph Theory and the Four-Color Theorem

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005

I 3 2 = I I 4 = 2A

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Lecture 8: Abstract Algebra

Graph Algorithms. Vertex set = { a,b,c,d } Edge set = { {a,c}, {b,c}, {c,d}, {b,d}} Figure 1: An example for a simple graph

Factorising FACTORISING.

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

Obstructions to chordal circular-arc graphs of small independence number

SOME INTEGRAL INEQUALITIES FOR HARMONICALLY CONVEX STOCHASTIC PROCESSES ON THE CO-ORDINATES

Surds and Indices. Surds and Indices. Curriculum Ready ACMNA: 233,

F / x everywhere in some domain containing R. Then, + ). (10.4.1)

COMPUTING THE QUARTET DISTANCE BETWEEN EVOLUTIONARY TREES OF BOUNDED DEGREE

Geodesics on Regular Polyhedra with Endpoints at the Vertices

Eigenvectors and Eigenvalues

Proportions: A ratio is the quotient of two numbers. For example, 2 3

COMPUTING THE QUARTET DISTANCE BETWEEN EVOLUTIONARY TREES OF BOUNDED DEGREE

SOME COPLANAR POINTS IN TETRAHEDRON

POSITIVE IMPLICATIVE AND ASSOCIATIVE FILTERS OF LATTICE IMPLICATION ALGEBRAS

Lecture 11 Binary Decision Diagrams (BDDs)

Compression of Palindromes and Regularity.

If the numbering is a,b,c,d 1,2,3,4, then the matrix representation is as follows:

Subsequence Automata with Default Transitions

Separable discrete functions: recognition and sufficient conditions

arxiv: v1 [cs.dm] 24 Jul 2017

A Primer on Continuous-time Economic Dynamics

SEMI-EXCIRCLE OF QUADRILATERAL

CS 573 Automata Theory and Formal Languages

CS261: A Second Course in Algorithms Lecture #5: Minimum-Cost Bipartite Matching

Automata and Regular Languages

The DOACROSS statement

MCH T 111 Handout Triangle Review Page 1 of 3

September 30, :24 WSPC/Guidelines Y4Spanner

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version

Exercise sheet 6: Solutions

Maximum size of a minimum watching system and the graphs achieving the bound

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

A Disambiguation Algorithm for Finite Automata and Functional Transducers

Maximizing Maximal Angles for Plane Straight-Line Graphs

Computing all-terminal reliability of stochastic networks with Binary Decision Diagrams

CS 360 Exam 2 Fall 2014 Name

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4

Section 2.1 Special Right Triangles

Aperiodic tilings and substitutions

SIMPLE NONLINEAR GRAPHS

Technology Mapping Method for Low Power Consumption and High Performance in General-Synchronous Framework

Implication Graphs and Logic Testing

Computing the Quartet Distance between Evolutionary Trees in Time O(n log n)

Linear choosability of graphs

Anti-Monotonic Overlap-Graph Support Measures

Particle Physics. Michaelmas Term 2011 Prof Mark Thomson. Handout 3 : Interaction by Particle Exchange and QED. Recap

Solids of Revolution

Answers and Solutions to (Some Even Numbered) Suggested Exercises in Chapter 11 of Grimaldi s Discrete and Combinatorial Mathematics

Chapter 3. Vector Spaces. 3.1 Images and Image Arithmetic

Section 1.3 Triangles

Minimal DFA. minimal DFA for L starting from any other

GM1 Consolidation Worksheet

Metaheuristics for the Asymmetric Hamiltonian Path Problem

GRUPOS NANTEL BERGERON

Comparing the Pre-image and Image of a Dilation

Graph States EPIT Mehdi Mhalla (Calgary, Canada) Simon Perdrix (Grenoble, France)

Nondeterministic Finite Automata

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

Arrow s Impossibility Theorem

NON-DETERMINISTIC FSA

Analysis of Temporal Interactions with Link Streams and Stream Graphs

PYTHAGORAS THEOREM WHAT S IN CHAPTER 1? IN THIS CHAPTER YOU WILL:

6. Suppose lim = constant> 0. Which of the following does not hold?

Section 2.3. Matrix Inverses

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

Total score: /100 points

A Graphical Characterization of Lattice Conditional Independence Models

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Welcome. Balanced search trees. Balanced Search Trees. Inge Li Gørtz

New and Improved Spanning Ratios for Yao Graphs

Discrete Structures, Test 2 Monday, March 28, 2016 SOLUTIONS, VERSION α

Nondeterministic Automata vs Deterministic Automata

= state, a = reading and q j

Section 4.4. Green s Theorem

The vertex leafage of chordal graphs

Transcription:

Orienttion-Constrine Retngulr Lyouts Dvi Eppstein 1 n Elen Mumfor 2 1 Deprtment of Computer Siene, University of Cliforni, Irvine, USA 2 Deprtment of Mthemtis n Computer Siene, TU Einhoven, The Netherlns rxiv:0904.4312v1 [s.cg] 28 Apr 2009 Astrt. We onstrut prtitions of retngles into smller retngles from n input onsisting of plnr ul grph of the lyout together with restritions on the orienttions of eges n juntions of the lyout. Suh n orienttiononstrine lyout, if it exists, my e onstrute in polynomil time, n ll orienttion-onstrine lyouts my e liste in polynomil time per lyout. 1 Introution Consier prtition of retngle into smller retngles, t most three of whih meet t ny point. We ll suh prtition retngulr lyout. Retngulr lyouts re n importnt tool in mny pplition res. In VLSI esign retngulr lyouts represent floorplns of integrte iruits [8], while in rhiteturl esign they represent floorplns of uilings [2, 12]. In rtogrphy they re use to visulize numeri t out geogrphi regions, y stylizing the shpes of set of regions to eome retngles, with res hosen to represent sttistil t out the regions; suh visuliztions re lle retngulr rtogrms, n were first introue in 1934 y Risz [11]. The ul grph or jeny grph of lyout is plne grph G(L) tht hs vertex for every region of L n n ege for every two jent regions. In oth VLSI esign n in rtogrm onstrution, the jeny grph G is typilly given s input, n one hs to onstrut its retngulr ul, retngulr lyout for whih G is the ul grph. Neessry n suffiient onitions for grph to hve retngulr ul re known [7], ut grphs tht mit retngulr ul often mit more thn one. This ft llows us to impose itionl requirements on the retngulr uls tht we selet, ut it lso les to iffiult lgorithmi questions onerning prolems of fining lyouts with esire properties. For exmple, Eppstein et l [3] hve onsiere the serh for re-universl lyouts, lyouts tht n e turne into retngulr rtogrms for ny ssignment of positive weights to their regions. In this pper, we onsier nother kin of onstrine lyouts. Given grph G we woul like to know whether G hs retngulr ul tht stisfies ertin onstrints on the orienttions of the jenies of its regions; suh onstrints my e prtiulrly relevnt for rtogrphi pplitions of these lyouts. For exmple, in rtogrm of the U.S., we might require tht retngle representing Nev e right of or ove retngle representing Cliforni, s geogrphilly Nev is est n north of Cliforni. We show tht lyouts with orienttion onstrints of this type my e onstrute in polynomil time. Further, we n list ll lyouts oeying the onstrints in polynomil time per lyout. Our lgorithms n hnle onstrints (suh s the one ove)

t l r Fig. 1. A proper grph G, extene grph E(G), n retngulr ul L of E(G), from [3]. limiting the llowe orienttions of shre ege etween pir of jent regions, s well s more generl kin of onstrints restriting the possile orienttions of the three retngles meeting t ny juntion of the lyout. We lso isuss the prolem of fining re-universl lyouts in the presene of onstrints of these types. A version of the orienttion-restrite lyout prolem ws previously onsiere y vn Krevel n Spekmnn [14] ut they require more restritive set of onstrints n serhe exhustively through ll lyouts rther thn eveloping polynomil time lgorithms. Following [3], we use Birkhoff s representtion theorem for finite istriutive ltties to ssoite the lyouts ul to G with prtitions of relte prtil orer into lower set n n upper set. The min ie of our new lgorithms is to trnslte the orienttion onstrints of our prolem into n equivlene reltion on this prtil orer. We form qusiorer y omining this reltion with the originl prtil orer, prtition the qusiorer into lower n upper sets, n onstrut lyouts from these prtitions. However, the theory s outline ove only works iretly on ul grphs with no nontrivil seprting 4-yles. To hnle the generl se we must o more work to prtition G y its 4-yles into sugrphs n to piee together the solutions from eh sugrph. 2 Preliminries Kozminski n Kinnen [7] emonstrte tht plne tringulte grph G hs retngulr ul if it n e ugmente with four externl verties {l,t,r,} to otin n extene grph E(G) in whih every inner fe is tringle, the outer fe is qurilterl, n E(G) oes not ontin ny seprting 3-yles ( seprting k-yle is k-yle tht hs verties oth insie n outsie of it). A grph G tht n e extene in this wy is si to e proper see Fig. 1 for n exmple. The extene grph E(G) is sometimes referre to s orner ssignment of G, sine it efines whih verties of G eome orner retngles of the orresponing ul lyout. In the rest of the pper we ssume tht we re given proper grph with orner ssignment. For proper grphs without orner ssignment, one n lwys test ll possile orner ssignments, s their numer is polynomil in the numer of externl verties of the grph. A retngulr ul L inues leling for the eges of its grph G(L): we olor eh ege lue if the orresponing pir of retngles shre vertil line, or re if the orresponing pir of retngles shre horizontl orer; we iret the lue eges from left to right n re eges from ottom to top. For eh inner vertex v of G(L) the inient eges with the sme lel form ontinuous loks roun v: ll inoming lue

Fig. 2. Reoloring the interior of n lterntingly-olore four-yle in regulr ege leling. eges re followe (in lokwise orer) y ll outgoing re, ll outgoing lue n finlly ll inoming re eges. All eges jent to one of the four externl verties l,t,r, hve single lel. A leling tht stisfies these properties is lle regulr ege leling [6]. Eh regulr ege leling of proper grph orrespons to n equivlene lss of retngulr uls of G, onsiering two uls to e equivlent whenever every pir of jent regions hve the sme type of jeny in oth uls. 2.1 The istriutive lttie of regulr ege lelings A istriutive lttie is prtilly orere set in whih every pir(, ) of elements hs unique supremum (lle the meet of n ) n unique infinum (lle the join of n ) n where the join n meet opertions re istriutive over eh other. Two omprle elements tht re losest neighours in the orer re si to e overing pir, the lrger one is si to over the smller one. All regulr ege lelings of proper grph form istriutive lttie [4, 5, 13] in whih the overing pirs of lyouts re the pirs in whih the lyouts n e trnsforme from one to the other y mens of move hnging the leling of the eges insie n lternting four-yle ( 4-yle C whose ege olors lternte long the yle). Eh re ege within the yle eomes lue n vie vers; the orienttions of the eges re juste in unique wy suh tht the yli orer of the eges roun eh vertex is s efine ove see Fig. 2 for n exmple. In terms of lyouts, the move mens rotting the sulyout forme y the inner verties of C y 90 egrees. A move is lle lokwise if the orers etween the re n lue lels of eh of the four verties of the yle move lokwise y the move, n lle ounterlokwise otherwise. A ounterlokwise move trnsforms lyout into nother lyout higher up the lttie. We n represent the lttie y grph in whih eh vertex represents single lyout n eh ege represents move etween overing pir of lyouts, irete from the lower lyout to the higher one. We efine monotone pth to e pth in this grph orresponing to sequene of ounterlokwise moves. 2.2 The Birkhoff representtion of the lttie of lyouts For ny finite istriutive lttie D, let P e the prtil orer of join-irreuile elements (elements tht over only one other element of D), n let J(P) e the lttie of prtitions of P into sets L n U, where L is ownwr lose n U is upwr lose n where meets n joins in J(P) re efine s intersetions n unions of these sets. Birkhoff s representtion theorem [1] sttes tht D is isomorphi to J(P).

(,1) (,0) (,0) (,0) (,0) (,1) (,0) (,0) (,0) (,0) (,1) (,0) (,0) (,0) (,0) (,1) (,0) (,0) (,0) (,0) (,1) (,0) (,0) (,0) (,0) (,1) (,0) (,0) (,0) (,0) (,1) (,0) (,0) (,0) (,0) (,1) (,0) (,0) (,0) (,0) Fig. 3. The retngulr lyouts ul to given extene grph E(G) n the orresponing regulr ege lelings n prtil orer prtitions. Two lyouts re shown onnete to eh other y n ege if they iffer y reversing the olor within single lterntingly-olore four-yle; these moves re lele y the ege or vertex within the four-yle. From [3]. Eppstein et l. [3] show tht when E(G) hs no nontrivil seprting four-yles (four-yles with more thn one vertex on the insie) the prtil orer of join-irreuile elements of the lttie of retngulr uls of E(G) is orer-isomorphi to the prtil orer P on pirs (x,i), where x is flipple item of E(G), n i is flipping numer of x. A flipple item x is either egree-four vertex of G or n ege of G tht is not jent to egree-four vertex, suh tht there exist two regulr ege lelings of E(G) in whih x hs ifferent lels (when x is vertex we refer to the lels of its four jent eges). Given lyout L n flipple item x, the numer f x (L) is the numer of times tht x hs een flippe on monotone pth in the istriutive lttie from its ottom element to L; this numer, whih we ll the flipping numer of x in L, is well efine, sine it is inepenent of the pth y whih L hs een rehe. For every flipple item x, P ontins pirs (x,i) for ll i suh tht there exist lyout L where f x (L) = i 1. A pir (x,i) is ssoite with the trnsition of x from stte i to i+1. A pir (x,i) is less thn pir (y, j) in the prtil orer if is not possile to flip y for the jth time efore flipping x for the ith time. If(x,i) n(y, j) form overing pir in P, the flipple items x n y elong to the sme tringulr fe of E(G). As Eppstein et l. show, the lyouts ul to E(G) orrespon one-for-one with prtitions of the prtil orer P into lower set L n n upper set U. The leling of the lyout orresponing to given prtition of P n e reovere y strting from the miniml lyout n flipping eh flipple item x represente in the lower set L of the

prtition n x + 1 times, where(x,n x ) is the highest pir involving x in L. The ownwr moves tht n e performe from L orrespon to the mximl elements of L, n the upwr moves tht n e performe from L orrespon to the miniml elements of U. Fig. 3 epits the lttie of lyouts of 12-vertex extene ul grph, showing for eh lyout the orresponing prtition of the prtil orer into two sets L n U. The prtil orer of flipple items hs t most O(n 2 ) elements n n e onstrute in time polynomil in n, where n is the numer of verties in G [3]. 3 The lttie theory of onstrine lyouts As we esrie in this setion, in the se where every seprting 4-yle in E(G) is trivil, the orienttion-onstrine lyouts of E(G) my themselves e esrie s istriutive lttie, sulttie (lthough not in generl onnete sugrph) of the lttie of ll lyouts of E(G). 3.1 Sultties from quotient qusiorers We first onsier more generl orer-theoreti prolem. Let P e prtil orer n let C e (isonnete) unirete onstrint grph hving the elements of P s its verties. We sy tht prtition of P into lower set L n n upper set U respets C if there oes not exist n ege of C tht hs one enpoint in L n the other enpoint in U. As we now show, the prtitions tht respet C my e esrie s sulttie of the istriutive lttie J(P) efine vi Birkhoff s representtion theorem from P. We efine qusiorer (tht is, reflexive n trnsitive inry reltion) Q on the sme elements s P, y ing pirs to the reltion tht use ertin elements of P to eome equivlent to eh other. More preisely, form irete grph tht hs the elements of P s its verties, n tht hs irete ege from x to y whenever either x y in P or xy is n ege in C, n efine Q to e the trnsitive losure of this irete grph: tht is,(x,y) is reltion in Q whenever there is pth from x to y in the irete grph. A suset S of Q is ownwr lose (respetively, upwr lose) if there is no pir(x,y) relte in Q for whih S {x,y}={y} (respetively, S {x,y}={x}). Denote y J(Q) the set of prtitions of Q into ownwr lose n n upwr lose set. Eh strongly onnete omponent of the irete grph erive from P n C orrespons to set of elements of Q tht re ll relte iiretionlly to eh other, n Q inues prtil orer on these strongly onnete omponents. Therefore, y Birkhoff s representtion theorem, J(Q) forms istriutive lttie uner set unions n intersetions. Lemm 1. The fmily of prtitions in J(Q) is the fmily of prtitions of P into lower n upper sets tht respet C. Proof. We show the lemm y emonstrting tht every prtition in J(Q) orrespons to prtition of J(P) tht respets C n the other wy roun. In one iretion, let(l,u) e prtition in J(Q). Then, sine Q P, it follows tht (L,U) is lso prtition of P into ownwr-lose n n upwr-lose suset. Aitionlly,(L,U) respets C, for if there were n ege xy of C with one enpoint in

L n the other enpoint in U then one of the two pirs(x,y) or (y,x) woul ontrit the efinition of eing ownwr lose for L. In the other iretion, let (L,U ) e prtition of P into upper n lower sets tht respets C, let (x,y) e ny pir in Q, n suppose for ontrition tht x U n y L. Then there exists irete pth from x to y in whih eh ege onsists either of n orere pir in P or n ege in C. Sine x U n y L, this pth must hve n ege in whih the first enpoint is in U n the seon enpoint is in L. But if this ege omes from n orere pir in P, then (L,U ) is not prtition of P into upper n lower sets, while if this ege omes from C then (L,U ) oes not respet C. This ontrition estlishes tht there n e no suh pir (x,y), so (L,U ) is prtition of Q into upper n lower sets s we neee to estlish. If P n C re given s input, we my onstrut Q in polynomil time: y fining strongly onnete omponents of Q we my reue it to prtil orer, fter whih it is strightforwr to list the prtitions in J(Q) in polynomil time per prtition. 3.2 Ege orienttion onstrints Consier proper grph G with orner ssignment E(G) n ssume tht eh ege e is given with set of forien lels, where lels is olor-orienttion omintion for n ege, n let P e the prtil orer whose ssoite istriutive lttie J(P) hs its elements in one-to-one orresponene with the lyouts of E(G). Let x e the flipple item orresponing to e tht is either the ege itself of the egree-four vertex e is jent to. Then in ny lyout L, orresponing to prtition (L,U) J(P), the orienttion of e in L my e etermine from i mo 4, where i is the lrgest vlue suh tht(x, i) L. Thus if we woul like to exlue ertin olor-orienttion omintion for x, we hve fin the orresponing vlue k Z 4 n exlue the lyouts L suh tht f x (L) = k mo 4 from onsiertion. Thus the set of flipping vlues for x n e prtitione into forien n legl vlues for x; inste of onsiering olor-orienttion omintions of the flipple items we my onsier their flipping vlues. We formlize this resoning in the following lemm. Lemm 2. Let E(G) e orner ssignment of proper grph G. Let x e flipple item in E(G), let L e n element of the lttie of regulr ege lelings of E(G), n let (L,U) e the orresponing prtition of P. Then L stisfies the onstrints esrie y the forien lels if n only if for every flipple item x one of the following is true: The highest pir involving x in L is(x,i), where i+1 is not forien vlue for x, or (x,0) is in the upper set n 0 is not forien vlue for x. Lemm 1 my e use to show tht the set of ll onstrine lyout is istriutive lttie, n tht ll onstrine lyouts my e liste in polynomil time per lyout. For tehnil resons we ugment P to new prtil orer A(P) = P {,+ }, where the new element lies elow ll other elements n the new element + lies ove ll other elements. Eh lyout of E(G) orrespons to prtition of P into lower n

+ (,1) (,0) (,0) (,0) (,0) - + (,1) (,0) (,0) (,0) (,0) - + + (,1) (,1) (,0) (,0) (,0) (,0) (,0) (,0) (,0) (,0) - - + (,1) (,0) (,0) (,0) (,0) - + (,1) (,0) (,0) (,0) (,0) - Fig. 4. The fmily of retngulr lyouts ul to given extene grph E(G) stisfying the onstrints tht the ege etween retngles n must e vertil (nnot e olore re) n tht the ege etween retngles n must e horizontl (nnot e olore lue). The green regions epit strongly onnete omponents of the ssoite qusiorer Q. The four entrl she elements of the lttie orrespon to lyouts stisfying the onstrints. upper sets, whih n e mppe into prtition of A(P) y ing to the lower set n + to the upper set. The istriutive lttie J(A(P)) thus hs two itionl elements tht o not orrespon to lyouts of E(G): one in whih the lower set is empty n one in whih the upper set is empty. We efine onstrint grph C hving s its verties the elements of A(P), with eges efine s follows: If(x,i) n(x,i+1) re oth elements of A(P) n i+1 is forien vlue for x, we n ege from(x,i) to(x,i+1) in C. If(x,i) is n element of A(P) ut(x,i+1) is not, n i+1 is forien vlue for x, we n ege from(x,i) to + in C. If 0 is forien vlue for x, we n ege from to(x,0) in C. All together, this rings us to the following result: Lemm 3. Let E(G) e n extene grph without nontrivil seprting 4-yles n with given set of forien orienttions, n let Q e the qusiorer forme from the trnsitive losure of A(P) C s esrie in Lemm 1. Then the elements of J(Q)

orresponing to prtitions of Q into two nonempty susets orrespon to extly the lyouts tht stisfy the forien orienttion onstrints. Proof. By Lemm 2 n the efinition of C, prtition in J(P) orrespons to onstrine lyout if n only if it respets eh of the eges in C. By Lemm 1, the elements of J(Q) orrespon to prtitions of A(P) tht respet C. An prtition of A(P) orrespons to n element of J(P) if n only if its lower set oes not ontin+ n its upper set oes not ontin. Corollry 1 Let E(G) e n extene grph without nontrivil seprting 4-yles n with given set of forien orienttions. There exists onstrine lyout for E(G) if n only if there exists more thn one strongly onnete omponent in Q. Corollry 2 The existene of onstrine lyout for given extene grph E(G) without nontrivil seprting 4-yles n e prove or isprove in polynomil time. Corollry 3 All onstrine lyouts for given extene grph E(G) without nontrivil seprting 4-yles n e liste in polynomil time per lyout. Figure 4 epits the sulttie resulting from these onstrutions for the exmple from Figure 3, with onstrints on the orienttions of two of the lyout eges. 3.3 Juntion orienttion onstrints So fr we hve only onsiere foriing ertin ege lels. However the metho ove n esily e extene to ifferent types of onstrints. For exmple, onsier two elements of P (x,i) n (y, j) tht re overing pir in P ; this implies tht x n y re two of the three flipple items surrouning unique T-juntion of the lyouts ul to E(G). Foring (x,i) n (y, j) to e equivlent y ing n ege from (x,i) to (y, j) in the onstrint grph C n e use for more generl onstrints: rther thn isllowing one or more of the four orienttions for ny single flipple item, we n isllow one or more of the twelve orienttions of ny T-juntion. For instne, y ing equivlenes of this type we oul fore one of the three retngles t the T- juntion to e the one with the 180-egree ngle. Any internl T-juntion of lyout for E(G) (ul to tringle of G) hs 12 potentil orienttions: eh of its three retngles n e the one with the 180-egree ngle, n with tht hoie fixe there remin four hoies for the orienttion of the juntion. In terms of the regulr ege leling, ny tringle of G my e olore n oriente in ny of 12 ifferent wys. For given overing pir (x,i) n (y, j), let Cx,y i, j enote the set of eges etween pirs (x,i+4k) n (y, j+ 4k) for ll possile integer vlues of k, together with n ege from to (y,0) if j mo 4=0 n n ege from(x,i+4k) to + if i+4k is the lrgest vlue of i suh tht (x,i ) elongs to P. Any T-juntion is ssoite with 12 of these ege sets, s there re three wys of hoosing pir of jent flipple items n four wys of hoosing vlues of i n j (mo 4) tht le to overing pirs. Inluing ny one of these ege sets in the onstrint grph C orrespons to foriing one of the 12 potentil orienttions of the T-juntion. Thus, Lemm 3.2 n its orollries my e pplie without hnge to ul grphs E(G) with juntion orienttion onstrints s well s ege orienttion onstrints, s long s E(G) hs no nontrivil seprting 4-yles.

4 Constrine lyouts for unonstrine ul grphs Proper grphs with nontrivil seprting 4-yles still hve finite istriutive ltties of lyouts, ut it is no longer possile to trnslte orienttion onstrints into equivlenes etween memers of n unerlying prtil orer. The reson is tht, for grph without trivil seprting 4-yles, the orienttion of feture of the lyout hnges only for flip involving tht feture, so tht the orienttion my e etermine from the flip ount moulo four. For more generl grphs the orienttion of feture is hnge not only for flips iretly ssoite with tht feture, ut lso for flips ssoite with lrger 4-yles tht ontin the feture, so the flip ount of the feture no longer etermines its orienttion. For this reson, s in [3], we tret generl proper grphs y eomposing them into miniml seprtion omponents with respet to seprting 4-yles n pieing together solutions foun seprtely within eh of these omponents. For eh seprting four-yle C in proper grph G with orner ssignment E(G) onsier two minors of G efine s follows. The inner seprtion omponent of C is grph G C n its extene grph E(G C ), where G C is the sugrph of G inue y the verties insie C n E(G C ) s the four verties of the yle s orners of the extene grph. The outer seprtion omponent of C is grph forme y ontrting the interior of C into single supervertex. A miniml seprtion omponent of G is minor of G forme y repetely splitting lrger grphs into seprtion omponents until no nontrivil seprting four-yles remin. A prtition tree of E(G) into miniml seprtion omponents my e foun in liner time [3]. We use the representtion of grph s tree of miniml seprtion omponents in our serh for onstrine lyouts for G. We first onsier eh suh miniml omponent seprtely for every possile mpping of verties of C to {l,t,r,} (we ll these mppings the orienttion of E(G)). Different orienttions imply ifferent flipping vlues of forien lels for the given onstrint funtion, sine the flipping numers re efine with respet to the orienttion of E(G). Hving tht in min we re going to test the grph E(G) for existene of onstrine lyout in the following wy: For eh piee in ottom-up trversl of the eomposition tree n for eh orienttion of the orners of the piee: 1. Fin the prtil orer P esriing the lyouts of the piee 2. Trnslte the orienttion onstrints within the piee into onstrint grph on the ugmente prtil orer A(P). Fig. 5. An extene grph with nontrivil seprting four-yle (left), its outer seprtion omponent (enter), n its inner seprtion omponent (right). From [3].

3. Compute the strongly onnete omponents of the union of A(P) with the onstrint grph, n form inry reltion tht is suset of Q n tht inlues ll overing reltions in Q y fining the omponents ontining eh pir of elements in eh overing reltion in P. 4. Trnslte the existene or nonexistene of lyout into onstrint on the lel of the orresponing egree-4 vertex in the prent piee of the eomposition. Tht is, if the onstrine lyout for given orienttion of E(G ) oes not exist, fori (in the prent piee of the eomposition) the lel of the egree-four vertex orresponing to tht orienttion. If the lgorithm ove onfirms the existene of onstrine lyout, we my list ll lyouts stisfying the onstrints s follows. For eh piee in the eomposition tree, in top-own orer: 1. List ll lower sets of the orresponing qusiorer Q. 2. Trnslte eh lower set into lyout for tht piee. 3. For eh lyout, n eh hil of the piee in the eomposition tree, reursively list the lyouts in whih the hil s orner orienttion mthes the leling of the orresponing egree-four vertex of the outer lyout. 4. Glue the inner n outer lyouts together. Theorem 1. The existene of onstrine lyout for proper grph G n e foun in polynomil time in G. The set of ll onstrine lyouts for grph n e foun in polynomil time per lyout. As esrie in [3], the prtil orer P esriing the lyouts of eh piee hs numer of elements n overing pirs tht is qurti in the numer of verties in the ul grph of the piee, n esription of this prtil orer in terms of its overing pirs my e foun in qurti time. The strongly onnete omponent lultion within the lgorithm tkes time liner in the size of P, n therefore the overll lgorithm for testing the existene of onstrine lyout tkes time O(n 2 ), where n is the numer of verties in the given ul grph. 5 Fining re-universl onstrine lyouts Our previous work [3] inlue n lgorithm for fining re-universl lyouts tht is fixe-prmeter trtle, with the mximum numer of seprting four-yles in ny piee of the seprtion omponent eomposition s its prmeter. It is not known whether this prolem my e solve in polynomil time for ritrry grphs. But s we outline in this setion, the sme fixe prmeter trtility result hols for omintion of the onstrints from tht pper n from this one: the prolem of serhing for n re-universl lyout with onstrine orienttions. These lyouts orrespon to prtitions of P suh tht ll flipple items tht re miniml elements of the upper set n ll flipple items tht re mximl items of the lower set re ll egree-four verties. A rute fore lgorithm n fin these prtitions y looking t ll sets of egree-four verties s nites for extreme sets for prtitions

of P. Inste, in our previous work on this prolem we oserve tht flipple ege is not free in lyout (i.e. nnot e flippe in the lyout), if n only if it is fixe y so-lle strethe pir. A strethe pir is pir of two egree-four verties (v, w), suh tht on ny monotone pth up from L w is flippe efore w, n on ny monotone pth own from L v is flippe efore w. If f v (L) is the mximl flipping vlue of v, then we elre (v, /0) to e strethe (where /0 is speil symol) n elre (/0,w) to e strethe pir if f w (L) = 0. An ege is fixe y strethe pir (v,w) in L if x if every monotone pth up from L moves w efore moving x, n every monotone pth own from L moves v efore moving x. So inste of looking for extreme sets, we oul hek every set of egree-four verties for existene of lyout in whih every pir in the set is strethe, n hek whih eges eh suh set fixes. Eh set H of pirs n e heke for strethility y strting t the ottom of the lttie n flipping the orresponing items of P up the lttie until every pir in H is strethe or the mximl elements of the lttie is rehe. If there re k egree-four verties (or equivlently seprting 4-yles) in piee, there re 2 O(k2) sets of strethe pirs we nee onsier, eh of whih tkes polynomil time to test, so the overll lgorithm for serhing for unonstrine re-universl lyouts tkes time 2 O(k2) n O(1). For onstrine lyouts, similr pproh works. Within eh piee of the seprtion eomposition, we onsier 2 O(k2) sets of strethe pirs in P, s efore. However, to test one of these sets, we perform monotoni sequene of flips in J(Q), t eh point either flipping n element of Q tht ontins the upper element of pir tht shoul e strethe, or performing flip tht is neessry prerequisite to flipping suh n upper element. Eventully, this proess will either reh n re-universl lyout for the piee or the top element of the lttie; in the ltter se, no re-universl lyout hving tht pttern of strethe pirs exists. By testing ll sets of strethe pirs, we my fin whether n re-universl lyout mthing the onstrints exists for ny orner oloring of ny piee in the seprtion eomposition. These onstrine lyouts for iniviul piees n then e omine y the sme tree trversl of the seprtion eomposition tree tht we use in the previous setion, ue to the oservtion from [3] tht lyout is re-universl if n only if the erive lyout within eh of its seprtion omponents is re-universl. The running time for this fixe-prmeter trtle lgorithm is the sme s in [3]. 6 Conlusions n open prolems We hve provie effiient lgorithms for fining retngulr lyouts with orienttion onstrints on the fetures of the onstrints, n we hve outline how to omine our pproh with the previous lgorithms for fining re-universl lyouts so tht we n fin orienttion-onstrine re-universl lyouts s effiiently s we n solve the unonstrine prolem. An importnt prolem in the genertion of retngulr lyouts with speil properties, tht hs resiste our lttie-theoreti pproh, is the genertion of sliele lyouts. If we re given grph G, n we etermine whether it is the grph of sliele lyout in polynomil time? Aitionlly, lthough our lgorithms re polynomil time, there seems no reson intrinsi to the prolem for them to tke s muh time s they o:

n we hieve suqurti time ouns for fining orienttion-onstrine lyouts, perhps y using n lgorithm se more on the speil fetures of the prolem n less on generl ies from lttie theory? Moving eyon lyouts, there re severl other importnt omintoril onstrutions tht my e represente using finite istriutive ltties, notly the set of mthings n the set of spnning trees of plnr grph, n ertin sets of orienttions of ritrry grphs [9]. It woul e of interest to investigte whether our pproh of omining the unerlying prtil orer of lttie with onstrint grph proues useful versions of onstrine mthing n onstrine spnning tree prolems, n whether other lgorithms tht hve een evelope in the more generl ontext of istriutive finite ltties [10] might fruitfully e pplie to ltties of retngulr lyouts. Aknowlegements Work of D. Eppstein ws supporte in prt y NSF grnt 0830403 n y the Offie of Nvl Reserh uner grnt N00014-08-1-1015. Referenes 1. G. Birkhoff. Rings of sets. Duke Mthemtil Journl, 3(3):443 454, 1937. 2. C. F. Erl n L. J. Mrh. Arhiteturl pplitions of grph theory. In R. Wilson n L. Beineke, eitors, Applitions of Grph Theory, pges 327 355. Aemi Press, Lonon, 1979. 3. D. Eppstein, E. Mumfor, B. Spekmnn, n K. Vereek. Are-universl retngulr lyouts. In Pro. 25th ACM Symp. Computtionl Geometry, 2009. To pper. 4. É. Fusy. Trnsversl strutures on tringultions, with pplition to stright-line rwing. In P. Hely n N. S. Nikolov, eitors, Grph Drwing: 13th Int. Symp., GD 2005, volume 3843 of Leture Notes in Computer Siene, pges 177 188. Springer-Verlg, 2006. 5. É. Fusy. Trnsversl strutures on tringultions: A omintoril stuy n stright-line rwings. Disrete Mthemtis, 2009. To pper. 6. G. Knt n X. He. Regulr ege leling of 4-onnete plne grphs n its pplitions in grph rwing prolems. Theoretil Computer Siene, 172(1 2):175 193, 1997. 7. K. Koźmiński n E. Kinnen. Retngulr uls of plnr grphs. Networks, 5(2):145 157, 1985. 8. C.-C. Lio, H.-I. Lu, n H.-C. Yen. Compt floor-plnning vi orerly spnning trees. Journl of Algorithms, 48:441 451, 2003. 9. J. Propp. Lttie struture for orienttions of grphs. Eletroni preprint rxiv:mth/0209005, 1993. 10. J. Propp. Generting rnom elements of finite istriutive ltties. Eletroni J. Comintoris, 4(2):R15, 1997. 11. E. Risz. The retngulr sttistil rtogrm. Geogrphil Review, 24(2):292 296, 1934. 12. I. Rinsm. Retngulr n orthogonl floorplns with require rooms res n tree jeny. Environment n Plnning B: Plnning n Design, 15:111 118, 1988. 13. H. Tng n W.-K. Chen. Genertion of retngulr uls of plnr tringulte grph y elementry trnsformtions. In IEEE Int. Symp. Ciruits n Systems, volume 4, pges 2857 2860, 1990. 14. M. vn Krevel n B. Spekmnn. On retngulr rtogrms. Computtionl Geometry: Theory n Applitions, 37(3):175 187, 2007.