Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs
description
Transcript of Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs
![Page 1: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/1.jpg)
Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar
Graphs
M. K. HasanSung-eui Yoon
Kyung-Yong Chwa
KAIST, Republic of Korea
![Page 2: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/2.jpg)
Image Rendering
![Page 3: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/3.jpg)
Image Rendering
![Page 4: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/4.jpg)
Image Rendering
![Page 5: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/5.jpg)
Image Rendering
![Page 6: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/6.jpg)
Image Rendering
![Page 7: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/7.jpg)
Two Level I/O Memory Model
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacity
![Page 8: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/8.jpg)
Memory Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacity
a b c d e f gh
…
![Page 9: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/9.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacity
Not AvailableIn Cache
h a b c d e f g …
![Page 10: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/10.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 1
h a b c d e f g …a b c
![Page 11: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/11.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 1
h
a b c
d e f g …
Hit !
a b c
![Page 12: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/12.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 1
h
a b c
d e f g …
Hit !
a b c
![Page 13: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/13.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 1
h
a b c
d e f g …
Not AvailableIn Cache
a b c
![Page 14: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/14.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 2
h
a b c
d e f g …a b c d e f
![Page 15: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/15.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 2
h
a b c
d e f g …a b c
d e f
![Page 16: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/16.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 2
h
a b c
d e f g …a b c
d e fHit !
![Page 17: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/17.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 2
h
a b c
d e f g …a b c
d e fHit !
![Page 18: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/18.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 2
h
a b c
d e f g …a b c
d e f
Not AvailableIn Cache
![Page 19: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/19.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 3
h
a b c
d e f g …a b c
d e f
hg …
![Page 20: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/20.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 3
h d e f g …a b c
d e fhg …
![Page 21: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/21.jpg)
Performance of the Layout
a
c
d
b
f
e
g
h
2-block cache
Memory with infinite capacityNumber of misses: 3
h d e f g …a b c
d e fhg …Hit !
![Page 22: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/22.jpg)
Example of a “Bad Layout”
a
c
d
b
f
e
g
h a h g c b f d e …
2-block cache
Memory with infinite capacityNumber of misses = 4
![Page 23: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/23.jpg)
Cache Parameters
• In reality we do not know the block size and cache size
• In the Cache-Oblivious environment our objective is to develop efficient algorithm and/or layout without knowing the cache parameters
• Reducing the number of cache misses is the only goal. It does not matter how bad the algorithm is (in terms of complexity) as long as it is polynomial.
![Page 24: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/24.jpg)
Cache-Oblivious Mesh Layout
• Optimization problem: Find the layout of a mesh which minimizes the number of cache misses for a set of applications:
– Rendering – Collision Detection – Ray Tracing
![Page 25: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/25.jpg)
We Need a Metric
• Given a layout
– We want to know the number of cache misses for a particular class of applications
– How can we get that if we do not know the cache parameters (cache size, block size)?
– We need a metric which reflects the expected number of cache misses for the application class
– The metric must be related to the layout and must not be dependent on the cache parameters
Cache-Obliviousness
![Page 26: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/26.jpg)
Efficient Layout
• Suppose we have chosen a metric which reflects the expected number of cache misses for our target application.
• Now, our objective is to develop a layout of the input mesh such that the metric value is minimized
![Page 27: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/27.jpg)
Related Work : Derivation of Metrics [Yoon and Lindstrom(2006)]
• Consider two types of block size progressions– 1, 2, 3, …– 20, 21, 22, …
• The second one is more reasonable choice, e.g., 32 and 128 bytes for L1 and L2 caches and 4KB for the virtual page
• Based on these progressions we find two metrics
– Arithmetic mean of edge spans:
– Logarithm of geometric mean of edge spans:
a
c
bd
da cb
Ajiija l
AM
),(||
1
5||,3,2,1 Alllll adbdcdbcab
||
1
),(
logA
Ajiijg lM
Mesh Layout
![Page 28: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/28.jpg)
Related Work : Comparison of Two Metrics
[Yoon and Lindstrom(2006)]
![Page 29: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/29.jpg)
Related Work :Multi-level Construction Algorithm
[Yoon and Lindstrom(2006)]
Algorithm:• Partition the input graph using
graph partitioning tool.
• Make the layout of each small component using Mg metric
• Marge the layout of each component to get the layout of the whole graph
Average query times for collision detection between the Lucy model and Dragon Model
Result:• Experimental results show nice
performance of multi-level construction algorithm
• However there is no theoretical bound for the performance and the complexity of the algorithm
![Page 30: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/30.jpg)
Our Contribution
• We have given an algorithm which gives a layout for bounded-degree planar graph such that the Mg value of the layout is within a constant factor of the Mg value of the optimal layout (optimal in terms of Mg value).
• Our algorithm is simple and easy to implement. The time complexity of our algorithm is O(nⅹlog2n)
![Page 31: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/31.jpg)
Separator Theorem For Planar Graphs [Lipton and
Tarjan(1979)]
BA
|C| 2ⅹ21/2ⅹn1/2
No edge between A and B
|A|≤2ⅹn/3 |B|≤2ⅹn/3C
Planar Graph with n vertices
![Page 32: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/32.jpg)
Algorithm: Given Bounded-Degree Planar Graph G
with n (a power of 2 ) Vertices
G
![Page 33: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/33.jpg)
Algorithm: Split G Into Three Parts A, B and C
BA
C
|C|=O(n1/2)
|B|≤n/2|A|≤n/2
Number of external edges = O(n1/2)Number of internal edges = O(n1/2)
No edge between A and B
![Page 34: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/34.jpg)
Algorithm: Split C into C1 and C2
BA
C1
|A|+|C1|=n/2
C2
|B|+|C2|=n/2
Each edge is either
an external or an internal edge crossing
Number of crossing edges = O(n1/2)
![Page 35: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/35.jpg)
Algorithm: Combine A,C1 and B,C2
|A|+|C1|=n/2 |B|+|C2|=n/2
BA
C1 C2
![Page 36: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/36.jpg)
Algorithm: Recurse on A ’ and B ’
Make Layout of A ’ with 1…n/2 and B ’ with n/2+1…n recursively
A ’ = A∪C1 B ’ = B∪C2
1 2 3 4 5 6 7 8
![Page 37: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/37.jpg)
Cost of The Split of a n Vertices Bounded Degree Planar Graph
Layout with values [1…n./2]
A ’ = A∪C1 B ’ = B∪C2
Number of crossing edges = O(n1/2)
Cost of crossing edges = O(n1/2 log n)
Aji
ijg lA
M),(
)log(||
1Cost
Layout with values [n/2…n]
i j
nijlij log|)log(|)log( i j
1i nj
![Page 38: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/38.jpg)
Bounding MG Value
……………………………………
l=0
l=1........
lll
l
nncCost
2log
22
2
1
…………………………
l
lCost Cost
Number of subgraphs
Number of crossing edges
Cost of each crossing edge
Aji
ijg lA
M),(
)log(||
1
l
nl
2 is levelat subgraph each of Size
)1(),(|| Assuming OMnA g
)(nO
![Page 39: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/39.jpg)
Results Summary• Value of Mg metric of the layout generated by the recursive
algorithm is O(1), where,
• Lower bound of Mg of any layout is Ω (1) under suitable assumptions
• The recursive algorithm gives a constant approximation factor for Mg
• The upper bound of Mg value for any layout is O (log n)
• The time complexity of our algorithm is O(nⅹlog2n)
Ajiij
A
Ajiijg l
AlM
),(
||
1
),(
)log(||
1log
![Page 40: Bounds on the Geometric Mean of Arc Lengths for Bounded-Degree Planar Graphs](https://reader035.fdocuments.net/reader035/viewer/2022062410/56815294550346895dc0ba43/html5/thumbnails/40.jpg)
Future Works
• We can extend the algorithm to handle three dimensional mesh
• For applications like streaming
mesh and mesh smoothing, we can develop good metrics and cache-oblivious layouts based on those metrics