630 likes | 769 Views
This seminar by Eyal Altshuler explores Well-Separated Pair Decomposition (WSPD) algorithms, emphasizing their significance in geometric approximation. Key topics include the construction algorithm for WSPD and its applications in approximating distances, such as the closest pair problem and spanners. The focus is on achieving a compact representation of point distances, highlighting the use of quadtrees for efficient computation. Participants will gain insights into the theoretical underpinnings, practical implementations, and analysis of WSPD, equipping them with tools for advanced geometric computations. ###
E N D
Seminar on Geometric Approximation Algorithms, Spring 2012 Eyal Altshuler Well-Separated Pair Decomposition
Topics To Be Covered • Motivation • WSPD – Basic Definitions • WSPD – The Construction Algorithm • Applications of WSPD • Approximating the diameter • Closest pair • Spanners • Approximated minimum spanning tree
Motivation • Given a set P of points in , We want to represent the distances between them efficiently • Suggestions: • explicitly listing the distances • listing arrays of coordinates • We will see a more compact representation
Motivation • Suppose that all we care about are approximate distances • Want to capture that: • s and q are close together as far as p is concerned • s and q have the “same distance” from p • A “spoiler” for today’s data structure: • () • We will see how to build it q p s
WSPD – Basic Definitions • [ All works in , we will concentrate on ] • Let P be a set of n points in
WSPD – Basic Definitions • Denote by • The set of all (unordered) pairs of points formed by two sets of points – A and B • Informally we will refer to as the pair of the sets A and B
WSPD – Basic Definitions • For a point set P, a pair decomposition of P is a set of pairs – • such that: • for every i • = for every i • =
WSPD – Basic Definitions • The pair Q and R is (-separated if where
WSPD – Basic Definitions • For a point set P, a well-separatedpair decomposition(WSPD) of P with parameter ( is a pair decomposition of P with a set of pairs- • such that, for any i, the sets and are ( separated
Example b a f c d e
Building a WSPD • How to represent a WSPD efficiently? • Construct a Tree T having the points of P as leaves. • Every Pair {} will be just a pair of nodes (, such that • denotes the points of P stored in the sub-tree of v
Reminder - Quadtrees b a f c d e
Reminder - Quadtrees b a f c d f e a d e c b
Reminder - Quadtrees • Denote by the cell that contains the points that are in the subtree of v • Working with compressed quadtrees – time construction
Building a WSPD • Build T as a compressed quadtree d f e a c b
Building a WSPD • Find the pairs of vertices that define a WSPD d f e a c b
Notes • The quadtree decomposes the points such that the diameter of a point set stored in a node drops quickly as we go down the tree • A given tree can be used to represent many possible WSPDs. We are looking for the WSPD that is “minimal”
Notes • Suppose we find, for a given , the pairs of nodes that represent -separated point sets • This is the WSPD compact representation we want to achieve • It will be convenient, for each point set in a pair, to choose an arbitrary representative. Calculating distances between pairs will be done using these representatives
The Construction Algorithm • Given – A set of n points P in • First, compute the quadtree T of P • Next, be greedy – by calling • algWSPD(root,root)
Some More Definitions • - the “diameter” of the cell associated with • for a leaf, otherwise
Examples b a f c v d f u a g e g d c e b ?
Examples b a f c v d f u a g e g d c e b ?
Examples b a f c v d f u a g e g d c e b
algWSPD(u,v) • If and then • return // Don’t pair a leaf with itself • Ifthen • Exchange and • Ifthen • return // - the children of • return
Analysis • Computing the com-pressed quadtree T of P can be done in time (see previous lecture) • We will prove that constructing an -WSPD takes time • running time
Analysis • Lemma 1: • Let be a cell of a grid G of with cell diameter . For , the number of cells in G at distance at most from is • Proof: y y y x y
Analysis • Lemma 2 (validity): • algWSPD terminates and computes a valid pair decomposition • Proof: • Termination – always stops if both and are leaves • Every pair of points is covered – by induction • Every pair is valid -
Analysis • Lemma 3: (-WSPD) • For the WSPD generated by algWSPD, we have that for any pair in the WSPD, and , for any ,
Analysis • Proof: ,
Analysis • We got that the algorithm always return a valid -WSPD. • Note that the running time of the algorithm is clearly linear in its output size. • So, what is the output size?
Analysis • For a pair computed by algWSPD, we have that- where denotes that parent of in T
Analysis • [ • Proof: • Trivial that- • Let us show that
Analysis • [ • Consider the set of recursive calls
Analysis • [ • Assume
Analysis • [ • Assume • Clearly,
Analysis • [ • Similarly consider the index t where- • Clearly,
Analysis • Lemma: (WSPD’s size) The number of pairs in the computed WSPD is • Corollary: For , one can construct an -WSPD of size , and the construction time is
Analysis • Proof: • Suppose in the output • Suppose was called by • “charge” for that • Show that can’t be charged too much
Analysis • If: • Then:
Analysis • In addition- • Because the pair is not in the output • Denote-
Analysis • Suppose the three possibilities • Each one can happen at most times • (show on board) • There are n possible s, thus the total number of charges is
remember from algWSPD • For an -WSPD , it holds, for any pair , that: • Will be very important in the application side
Applications – Approximating The Diameter • Given a set P of n points in , find a pair such that , where is the diameter of P • Approximation vs. time, space
Applications – Approximating The Diameter • The affect of choosing the correct epsilon • Compute a -WSPD W of P • From the result- • Return the representatives of that have maximal distance between them
Applications – Approximating The Diameter • Consider the pair realizing the diameter of P • Let be the pair that contain the points q s
Applications – Closest Pair • Let P be a set of points in . We would like to compute the closest pair. • (first lecture) • Let be an -WSPD. • Let us look at closest points p and q in P, and consider the pair that separates them