Rahnuma Islam Nishat Debajyoti Mondal Md. Saidur Rahman Graph Drawing and Information Visualization...
-
Upload
blake-presswood -
Category
Documents
-
view
215 -
download
0
Transcript of Rahnuma Islam Nishat Debajyoti Mondal Md. Saidur Rahman Graph Drawing and Information Visualization...
Rahnuma Islam NishatDebajyoti Mondal
Md. Saidur Rahman
Graph Drawing and Information Visualization LaboratoryDepartment of Computer Science and Engineering
Bangladesh University of Engineering and Technology (BUET)Dhaka-1000, Bangladesh
Point-Set Embeddings of Plane 3-Trees
a
b i
hf
e
d
cg
g
a
c
b
ih
ef
d
Point-Set Embedding
A Plane Graph G A Point-Set SPoint-Set Embedding of G
GD 2010, Konstanz, Germany September 24, 2010
Vertices are mapped to points, edges are drawn as straight-line segments
a
b
c
d
e
f
Point-Set Embedding
A triangle with 2 points
No triangle with 2 points
a
b cd
a
b c
d
d
a
b c
There exists no embedding of this graph on this point set
GD 2010, Konstanz, Germany September 24, 2010
Previous Results
Graph Class Results
Bose et al. [1995] Trees
Gritzmann et. al. [1991] Outerplanar Graphs O(n 2)
O(n log n)
P. Bose [2002] Outerplanar Graphs O(n log3 n)
S. Cabello [2006] General Planar Graphs,2-Outerplanar Graphs
NP-Complete
Garcia et al. [2009] 3-connected cubic plane graphs
Ikebe et al. [1994]
Necessary and Sufficient Condition
Trees O(n2)
GD 2010, Konstanz, Germany September 24, 2010
Our Results
Problems Results
Plane 3-Tree of n vertices,
point set of n points O(n2 log n)
Lower bound O(n log n)
Plane 3-Tree of n vertices,
point set of k points where k > n. nk8
GD 2010, Konstanz, Germany September 24, 2010
a
b
c
d
e
f
A triangulated plane graph
Plane 3-Trees
a
b
c
Base case : a triangle
d
a
b
c
Insert vertex d
a
b
c
d
e
Insert vertex e
Insert vertex f
GD 2010, Konstanz, Germany September 24, 2010
Representative Vertex of a Plane 3-TreePlane 3-Tree Plane 3-Tree
Plane 3-Tree
Representative Vertex
a
b
c
d
e
f
In a Plane 3-Tree there is an unique inner vertex which is the neighbor of all the three outer vertices
b
ce
d
a
d
b f
d
c
a
GD 2010, Konstanz, Germany September 24, 2010
Outline of Algorithma
b
c
d
e
If G has a point-set embedding on S thenthe convex hull of S has exactly 3 points of S
Convex Hull
fgh
A Plane 3-Tree G A Point-Set S
GD 2010, Konstanz, Germany September 24, 2010
Outline of Algorithm
b
c
d
e
A Plane 3-Tree G A Point-Set S
a
fgh
c
a
b
GD 2010, Konstanz, Germany September 24, 2010
Outline of Algorithm
b
c
d
e
a c
b
a
3C2 = 6 ways to map the outer vertices of G
to the 3 points on the convex hull of S
fgh
A Plane 3-Tree G A Point-Set S
GD 2010, Konstanz, Germany September 24, 2010
d
Outline of Algorithm
b
c
d
e
a a
c
b
n1=1
n2=1
n3=2 0
3
1
The number of points in each of the three regionscan be counted in O(n) time.
fgh
Map the Representative Vertex Valid mapping??
GD 2010, Konstanz, Germany September 24, 2010
Outline of Algorithm
b
c
d
e
a a
c
bd
1
1
2
The mapping of the representative vertex is unique Finding a valid mapping of the representative vertex takes O(n2) time.
fgh
Map the Representative Vertex
n1=1
n2=1
n3=2
GD 2010, Konstanz, Germany September 24, 2010
Outline of Algorithm
b
c
d
e
a a
c
bd
fgh
e
hf
g
The mapping of the other vertices are obtained recursively The algorithm computes the embedding of G in O(n3) time.
Map the other vertices Recursively
GD 2010, Konstanz, Germany September 24, 2010
Outline of Algorithm
b
c
d
e
a a
c
bd
fgh
e
hf
g
The mapping of the other vertices are obtained recursively The algorithm computes the embedding of G in O(n3) time.
Map the other vertices Recursively
How to reduce the time complexity ??
GD 2010, Konstanz, Germany September 24, 2010
Mapping of the representative vertex takes O(n2) time
O(n log n) time
O(n3) O(n2 log n)
GD 2010, Konstanz, Germany September 24, 2010
Our Idea
We formulate a set of linear equations to obtain the unique mapping of the representative vertex
in O(n log n) time
GD 2010, Konstanz, Germany September 24, 2010
Our Idea
u1
a
b
u2
u3
u4
u5
u1
u2
u5
u3u4
u5 u2 u4 u3 u1
1 2 3 4 5Ab
c
Sort the points according to their slopes
We use this array Ab to find the number of points above or
below the slope of a point
GD 2010, Konstanz, Germany September 24, 2010
Our Idea
Sort the points according to their slopes
u1
a
c
b
u2
u3
u4
u5
u1u2 u3
u4,u5
u4 u5 u2 u1 u3
1(1) 2 3 4 5Aa
We use this array Aa to find the number of points on the left or on the right of the slope of a point
GD 2010, Konstanz, Germany September 24, 2010
Our Idea
u1
a
bu2
u3
u4
u5
u1
u5
u3
u2,u4u3 u1 u2 u4 u5
1 2 3(1) 4 5Ac
c
Sort the points according to their slopes
We use this array Ac to find the number of points above or
below the slope of a point
GD 2010, Konstanz, Germany September 24, 2010
Counting Number of Points
u1
a
bu2
u3
u4
u5
c
GD 2010, Konstanz, Germany September 24, 2010
Counting Number of Points
u1
a
bu2
u3
u4
u5
c
The interior of the convex hull is divided into 9 disjoint regions
Identify the disjoint regions
x5
x3x4
x6
x2
x9
x7
x8
x1
GD 2010, Konstanz, Germany September 24, 2010
Counting Number of Points
x5
a
b
x3x4
x6
x2
c
x1+x7+x6 = n1
x2+x8+x3 = n2
x4+x9+x5 = n3
x9
x7
x8
x1 u2 = db
c
d
e
a
fgh
n1=1
n2=1
n3=2
Formulate 3 constraints
GD 2010, Konstanz, Germany September 24, 2010
Counting Number of Points
Formulate 9 linear equations
x5
a
x3x4
x6
x2
c
x9
x7
x8
x1 u2 = d
x2+x1+x7+x6 = 2x5+x9+x4+x3 = 2
x8 = 0
u4 u5 u2 u1 u3
1(1) 2 3 4 5Aa
b
GD 2010, Konstanz, Germany September 24, 2010
u5 u2 u4 u3 u1
1 2 3 4 5Ab
Set of Linear Equations
Formulate 9 linear equations
x5
a
x3x4
x6
x2
c
x9
x7
x8
x1 u2 = d
x2+x8+x3+x4 = 1x1+x7+x6+x5 = 3
x9 = 0
b
GD 2010, Konstanz, Germany September 24, 2010
Ac
Set of Linear Equations
Formulate 9 linear equations
x5
a
x3x4
x6
x2
c
x9
x7
x8
x1 u2 = d
x6+x5+x9+x4 = 2x1+x2+x8+x3 = 1
x7 = 1
b
u3 u1 u2 u4 u5
1 2 3(1) 4 5
GD 2010, Konstanz, Germany September 24, 2010
Set of Linear Equations
All the linear equations are given belowLinear Equations :
x2+x1+x7+x6 = 2x2+x8+x3+x4 = 1 x6+x5+x9+x4
= 2x5+x9+x4+x3 = 2x1+x7+x6+x5 = 3 x1+x2+x8+x3
= 1x8 = 0 x9 = 0 x7 =
1
Constraints :x1+x7+x6 = n1
x2+x8+x3 = n2
x4+x9+x5 = n3Solving these linear equations we find whether
this is a valid mapping in O(1) time
GD 2010, Konstanz, Germany September 24, 2010
Complexity Analysis
Given the slope lists,a representative vertex can be found in O(n) time
Slope lists can be constructed for each representative vertex in O(n log n) time, which we use recursively to find
subsequent representative vertices
Complexity at each step is O(n log n+ n) =O(n log n)
Total complexity for n steps is = O(n) x O(n log n) =O(n2 log n)
This time complexity can be further improved to O(n2) if the points are in general position
GD 2010, Konstanz, Germany September 24, 2010
Lower Bound
SORTING: A list of unsorted integers X=x1, x2, x3, … , xn, |X| = n
A set of n+2 points
S = (x1, x12), (x2, x2
2), (x3, x32),…, (xn, xn
2), (0,0), (xmax,0)
POINT-SET EMBEDDING
A plane 3-tree G with exactly one inner vertex of degree threesuch that deletion of the outer vertices gives a path of n-1 vertices
GD 2010, Konstanz, Germany September 24, 2010
Lower Bound : Example
A set of 4+2=6 points
S = (5, 52), (2, 22), (3, 32),(9, 92), (0,0), (xmax=9,0)
Let the list of unsorted integers be 5, 2, 3, 9 where n = 4
(2, 22)
(3, 32)
(5, 52)
(0,0) (9,0)
(9, 92)
GD 2010, Konstanz, Germany September 24, 2010
Lower Bound : Example
G
Exactly one inner vertex of degree three
a
b
c
d
ef
S
(2, 22)
(3, 32)
(5, 52)
(0,0) (9,0)
(9, 92)
A plane 3-tree G with exactly one inner vertex of degree three
GD 2010, Konstanz, Germany September 24, 2010
Lower Bound : Example
A path of n-1=3 vertices
a c
d
ef
b
G S
(2, 22)
(3, 32)
(5, 52)
(0,0) (9,0)
(9, 92)
A plane 3-tree G with exactly one inner vertex of degree three
Deletion of the outer vertices gives a path of n-1 = 3 vertices
GD 2010, Konstanz, Germany September 24, 2010
Lower Bound : Example
G a
b
c
d
ef
S
(2, 22)
(3, 32)
(5, 52)
(0,0) (9,0)
(9, 92)
We can show that from the point-set embedding of G we can find a sorted order of the points
G always has an embedding on S
GD 2010, Konstanz, Germany September 24, 2010
Lower Bound : Example
G a
b
c
d
ef
S
(2, 22)
(3, 32)
(5, 52)
(0,0) (9,0)
(9, 92)
convex-hull of S contains (xmax=9, 92), (xmax=9,0), (0,0)
Find the convex hull of S
GD 2010, Konstanz, Germany September 24, 2010
ca
b
Lower Bound : Example
a
b
c
d
ef
We show two mapping of the outer vertices a, b, c
Map the outer vertices of G
a
b
c
GD 2010, Konstanz, Germany September 24, 2010
ca
b
Lower Bound : Example
a
b
c
d
ef
Map the representative vertex d
a
b
ca
ab
bc
c
0
0
2
dd
GD 2010, Konstanz, Germany September 24, 2010
ca
b
Lower Bound : Example
a
b
c
d
ef
Map the representative vertex d
a
b
ca
ab
bc
c
0
0
2
d
d
Representative vertex d can be mapped to the point with second smallest x-coordinate or second largest x-coordinate
GD 2010, Konstanz, Germany September 24, 2010
ca
b
Lower Bound : Example
a
b
c
d
ef
Map the other vertices recursively
a
b
ca
ab
bc
c
d
d
ee
f
f
GD 2010, Konstanz, Germany September 24, 2010
ca
b
Lower Bound : Example
a
b
c
d
ef
a
b
ca
ab
bc
c
d
d
ee
f
f
The order in which the inner vertices are mappedgives the sorted order of the numbers
ascending descending
GD 2010, Konstanz, Germany September 24, 2010
Lower Bound
Since the lower bound of Sorting Problem is Ω(n log n)
The Lower Bound of Point-Set Embedding = Ω(n log n)
GD 2010, Konstanz, Germany September 24, 2010
What if |S| > n ?
b
c
d
e
a
fgh
A Plane 3-Tree G A Point-Set S
n = 8 |S| = k = 20
The number of points in S is greater than the number of vertices of GGD 2010, Konstanz, Germany September 24, 2010
Representative Tree
b
c
a
A Plane 3-Tree G
If n=3 in G then T is a null tree
Representative Tree T
Base Case : n=3
GD 2010, Konstanz, Germany September 24, 2010
Representative Tree
b
a
A Plane 3-Tree G
If n=4 in G then T has only one node with three dummy vertices
Representative Tree T
n=4
d
c
d
b
c
a
GD 2010, Konstanz, Germany September 24, 2010
b
a
d
c
b d
e
Representative Tree
a
A Plane 3-Tree G Representative Tree T
Add other nodes to T recursively
c
d
e
GD 2010, Konstanz, Germany September 24, 2010
b d
e
a
c
b d
e
Representative Tree
a
A Plane 3-Tree G Representative Tree T
Add other nodes to T recursively
c
d
e
ff
GD 2010, Konstanz, Germany September 24, 2010
d
e
a
c
f
b d
e
Representative Tree
a
A Plane 3-Tree G Representative Tree T
Add other nodes to T recursively
c
d
e
fg
fg
GD 2010, Konstanz, Germany September 24, 2010
b d
e
a
c
fg
b d
e
Representative Tree
a
A Plane 3-Tree G Representative Tree T
Add other nodes to T recursively
c
d
e
fg
fg
h h
T is an unique ternary tree whose internal nodes are the n-3 inner vertices of G and leaves are dummy nodes
GD 2010, Konstanz, Germany September 24, 2010
Our Algorithm
b
c
d
e
a
fgh
A Plane 3-Tree G A Point-Set S
Take projection of the points of S on X and Y axis
GD 2010, Konstanz, Germany September 24, 2010
Our Algorithm
b
c
d
e
a
fgh
A Plane 3-Tree G A Point-Set S
Map the outer vertices to any 3 points of S
a
c
b
GD 2010, Konstanz, Germany September 24, 2010
Our Algorithm
Representative tree T of G A Point-Set S
Map the root d of T to a point inside abca
c
bd(5)
e(1)
f(2)g(1)
h(1)
d
GD 2010, Konstanz, Germany September 24, 2010
Subproblems
Representative tree T of G A Point-Set S
Map the root d of T to a point inside abca
c
bd(5)
e(1)
f(2)g(1)
h(1)
d
The mapping of d along with the outer vertices divide the problem into three subproblems
GD 2010, Konstanz, Germany September 24, 2010
RecursionSolve the subproblems recursively for each mapping of d
a
c
b df(2)
g(1)
a
c
d
GD 2010, Konstanz, Germany September 24, 2010
RecursionSolve the subproblems recursively for each mapping of d
a
c
b df(2)
g(1)
a
c
d
f
No point for g
GD 2010, Konstanz, Germany September 24, 2010
RecursionSolve the subproblems recursively for each mapping of d
a
c
b df(2)
g(1)
a
c
dfalse
GD 2010, Konstanz, Germany September 24, 2010
RecursionSolve the subproblems recursively for each mapping of d
a
c
b da
c
d
a
b db d
cfalse
GD 2010, Konstanz, Germany September 24, 2010
RecursionSolve the subproblems recursively for each mapping of d
a
c
b da
c
d
a
b d
b d
c
d(5)
e(1)
f(2)g(1)
h(1)
false
GD 2010, Konstanz, Germany September 24, 2010
RecursionSolve the subproblems recursively for each mapping of d
a
c
d
a
b d
b d
c
d(5)
e(1)
f(2)g(1)
h(1)h
e
false
GD 2010, Konstanz, Germany September 24, 2010
Combine the SolutionsCombine the solutions of the subproblems
a
c
d
a
b d
b d
c
false
h
e
a
c
b d
h
e
false
GD 2010, Konstanz, Germany September 24, 2010
Overlapping Subproblems
a
c
b d
h
e
false
Store the results of the Subproblemsa
c
b
d
h
e
false
The results of the subproblems can be reused in overlapping cases
GD 2010, Konstanz, Germany September 24, 2010
Complexity Analysis
Total time to compute a point set embedding (if one exists)is O(nk8)
GD 2010, Konstanz, Germany September 24, 2010
Thank You