Planar Drawings of Graphs on the Rectilinear Grid with Few Bends In
Total Page:16
File Type:pdf, Size:1020Kb
Planar Drawings of Graphs on the Rectilinear Grid with Few Bends in Each Edge research thesis submitted in partial fulfillment of the requirements for the degree of master of science in Computer Science GILAD GRANOT Technion - Computer Science Department M.Sc. Thesis MSC-1994-01 1994 submitted to the senate of the technion israel institute of technology tamuz haifa june The work described herein was supervised by prof Shimon Even I want to thank Shimon Even for his helpful guidance Shimon always knew to suggest a direction to work on when I needed it He help ed me to put together my disorganized thoughts I learned a lot from our long conversations which were fun also when not related to the work I want to thank Go os Kant and Arnold L Rosenberg for their useful comments on previous versions of chapter I thank all my friends at the Computer Science department who made my stay there a pleasure I wont mention names so that I wont forget anyone Finally I have to thank the various secretaries that handle graduate students I want to thank them for not preventing me from nishing my studies Technion - Computer Science Department M.Sc. Thesis MSC-1994-01 1994 i Contents Abstract Background Introduction denitions Previous Work Visibility Representations Preliminaries Finding a Visibility Representation of a Nonseparable Graph Constrained Visibility Representations Drawings with Vertices Drawn as Points Introduction Left Adjusted Visibility Representations Drawing Vertices as Points Graphs That Are Hard to Draw Drawings with Vertices Drawn as Rectangular Mo dules Introduction Planarity Checking Planar GridLayouts The Case of No SelfLo ops Planar GridLayouts The Case With SelfLo ops Mo dule Descriptions that are Hard to Draw An Application NonPlanar Drawings Vertices as Points Vertices as Mo dules GridLayouts Bibliography Technion - Computer Science Department M.Sc. Thesis MSC-1994-01 1994 ii Abstract For a planar graph a lineartime algorithm is describ ed to construct a planar drawing on the rectilinear grid with at most b ends in each edge The drawings found by this algorithm for planar graphs with no self lo ops have at most b ends in each edge The drawings use O n area and edges of length O n We also show a planar graph that has no rectilinear planar drawing with at most b ends in each edge and a planar graph that has no rectilinear planar drawing with at most b end in each edge Consider an input data which sp ecies a blo ck diagram of some mo dules and connec tions b etween them edges which can b e drawn on the plane in such a way that lines representing the connections do not cross The size of the mo dules and the placements of the terminals on them is given as part of the input A lineartime algorithm is describ ed to construct a planar drawing on the rectilinear grid with at most b ends in a line representing a connection b etween two terminals of the same mo dule and at most b ends in any other line The external face of the drawing may b e chosen We show a planar input with no self lo ops that has no planar drawing with less than b ends in each edge and another planar input that has no planar drawing with less than b ends in each self lo op Finally we consider grid drawings of sp ecied blo ck diagrams which are not neces sarily planar We present a lineartime algorithm to construct such grid drawings with at most b ends in any line of the blo ck diagram We show inputs that have no such drawing with at most b ends in any line Technion - Computer Science Department M.Sc. Thesis MSC-1994-01 1994 Chapter Background Introduction We consider drawing a graph in the plane in a way suitable for the layout of one layered electrical circuits or VLSI comp onents The drawing is done on the rectilinear grid which is a collection of parallel lines at a constant distance one from another and a copy of them rotated by Edges are drawn as paths on the grid connecting their two end vertices The drawing must b e planar that is the drawing of two dierent edges have no common p oint except maybe at their ends where the two edges have a common end vertex A b end is a p oint in the path representing an edge in which the path has a angle We want the drawing to have few b ends in each edge This is imp ortant where the drawing realizes a circuit and a b end may cause a delay or a signal loss It also makes it easier for humans to follow the drawings of the edges We call a drawing in which every edge has no more than k b ends a kbend drawing We investigate two types of drawings which are dierent in the way the vertices are drawn In the rst type of drawings we consider the vertices are drawn as distinct p oints at intersections of grid lines A planar graph is a graph that has a planar drawing A d planar graph is a planar graph that has no vertex of degree greater than d By denition drawable graphs must b e planar We describ e a lineartime algorithm that pro duces a b end drawing for any planar graph and a b end drawing for any planar graph with no self lo ops The drawings have O n area a total of O n b ends and edges of length Technion - Computer Science Department M.Sc. Thesis MSC-1994-01 1994 O n We then show a planar graph that has no b end drawing and a planar graph that has no b end drawing In the second type of drawings we investigate the vertices are drawn as rectangular mo dules on the grid and edges are drawn as nonintersecting paths on the grid b etween the p erimeters of two mo dules The p oint that an edge connects to the p erimeter of a mo dule is called a terminal The size of the mo dules and the placements of the terminals on them is given as part of the input The input assigns to each edge two sp ecic terminals We try to pro duce drawings with few b ends in each edge We consider two versions of the problem in one ipping of the mo dules is allowed in the other it is not Rotation of the mo dules is always allowed For b oth versions of the problem lineartime algorithms are known that determine if a planar drawing of the input is p ossible When we say that a planar drawing is p ossible we do not mean that such a drawing has to b e on the rectilinear grid We will show a lineartime algorithm that constructs a b end drawing for any input that p ermits a planar drawing In the pro duced drawings edges that are not self lo ops have at most b ends We will show planar input with no self lo ops that has no b end drawing and planar input that has no b end drawing denitions We present here denitions that will b e used throughout the thesis The denitions are gathered here so that later the explanations will b e more uent and to make them easier to nd Some denitions brought here may also app ear elsewhere and some denitions relevant only to a sp ecic chapter may only app ear there When we talk ab out a graph GV E we are not restricted to simple graphs This means that the graph may have parallel edges and self lo ops We denote jV j n and jE j m For denitions of basic terms in the context of graphs see Eve We use the e e v for an edge e which connects vertices u and v and uv for a directed edge notation u e from u to v If a connected graph has three dierent vertices abc such that all the paths b etween a and c pass through b then b is called a cut vertex or a separation vertex of the graph A connected graph that has no cut vertex is called nonseparable Nonseparable graphs are sometimes called biconnected A planar drawing of a graph on the plane is a mapping of it to the plane Vertices are mapp ed to p oints or to closed curves in the plane and edges are mapp ed to curves in the plane The endp oints of the curve representing an edge must b elong to the drawings of the end vertices of that edge Except for this case no p oint b elonging to a drawing of an Technion - Computer Science Department M.Sc. Thesis MSC-1994-01 1994 edge or a vertex may b elong to a drawing of another edge or vertex A planar graph is a graph that has a planar drawing Adplanar graph is a planar graph that has no vertex of degree greater than d We consider drawing a graph in the plane in a way suitable for the layout of a one layered electrical circuit or a VLSI comp onent The drawing is done on the rectilinear grid which is a collection of parallel lines with a constant distance b etween neighboring lines and a copy of them rotated by Edges and vertices are drawn only on the grid We dene the following for drawings on the rectilinear grid A bend is a p oint in the path representing an edge in which the path has a angle We call a drawing in which every edge has no more than k b ends a kbend drawing The area of a drawing is the area of the smallest rectangle sides parallel to the grid lines containing the drawing The area is measured in grid squares When we remove from the plane p oints that b elong to a planar drawing of a connected graph the plane is divided into continuous areas Points inside a drawing of a vertex are also removed The b oundary of each of these areas represents a cycle of the graph an edge may app ear twice in such a cycle