1 of 21

On Balloon Drawings of Rooted Trees

Chun-Cheng Lin and Hsu-Chun Yen

Dept. of Electrical Engineering,

National Taiwan University

2 of 21

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.

2

3 of 21

Two models of balloon drawing (I)

  • The fractal model – top-down method

( Koike & Yoshihara, 1993 )

    • Displaying self-similarly

    • Evenly angle degree

    • Edge length formula
      • rm = γ × rm-1

3

120o

120o

120o

r1

r2

r3

4 of 21

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

4

inner circle

outer circle

r1

r2

r4

r3

θ1

r

5 of 21

Comparison

  • 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.

5

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 SNS model

the fractal model

A. Angular resolution and aspect ratio of angle.

Goal: optimize them.

6 of 21

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: ( 0o, 360o )

⇒ 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

6

αmin

αmax

AngResl =αmin

AspRatio = αmax / αmin

7 of 21

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.

7

M1

M2

m1

m2

The balloon drawing

under the SNS model

(for the level zero)

(for the nozero level)

8 of 21

Balloon Drawing of Unordered Trees

  • Changing the order of subtrees affects the angular resolution as well as the aspect ratio of the drawing.
  • Example.

8

Larger AngResl and smaller AspRatio.

swap M2 and m2

M1

M2

m1

m2

αmin

αmax

M1

M2

m1

m2

αmin

αmax

9 of 21

Independence

9

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 of 21

10

slice 1

δ1

c2

co

θ 1

δ1

θ 2

θ 3

θ 4

c1

c4

c3

slice 4

slice 3

slice 2

11 of 21

  • Procedure 1 OptBalloonDrawing
    • Order {θ1,…,θn} in ascending order as

either m1, m2, …, mk-1, mk, Mk, Mk-1, …, M2, M1 if n is even,

or m1, m2, …, mk-1, mk, mid, Mk, Mk-1, …, M2, M1 if n is odd,

where mi (resp. Mi) 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: σ = (M1, m2, M3, m4, … (, mid) …, M4, m3, M2, m1)

e.g. (n = 10) (the drawing has 10 slices)

{θ1,…,θ10}m1 < m2 < m3 < m4 < m5 < M5 < M4 < M3 < M2 < M1

11

M1

M3

m2

M2

m3

m1

M5

m4

m5

M4

Subindex difference = 1

12 of 21

  • 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 (Mi + mi-1)/2 for some i ∈ {2,…,k}, which can be generated by Procedure 1.

    • Similarly, the minimum of the largest angle must be

(Mj-1 + mj)/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

12

13 of 21

An experimental result

13

14 of 21

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

14

(of even angle type)

(of uneven angle type)

15 of 21

The Aspect Ratio (resp. Angular resolution) problem

  • 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 AspRatior (resp. AngReslr).

15

slice 2

slice 5

slice 4

slice 3

slice 1

16 of 21

Matching

  • 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.

16

Perfect!!

17 of 21

  • Theorem. Both the Aspect Ratio Problem and the Angular Resolution Problem can be solved in O(n2.5) time.

pf. Consider the Aspect Ratio Problem ; the other problem can be proved by a slight modification.

17

A1

A2

A3

A4

A1

A2

A3

A4

18 of 21

  • Algorithm.
    • Iteratively selects an pair (x,y) where x ∈ {bi, bi} and y ∈ {bi ⊕1, bi ⊕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:

18

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 ϕ

b4

b’4

b1

b’1

19 of 21

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

19

20 of 21

Experimental results and applications

  • Experimental results

  • Applications

20

21 of 21

Thank you for your attention.