slides by: arjun dasgupta binary planar partition lecture 2 advanced algorithms ii slides by: arjun...

5
Slides by: Arjun Dasgupta BINARY PLANAR PARTITION Lecture 2 Advanced Algorithms II Slides by: Arjun Dasgupta

Upload: florence-mccormick

Post on 13-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Slides by: Arjun Dasgupta BINARY PLANAR PARTITION Lecture 2 Advanced Algorithms II Slides by: Arjun Dasgupta

Slides by: Arjun Dasgupta

BINARY PLANAR PARTITION

Lecture 2Advanced Algorithms II Slides by: Arjun

Dasgupta

Page 2: Slides by: Arjun Dasgupta BINARY PLANAR PARTITION Lecture 2 Advanced Algorithms II Slides by: Arjun Dasgupta

Example 1

1

2

3

4

l1

l2l3

• Each oval node stores information about the infinite line li • The leaves denote the line segments being partitioned

Page 3: Slides by: Arjun Dasgupta BINARY PLANAR PARTITION Lecture 2 Advanced Algorithms II Slides by: Arjun Dasgupta

Example 2

1

2

3

4

l1

l2

l3 l4

l5

• Smallest Tree that can be created from the partitions is O(n)

Page 4: Slides by: Arjun Dasgupta BINARY PLANAR PARTITION Lecture 2 Advanced Algorithms II Slides by: Arjun Dasgupta

Auto-Partition Algorithm

Index(u , v) = # of cuts that u makes when extended to v

Algorithm:Input: S = {S1,S2, …. Sn}1.Generate a random permutation of S

U = {u1,u2,…..un}2.Start constructing the tree by using the segments in this order as partitioning lines

Upper Bound of the size of tree created by Auto-Partition -> O(n)

Page 5: Slides by: Arjun Dasgupta BINARY PLANAR PARTITION Lecture 2 Advanced Algorithms II Slides by: Arjun Dasgupta

Analysis

Our objective is to calculate ∑n

i=1∑nj≠i,j=1 Prob(i cuts j)

Now,∑n

j≠i Prob(i cuts j) ≤ (1/2 + 1/3 + …..)

≤ 2 ln nAnd, ∑n

i=1∑nj≠i,j=1 Prob(i cuts j) ≤ 2 n ln n

Thus,E[# of cuts] ≤ 2 n ln n and,E[Tree Size] = O(nlogn)