1 On Balloon Drawings of Rooted Trees Chun-Cheng Lin and Hsu-Chun Yen Dept. of Electrical Engineering, National Taiwan University.

Slides:



Advertisements
Similar presentations
Trees Chapter 11.
Advertisements

Covers, Dominations, Independent Sets and Matchings AmirHossein Bayegan Amirkabir University of Technology.
Bipartite Matching, Extremal Problems, Matrix Tree Theorem.
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
CSC 421: Algorithm Design & Analysis
Greedy Algorithms Greed is good. (Some of the time)
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
Divide and Conquer: Rooted Trees. 2 Introduction Rooted trees: acyclic graphs (no cycles) all edges directed away from root. downward planar drawing (child.
Dynamic Programming Dynamic Programming is a general algorithm design technique for solving problems defined by recurrences with overlapping subproblems.
Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
A New Force-Directed Graph Drawing Method Based on Edge- Edge Repulsion Chun-Cheng Lin and Hsu-Chen Yen Department of Electrical Engineering, National.
Efficient Generation of Minimal Graphs Using Independent Path Analysis Linda S. Humphrey 20 November 2006 Department of Computer Science and Engineering.
1 Balloon Views of Source Code and Their Multiscalable Font Modes Chun-Cheng Lin and Hsu-Chun Yen Dept. of Electrical Engineering, National Taiwan University.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
Drawing Graphs with Nonuniform Nodes Using Potential Fields Jen-Hui Chuang 1, Chun-Cheng Lin 2, Hsu-Chun Yen 2 1 Dept. of Computer and Information Science,
Matchings Matching: A matching in a graph G is a set of non-loop edges with no shared endpoints.
Matchings Matching: A matching in a graph G is a set of non-loop edges with no shared endpoints Maximal Matching: A maximal matching in a graph is a matching.
Coloring Algorithms and Networks. Coloring2 Graph coloring Vertex coloring: –Function f: V  C, such that for all {v,w}  E: f(v)  f(w) Chromatic number.
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
Randomness in Computation and Communication Part 1: Randomized algorithms Lap Chi Lau CSE CUHK.
Homework solution Problem 2. The number of odd degree vertices in a graph is even. (recom. book: G. Harary: Graph Theory) Solution: Let G=(V,E,w) S= 
GRAPH Learning Outcomes Students should be able to:
Hungarian Algorithm Vida Movahedi Elderlab, York University June 2007.
On Balanced + -Contact Representations Stephane Durocher & Debajyoti Mondal University of Manitoba.
Design Techniques for Approximation Algorithms and Approximation Classes.
CSCE350 Algorithms and Data Structure Lecture 17 Jianjun Hu Department of Computer Science and Engineering University of South Carolina
Trees and Distance. 2.1 Basic properties Acyclic : a graph with no cycle Forest : acyclic graph Tree : connected acyclic graph Leaf : a vertex of degree.
Edge-disjoint induced subgraphs with given minimum degree Raphael Yuster 2012.
Approximation Algorithms
 Rooted tree and binary tree  Theorem 5.19: A full binary tree with t leaves contains i=t-1 internal vertices.
Memory Allocation of Multi programming using Permutation Graph By Bhavani Duggineni.
Data Structures & Algorithms Graphs
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
1/24 Introduction to Graphs. 2/24 Graph Definition Graph : consists of vertices and edges. Each edge must start and end at a vertex. Graph G = (V, E)
Bipartite Matching. Unweighted Bipartite Matching.
Matching Algorithms and Networks. Algorithms and Networks: Matching2 This lecture Matching: problem statement and applications Bipartite matching Matching.
Chapter 8 Maximum Flows: Additional Topics All-Pairs Minimum Value Cut Problem  Given an undirected network G, find minimum value cut for all.
© The McGraw-Hill Companies, Inc., Chapter 12 On-Line Algorithms.
Introduction to Graph Theory
11 -1 Chapter 12 On-Line Algorithms On-Line Algorithms On-line algorithms are used to solve on-line problems. The disk scheduling problem The requests.
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
Proof of correctness of Dijkstra’s algorithm: Basically, we need to prove two claims. (1)Let S be the set of vertices for which the shortest path from.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Trees.
1 Minimum Routing Cost Tree Definition –For two nodes u and v on a tree, there is a path between them. –The sum of all edge weights on this path is called.
IOI/ACM ICPC Training 4 June 2005.
Lap Chi Lau we will only use slides 4 to 19
Topics in Algorithms Lap Chi Lau.
Source Code for Data Structures and Algorithm Analysis in C (Second Edition) – by Weiss
Algorithms and Networks
PC trees and Circular One Arrangements
COMP 6/4030 ALGORITHMS Prim’s Theorem 10/26/2000.
Chapter 5. Optimal Matchings
Enumerating Distances Using Spanners of Bounded Degree
Homework solution Problem 2. The number of odd degree vertices in a graph is even. (recom. book: G. Harary: Graph Theory) Solution: Let G=(V,E,w) S=vVdeg(v)
Coping With NP-Completeness
3.5 Minimum Cuts in Undirected Graphs
Vertex Covers, Matchings, and Independent Sets
Problem Solving 4.
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
Systems of distinct representations
5.4 T-joins and Postman Problems
Algorithms CSCI 235, Spring 2019 Lecture 19 Order Statistics
Coping With NP-Completeness
Vertex Covers and Matchings
Presentation transcript:

1 On Balloon Drawings of Rooted Trees Chun-Cheng Lin and Hsu-Chun Yen Dept. of Electrical Engineering, National Taiwan University

2 Balloon Drawing of Rooted Trees Definition. The balloon drawing of a rooted tree is a drawing having the following constraints: all the children of the same parent are placed on the circumference of the cycle centered at their parent, there exist no edge crossings in the drawing, and with respect to the root, the deeper an edge is, the shorter its drawing length becomes.

3 Two models of balloon drawing (I) The fractal model – top-down method ( Koike & Yoshihara, 1993 ) Displaying self-similarly Evenly angle degree Edge length formula r m =   r m o r1r1 r2r2 r3r3

4 Two models of balloon drawing (II) The subtree with nonuniform sizes (SNS) model – Bottom-up method ( Carriere & Kazman, 1995 ) Allow the subtrees with the same parent to reside in circles of different sizes inner circle outer circle r1r1 r2r2 r4r4 r3r3 11 r

5 Comparison Q. For an unordered rooted tree (i.e., changing the order of subtrees is allowed), what is a good balloon drawing under the SNS model depend on? The balloon drawings of the same ordered tree under different models are given: The drawing based on the SNS model results in a clearer display on large subtrees than that under the fractal model. the SNS model the fractal model A. Angular resolution and aspect ratio of angle.Goal: optimize them.

6 Preliminaries Unordered tree The order of subtrees is not significant. Angular resolution ( denoted by AngResl ) the minimum degree of two neighboring edges incident to the common vertex. Range: ( 0 o,  360 o )  Larger AngResl is better. Aspect ratio ( denoted by AspRatio ) the ratio of the maximum degree to the minimum degree of the angles incident to a vertex Range: ( 1,  )  Smaller AspRatio approaching to one gives a more balanced display α min α max AngResl =α min AspRatio = α max / α min

7 Reduction to star graphs Definition. The balloon drawing of a star graph with children of nonuniform size is a drawing in which circles associated with different children of the root do not overlap, and all the children of the root are placed on the circumference of a circle centered at the root. M1M1 M2M2 m1m1 m2m2 The balloon drawing under the SNS model (for the level zero)(for the nozero level)

8 Balloon Drawing of Unordered Trees Changing the order of subtrees affects the angular resolution as well as the aspect ratio of the drawing. Example. Larger AngResl and smaller AspRatio. swap M 2 and m 2 M1M1 M2M2 m1m1 m2m2  min  max M1M1 M2M2 m1m1 m2m2  min  max

9 Independence Optimizing AngResl and AspRatio on each level is Independent. Swapping any two subtrees inside the outer circle doesn’t affect the optimization on other levels.

10 slice 1 11 c2c2 coco  1 1 1’1’  2 2  3 3  4 4 c1c1 c4c4 c3c3 slice 4 slice 3 slice 2

11 Procedure 1 OptBalloonDrawing -Order {  1,…,  n } in ascending order as either m 1, m 2, …, m k-1, m k, M k, M k-1, …, M 2, M 1 if n is even, or m 1, m 2, …, m k-1, m k, mid, M k, M k-1, …, M 2, M 1 if n is odd, where m i (resp. M i ) is the i-th minimum (resp. maximum) among all, and mid is the median if n is odd. -Output a drawing witnessed by the following circular permutation:  = (M 1, m 2, M 3, m 4, … (, mid) …, M 4, m 3, M 2, m 1 ) e.g. (n = 10) (the drawing has 10 slices) {  1,…,  10 }  m 1 < m 2 < m 3 < m 4 < m 5 < M 5 < M 4 < M 3 < M 2 < M 1 M1M1 M3M3 m2m2 M2M2 m3m3 m1m1 M5M5 m4m4 m5m5 M4M4 Subindex difference = 1

12 Theorem. Procedure 1 achieves optimality in angular resolution as well as in aspect ratio for star graphs. Basic idea to prove the correctness of the algorithm: Claim. optAngResl must be (M i + m i-1 )/2 for some i  {2,…,k}, which can be generated by Procedure 1. Similarly, the minimum of the largest angle must be (M j-1 + m j )/2 for j  {2,…,k}, which can be generated by Procedure 1. Since the permutation , generated by Procedure 1, simultaneously has both the maximum degree of the smallest angle and the minimum degree of the largest angle of any drawing,  also witnesses the optAspRatio. Q.E.D

13 An experimental result

14 Balloon drawing with uneven angles Area of balloon drawing The size of the cycle enclosing the drawing The drawing under the SNS model may not be minimal (of even angle type) (of uneven angle type)

15 Given the initial drawing of a star graph (with uneven angles) and a real number r, determine how to flip the drawing of subtrees so that AspRatio  r (resp. AngResl  r). The Aspect Ratio (resp. Angular resolution ) problem slice 2 slice 5 slice 4 slice 3 slice 1

16 Matching A set of edges such that any two edges shares no common node. Maximum matching A matching of the maximum cardinality Perfect matching For a graph with n nodes, the largest possible matching consists of n/2 edges The maximum matching problem for bipartite graphs with n vertices and m edges can be found in time. Perfect!!

17 Theorem. Both the Aspect Ratio Problem and the Angular Resolution Problem can be solved in O(n 2.5 ) time. pf. Consider the Aspect Ratio Problem ; the other problem can be proved by a slight modification. A1A1 A2A2 A3A3 A4A4 A1A1 A2A2 A3A3 A4A4

18 Algorithm. Iteratively selects an pair (x,y) where x  {b i, b’ i } and y  {b i  1, b’ i  1 } such that x+y is assumed to be the ‘smallest’ angle. A bipartite graph G (x,y) is constructed in such a way that a drawing respecting the aspect ratio r exists iff G (x,y) has a perfect matching. Take the following example for illustration: Assume is the smallest angle. The nodes with odd index are placed on the upper level. A bipartite graph G (x,y) Perfect matching  a balloon drawing Delete the edges (s,t) where s + t > r  b4b4 b’ 4 b1b1 b’ 1

19 Local magnetic spring model Magnetic spring model (Sugiyama and Misue, 1995) The graph is placed on a global magnetic field Edge  magnetized spring Our local magnetic spring model

20 Experimental results and applications Experimental results Applications

21 Thank you for your attention.