Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S....

20
Using Graph Parsing for Automatic Graph Drawing Carolyn . McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cyberne tics-part A: systems and humans, 1998. 元元元元元 元元元元元 元元元 2000/9/29

Transcript of Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S....

Page 1: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Using Graph Parsing for Automatic Graph Drawing

Carolyn . McCreary, Richard O. Chapman, and F.-S. Shieh

IEEE transactions on systems, man, and cybernetics-part A: systems and humans, 1998.

元智資工所 系統實驗室 楊錫謦

2000/9/29

Page 2: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Outline Introduction Algorithm Overview Graph Parsing Node Layout Conclusion

Page 3: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Introduction Drawing digraphs by hand can be tedious

and time consuming. The standard approach has 3 steps:

assign node to layers reorder the nodes in each layer adjust the position of the nodes

Clan-based Graph Drawing Tool (CG) uses unique clan-based graph decomposition to produce a parse tree.

Page 4: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Algorithm Overview The algorithm consists of several steps:

create a parse tree compute the dimensions of a bounding box determine long edges and add dummy nodes recompute bounding box dimensions determine actual node locations draw the graph

What is clan?

Page 5: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Graph Parsing Nodes with the same parents may be the sources

of the clans(Siblings) and nodes with the same children may be the sinks of clans(Mates).

The algorithm consists of three parts: the preprocessing section the clan recognition section (decomposion) the parse tree construction section

Page 6: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Preprocessing section to carry out a transitive reduction of the input dag

- minimal graph precompute

P(x) – sets of parents C(x) – sets of children A(x) – sets of ancestors D(x) – sets of descendants S – sets of siblings M – sets of mates

Page 7: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Clan Recognition section They pairs each sibling set with each mate set to

determine if the pair forms the sources and sinks of a clan.

define F*(S) = F(S) ∪ S potential clan: F = D*(Si) ∩ A*(Mj)

Page 8: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Clan Recognition section(Cont.)

If F contains more than one element then

1. For each connected component Fk of F with source Sk and sink Mk check for illegal entry or illegal exit

2. Place each connected component with more than one element on candidate list

3. If F has more than one legal connected component thenLabel the union as Independent and place on candidate lis

t4. For each candidate F do

a. Remove F from candidate list

Page 9: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Clan Recognition section(Cont.)

b. For each Fi on clan list

If F=Fi then

if F is labeled then Fi is given the label of F

exit

Else if F ∩ Fi ≠ 空集合 and 互不為子集合 then

delete Fi from clan list; F=F F∪ i; label F as linear

c. Place F on clan list

d. If F is not labeled, label F as primitive

Page 10: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Clan Recognition section(Cont.)

Primitive clans are augmented with edges until series or parallel subgraphs can be identified.

Page 11: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Clan Recognition section(Cont.)

Page 12: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Clan Recognition section(Cont.)

Page 13: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Parse Tree Construction section

The parse tree is built by comparing clan size and using set inclusion.

Page 14: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Node Layout A bounding box, associated with each node of the

parse tree, specifies the allotted area for a subgraph.

Page 15: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Node Layout(Cont.) Before parsing, a long transitive edge (x, y) is

replaced by a dummy node z and edge (x, z) and (z, y).

Page 16: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Node Layout(Cont.) Reducing lengths of unnecessarily long edges Routing long edges

Page 17: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Node Layout(Cont.)

Page 18: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Conclusion CG’s drawings are unique in several ways:

attribute grammar The layout is balanced both vertically and

horizontally. Nodes within a clan are placed close to each

other. Nodes are grouped according to a 2D affinity. The users can contract a clan into a single node

and later expand it.

Page 19: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Pictures of constraction

Page 20: Using Graph Parsing for Automatic Graph Drawing Carolyn. McCreary, Richard O. Chapman, and F.-S. Shieh IEEE transactions on systems, man, and cybernetics-part.

Pictures of comparison