The.Algorithm.Design.Manual.Springer-Verlag.1998
The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998
Planarity Detection and Embedding The study of planarity has motivated much of the development of graph theory. To get a better appreciation of the subtleties of planar drawings, the reader is urged to construct a planar (noncrossing) embedding for the graph , the complete graph on five vertices with any single edge deleted. Then construct such an embedding where all the edges are straight. Finally, attempt to do the same for itself. It is useful to distinguish the problem of planarity testing (does a graph have a planar drawing) from constructing planar embeddings (actually finding the drawing), although both can be done in linear time. Surprisingly, many efficient algorithms for planar graphs do not make use of the drawing but use the low-degree deletion sequence described above. Algorithms for planarity testing begin by embedding an arbitrary cycle from the graph in the plane and then considering additional paths in G between vertices on this cycle. Whenever two such paths cross, one must be drawn outside the cycle and one inside. When three such paths mutually cross, there is no way to resolve the problem, and so the graph cannot be planar. Linear-time algorithms for planarity detection are based on depth-first search, but they are subtle and complicated enough that you would be wise to use an existing implementation if you can. Such path-crossing algorithms can be used to construct a planar embedding by inserting the paths into the drawing one by one. Unfortunately, because they work in an incremental manner, nothing prevents them from inserting many vertices and edges into a relatively small area of the drawing. Such cramping makes the drawing ugly and hard to understand, and is a major problem with planar-embedding algorithms. More recently, algorithms have been devised that construct planar-grid embeddings, where each vertex lies on a grid. Thus no region can get too cramped and no edge can get too long. Still, the resulting drawings tend not to look as natural as one might hope. For nonplanar graphs, what is often sought is a drawing that minimizes the number of crossings. Unfortunately, computing the crossing number is NP-complete. A useful heuristic extracts a large planar subgraph of G, embeds this subgraph, and then inserts the remaining edges one by one so as to minimize the number of crossings. This won't do much for dense graphs, which are doomed to have a large number of crossings, but it will work well for graphs that are almost planar, such as road networks with overpasses or printed circuit boards with multiple layers. Large planar subgraphs can be found by modifying planarity-testing algorithms to delete troublemaking edges. Implementations: LEDA (see Section ) provides a nice set of data structures and algorithms to support working on planar subdivisions. Included are both linear-time planarity testing and constructing straight-line planar-grid embeddings. GraphEd includes an implementation of both planarity testing and planar graph layout. See Section for more details on GraphEd. Combinatorica [Ski90] provides a (slow) Mathematica implementation of file:///E|/BOOK/BOOK4/NODE170.HTM (2 of 3) [19/1/2003 1:31:14]
Planarity Detection and Embedding planarity testing. See Section . Notes: Kuratowski [Kur30] gave the first characterization of planar graphs, namely that they do not contain a subgraph homeomorphic to or . Thus if you are still working on the exercise to embed , now is an appropriate time to give it up. Fary's theorem [F48] states that every planar graph can be drawn such that each edge is straight. Hopcroft and Tarjan [HT74] gave the first linear-time algorithm for drawing graphs. Expositions on linear-time planarity testing include [Eve79a]. Nishizeki and Chiba [NC88] provide a good reference to the algorithmic theory of planar graphs. Efficient algorithms for planar grid embeddings were first developed by [dFPP88]. See [CHT90] for an algorithm to find the maximum planar subgraph of a nonplanar graph. Outerplanar graphs are those that can be drawn such that all vertices lie on the outer face of the drawing. Such graphs can be characterized as having no subgraph homeomorphic to and can be recognized and embedded in linear time. Related Problems: Graph partition (see page ), drawing trees (see page ). Next: Graph Problems: Hard Problems Up: Graph Problems: Polynomial-Time Previous: Drawing Trees Algorithms Mon Jun 2 23:33:50 EDT 1997 file:///E|/BOOK/BOOK4/NODE170.HTM (3 of 3) [19/1/2003 1:31:14]
- Page 459 and 460: Job Scheduling shop scheduling incl
- Page 461 and 462: Satisfiability logic, and automatic
- Page 463 and 464: Satisfiability Next: Graph Problems
- Page 465 and 466: Graph Problems: Polynomial-Time rec
- Page 467 and 468: Connected Components Testing the co
- Page 469 and 470: Connected Components discussing gra
- Page 471 and 472: Topological Sorting contradiction t
- Page 473 and 474: Minimum Spanning Tree Next: Shortes
- Page 475 and 476: Minimum Spanning Tree help you sort
- Page 477 and 478: Shortest Path Next: Transitive Clos
- Page 479 and 480: Shortest Path easier to program tha
- Page 481 and 482: Shortest Path Related Problems: Net
- Page 483 and 484: Transitive Closure and Reduction
- Page 485 and 486: Transitive Closure and Reduction Al
- Page 487 and 488: Matching augmenting paths and stopp
- Page 489 and 490: Matching Combinatorica [Ski90] prov
- Page 491 and 492: Eulerian Cycle / Chinese Postman ar
- Page 493 and 494: Eulerian Cycle / Chinese Postman Ne
- Page 495 and 496: Edge and Vertex Connectivity Severa
- Page 497 and 498: Edge and Vertex Connectivity Next:
- Page 499 and 500: Network Flow programming model for
- Page 501 and 502: Network Flow Combinatorica [Ski90]
- Page 503 and 504: Drawing Graphs Nicely vertices are
- Page 505 and 506: Drawing Graphs Nicely labs.com/orgs
- Page 507 and 508: Drawing Trees such as the map of th
- Page 509: Planarity Detection and Embedding N
- Page 513 and 514: Graph Problems: Hard Problems ● C
- Page 515 and 516: Clique approximate even to within a
- Page 517 and 518: Independent Set Next: Vertex Cover
- Page 519 and 520: Independent Set Related Problems: C
- Page 521 and 522: Vertex Cover Vertex cover and indep
- Page 523 and 524: Traveling Salesman Problem Next: Ha
- Page 525 and 526: Traveling Salesman Problem practice
- Page 527 and 528: Traveling Salesman Problem Size is
- Page 529 and 530: Hamiltonian Cycle Eulerian cycle, p
- Page 531 and 532: Graph Partition Next: Vertex Colori
- Page 533 and 534: Graph Partition annealing, is almos
- Page 535 and 536: Vertex Coloring Several special cas
- Page 537 and 538: Vertex Coloring Notes: An excellent
- Page 539 and 540: Edge Coloring The minimum number of
- Page 541 and 542: Graph Isomorphism Next: Steiner Tre
- Page 543 and 544: Graph Isomorphism vertices into equ
- Page 545 and 546: Steiner Tree Next: Feedback Edge/Ve
- Page 547 and 548: Steiner Tree The worst case for a m
- Page 549 and 550: Feedback Edge/Vertex Set Next: Comp
- Page 551 and 552: Feedback Edge/Vertex Set An interes
- Page 553 and 554: Computational Geometry complete bib
- Page 555 and 556: Robust Geometric Primitives Next: C
- Page 557 and 558: Robust Geometric Primitives ● Are
- Page 559 and 560: Robust Geometric Primitives Related
Planarity Detection and Embedding<br />
<strong>The</strong> study of planarity has motivated much of the development of graph theory. To get a better<br />
appreciation of the subtleties of planar drawings, the reader is urged to construct a planar (noncrossing)<br />
embedding for the graph , the complete graph on five vertices with any single edge deleted.<br />
<strong>The</strong>n construct such an embedding where all the edges are straight. Finally, attempt to do the same for<br />
itself.<br />
It is useful to distinguish the problem of planarity testing (does a graph have a planar drawing) from<br />
constructing planar embeddings (actually finding the drawing), although both can be done in linear<br />
time. Surprisingly, many efficient algorithms for planar graphs do not make use of the drawing but use<br />
the low-degree deletion sequence described above.<br />
<strong>Algorithm</strong>s for planarity testing begin by embedding an arbitrary cycle from the graph in the plane and<br />
then considering additional paths in G between vertices on this cycle. Whenever two such paths cross,<br />
one must be drawn outside the cycle and one inside. When three such paths mutually cross, there is no<br />
way to resolve the problem, and so the graph cannot be planar. Linear-time algorithms for planarity<br />
detection are based on depth-first search, but they are subtle and complicated enough that you would be<br />
wise to use an existing implementation if you can.<br />
Such path-crossing algorithms can be used to construct a planar embedding by inserting the paths into the<br />
drawing one by one. Unfortunately, because they work in an incremental manner, nothing prevents<br />
them from inserting many vertices and edges into a relatively small area of the drawing. Such cramping<br />
makes the drawing ugly and hard to understand, and is a major problem with planar-embedding<br />
algorithms. More recently, algorithms have been devised that construct planar-grid embeddings, where<br />
each vertex lies on a grid. Thus no region can get too cramped and no edge can get too<br />
long. Still, the resulting drawings tend not to look as natural as one might hope.<br />
For nonplanar graphs, what is often sought is a drawing that minimizes the number of crossings.<br />
Unfortunately, computing the crossing number is NP-complete. A useful heuristic extracts a large<br />
planar subgraph of G, embeds this subgraph, and then inserts the remaining edges one by one so as to<br />
minimize the number of crossings. This won't do much for dense graphs, which are doomed to have a<br />
large number of crossings, but it will work well for graphs that are almost planar, such as road networks<br />
with overpasses or printed circuit boards with multiple layers. Large planar subgraphs can be found by<br />
modifying planarity-testing algorithms to delete troublemaking edges.<br />
Implementations: LEDA (see Section ) provides a nice set of data structures and algorithms to<br />
support working on planar subdivisions. Included are both linear-time planarity testing and<br />
constructing straight-line planar-grid embeddings.<br />
GraphEd includes an implementation of both planarity testing and planar graph layout. See Section<br />
for more details on GraphEd. Combinatorica [Ski90] provides a (slow) Mathematica implementation of<br />
file:///E|/BOOK/BOOK4/NODE170.HTM (2 of 3) [19/1/2003 1:31:14]