Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 32 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
32
Dung lượng
92,96 KB
Nội dung
GraphDrawing 0 GraphDrawing Tutorial Isabel F. Cruz Worcester Polytechnic Institute Roberto Tamassia Brown University GraphDrawing 1 Introduction GraphDrawing 2 GraphDrawing ■ models, algorithms, and systems for the visualization of graphs and networks ■ applications to software engineering (class hierarchies), database systems (ER- diagrams), project management (PERT diagrams), knowledge representation (isa hierarchies), telecommunications (ring covers), WWW (browsing history) . 1 2 3 4 5 6 7 8 9 10 11 12 13 1415 16 1718 19 20 21 22 23 24 25 26 2728 29 30 31 32 33 34 35 36 37 38 3940 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 GraphDrawing 3 orthogonal drawing bend Drawing Conventions ■ general constraints on the geometric representation of vertices and edges polyline drawing planar straight-line drawingGraphDrawing 4 strong visibility representation planar othogonal straight-line drawing gf abc e d g f a b d e c Drawing Conventions GraphDrawing 5 Drawing Conventions ■ directed acyclic graphs are usually drawn in such a way that all edges “flow” in the same direction, e.g., from left to right, or from bottom to top ■ such upward drawings effectively visualize hierarchical relationships, such as covering digraphs of ordered sets ■ not every planar acyclic digraph admits a planar upward drawingGraphDrawing 6 Resolution ■ display devices and the human eye have finite resolution ■ examples of resolution rules: ■ integer coordinates for vertices and bends (grid drawings) ■ prescribed minimum distance between vertices ■ prescribed minimum distance between vertices and nonincident edges ■ prescribed minimum angle formed by consecutive incident edges (angular resolution) GraphDrawing 7 Angular Resolution • The angular resolution ρ of a straight- line drawing is the smallest angle formed by two edges incident on the same vertex • High angular resolution is desirable in visualization applications and in the design of optical communication networks. •Atrivial upper bound on the angular resolution is where d is the maximum vertex degree. ρ ≤ 2π d ------ GraphDrawing 8 Aesthetic Criteria ■ some drawings are better than others in conveying information on the graph ■ aesthetic criteria attempt to characterize readability by means of general optimization goals Examples ■ minimize crossings ■ minimize area ■ minimize bends (in orthogonal drawings) ■ minimize slopes (in polyline drawings) ■ maximize smallest angle ■ maximize display of symmetries GraphDrawing 9 Trade-Offs ■ in general, one cannot simultaneously optimize two aesthetic criteria Complexity Issues ■ testing planarity takes linear time ■ testing upward planarity is NP-hard ■ minimizing crossings is NP-hard ■ minimizing bends in planar orthogonal drawing: ■ NP-hard in general ■ polynomial time for a fixed embedding min # crossings max symmetries [...]... “below” Example: GraphDrawing 21 Area-Efficient Drawings of Trees s planar straight-line upward grid drawings of AVL trees with O(n) area [Crescenzi Di Battista Piperno 92] [Crescenzi Penna Piperno 95] GraphDrawing 22 Area-Efficient Drawings of Trees s planar polyline upward grid drawings with O(n) area [Garg Goodrich Tamassia 93] GraphDrawing 23 Area Requirement of Planar Drawings of Trees upward level... draw general rooted trees (e.g., root is placed at the average x-coordinate of its children) GraphDrawing 19 Non Optimality of Recursive Tree Drawing Algorithm drawing constructed by the algorithm minimum width drawing s minimizing the width is NP-hard if integer coordinates are required GraphDrawing 20 Area-Efficient Drawings of Trees s s s planar straight-line orthogonal upward grid drawing of a binary... set notation) GraphDrawing 13 Getting Started with GraphDrawing s Book on GraphDrawing by G Di Battista, P Eades, R Tamassia, and I G Tollis, ISBN 0-1 3-3 0161 5-3 , Prentice Hall, (available in August 1998) s Roberto Tamassia’s WWW page http://www.cs.brown.edu/people/rt/ s s Tutorial on GraphDrawing by Isabel Cruz and Roberto Tamassia (about 100 pages) Annotated Bibliography on GraphDrawing (more... 23 5-2 82 (1994) s Computational Geometry Bibliography www.cs.duke.edu/~jeffe/compgeom/biblios.html s s (about 8,000 BibTeX entries, including most papers on graph drawing, updated quarterly) Proceedings of the GraphDrawing Symposium (Springer-Verlag, LNCS) GraphDrawing Chapters in: CRC Handbook of Discrete and Computational Geometry Elsevier Manual of Computational Geometry GraphDrawing 14 Trees Graph. .. planar drawings of binary trees: Ο(n) [RT 83] upward, straight-line level upward, polyline upward, straight-line orthogonal, AVL trees upward, straight-line orthogonal s Θ(n1/2) [GGT93] Θ(n1/2) [CGKT96] Θ((n log n)1/2) [CGKT96] Open Problem: can Θ(n1/2) size be achieved for (nonupward) planar straightline drawings of binary trees? GraphDrawing 25 Planar Upward Straight-Line Drawings of Binary Trees. .. polyline upward straight-line upward orthogonal non-upward orthogonal non-upward leaves-on-hull orthogonal s Θ(n2) [RT 83] Θ(n) [GGT 93] Ω(n) Ο(n log n) [CDP 92] Θ(n log log n) [GGT 93] Θ(n) [L80, V91] Θ(n log n) [BK 80] Open Problem: determine the area requirement of planar upward straightline drawings of treesGraphDrawing 24 Size of Planar Drawings of Binary Trees s s the size of a drawing is the maximum... TreesGraphDrawing 15 Drawings of Rooted Trees s s s s the usual drawings of rooted trees are planar, straight-line, and upward (parents above children) it is desirable to minimize the area and to display symmetries and isomorphic subtrees level drawing: nodes at the same distance from the root are horizontally aligned level drawings may require Ω(n2) area GraphDrawing 16 A Simple Level Drawing Algorithm... drawing in a prescribed region GraphDrawing 29 Area of Tip-Over and Inclusion Drawings s s s s Eades, Lin and Lin (1992) study of the area requirement of tip-over and inclusion drawings of rooted trees The dimensions of the node labels are given as part of the input Minimizing the area of the drawing is: s NP-hard for general trees s computable in polynomial time for balanced trees with a dynamic programming... problems: s minimizing the perimeter of the drawing s minimizing the width for a given height s minimizing the height for a given width GraphDrawing 30 How to Draw Free Trees s s Free trees are connected graphs without cycles and do not represent hierarchical relationships (e.g., spanning trees) Level drawings of rooted trees yield radial drawings of free trees: s root the free tree T at its center... prescribed region GraphDrawing 28 Inclusion Drawings of Rooted Trees s Inclusion drawings display the parentchild relationship by the inclusion between isothetic rectangles air reservations international Europe domestic Australia Western USA Canada Eastern s s s Closely related to tip-over drawings Used for displaying compound graphs (e.g., the union of a graph and a tree) Allow to better fit the drawing in . vertex degree. ρ ≤ 2π d -- -- - - Graph Drawing 8 Aesthetic Criteria ■ some drawings are better than others in conveying information on the graph ■ aesthetic criteria. Computational Geometry Graph Drawing 15 Trees Graph Drawing 16 Drawings of Rooted Trees ■ the usual drawings of rooted trees are planar, straight-line, and upward