Enumerating Distances Using Spanners of Bounded Degree

Slides:



Advertisements
Similar presentations
Lower Bounds for Additive Spanners, Emulators, and More David P. Woodruff MIT and Tsinghua University To appear in FOCS, 2006.
Advertisements

WSPD Applications.
Longest Common Subsequence
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Routing in a Parallel Computer. A network of processors is represented by graph G=(V,E), where |V| = N. Each processor has unique ID between 1 and N.
AVL Trees1 Part-F2 AVL Trees v z. AVL Trees2 AVL Tree Definition (§ 9.2) AVL trees are balanced. An AVL Tree is a binary search tree such that.
Greedy Algorithms Greed is good. (Some of the time)
1 Discrete Structures & Algorithms Graphs and Trees: III EECE 320.
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
1 Theory I Algorithm Design and Analysis (10 - Shortest paths in graphs) T. Lauer.
Combinatorial Algorithms
Optimization of Pearl’s Method of Conditioning and Greedy-Like Approximation Algorithm for the Vertex Feedback Set Problem Authors: Ann Becker and Dan.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Discussion #36 Spanning Trees
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
Minimum Spanning Tree Algorithms
3 -1 Chapter 3 The Greedy Method 3 -2 The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Minimal Spanning Trees. Spanning Tree Assume you have an undirected graph G = (V,E) Spanning tree of graph G is tree T = (V,E T E, R) –Tree has same set.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
9-1 Chapter 9 Approximation Algorithms. 9-2 Approximation algorithm Up to now, the best algorithm for solving an NP-complete problem requires exponential.
Steiner trees Algorithms and Networks. Steiner Trees2 Today Steiner trees: what and why? NP-completeness Approximation algorithms Preprocessing.
Dijkstra’s Algorithm Slide Courtesy: Uwash, UT 1.
Introduction Outline The Problem Domain Network Design Spanning Trees Steiner Trees Triangulation Technique Spanners Spanners Application Simple Greedy.
Randomized Algorithms - Treaps
Randomized Algorithms Morteza ZadiMoghaddam Amin Sayedi.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Spring 2015 Lecture 11: Minimum Spanning Trees
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sets.
GRAPH SPANNERS by S.Nithya. Spanner Definition- Informal A geometric spanner network for a set of points is a graph G in which each pair of vertices is.
Edge-disjoint induced subgraphs with given minimum degree Raphael Yuster 2012.
 2004 SDU Lecture 7- Minimum Spanning Tree-- Extension 1.Properties of Minimum Spanning Tree 2.Secondary Minimum Spanning Tree 3.Bottleneck.
Chapter 6: Geometric Analysis: The Gap Property By azam sadeghian 1.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 7.
Trees Thm 2.1. (Cayley 1889) There are nn-2 different labeled trees
8.4 Closures of Relations Definition: The closure of a relation R with respect to property P is the relation obtained by adding the minimum number of.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. Fast.
Data Structures and Algorithm Analysis Graph Algorithms Lecturer: Jing Liu Homepage:
The geometric GMST problem with grid clustering Presented by 楊劭文, 游岳齊, 吳郁君, 林信仲, 萬高維 Department of Computer Science and Information Engineering, National.
Introduction Wireless Ad-Hoc Network  Set of transceivers communicating by radio.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
Proof of correctness of Dijkstra’s algorithm: Basically, we need to prove two claims. (1)Let S be the set of vertices for which the shortest path from.
TIRGUL 10 Dijkstra’s algorithm Bellman-Ford Algorithm 1.
CHAPTER SIX T HE P ROBABILISTIC M ETHOD M1 Zhang Cong 2011/Nov/28.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
Greedy Algorithms.
Computing Connected Components on Parallel Computers
Haim Kaplan and Uri Zwick
Lecture 12 Algorithm Analysis
Lecture 18: Uniformity Testing Monotonicity Testing
Chapter 5. Optimal Matchings
GRAPH SPANNERS.
Randomized Algorithms CS648
עידן שני ביה"ס למדעי המחשב אוניברסיטת תל-אביב
3.5 Minimum Cuts in Undirected Graphs
CS 583 Analysis of Algorithms
Introduction Wireless Ad-Hoc Network
Lecture 12 Algorithm Analysis
Applied Combinatorics, 4th Ed. Alan Tucker
Minimum Spanning Tree Algorithms
Slide Courtesy: Uwash, UT
Slide Courtesy: Uwash, UT
CSE 417: Algorithms and Computational Complexity
Lecture 12 Algorithm Analysis
Locality In Distributed Graph Algorithms
Presentation transcript:

Enumerating Distances Using Spanners of Bounded Degree Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Enumerating Distances Using Spanners of Bounded Degree Generalizing skip lists: A spanner with logarithmic spanner diameter Maya Zalcberg 049823446 Ilia Flax 015600052

Outline Enumerating distances using spanners of bounded degree Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Outline Enumerating distances using spanners of bounded degree approximate distance enumeration Exact distance enumeration Generalizing skip lists: A spanner with logarithmic spanner diameter

Introduction The goal: input: Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Introduction The goal: Enumating the smallest k distances among the distances in a group of n points. input: S: a set of n points in k an integer such that 1 < k <

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Introduction Output: a sequence {a1,b1}…{ak,bk} distinct pairs of S is called the k closest pairs, if: 1. 2. the distances , are the k smallest elements in multiset

Introduction There are two solutions available: Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Introduction There are two solutions available: using bounded-degree spanner to enumerate the k approximate closest pairs in Modify the algorithm to obtain the k exact closest pairs in

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Approximate distance S a set of n points in , k an integer such that , t > 1 a real number. sorted by their distances is a sequence of k t-approximate closest pairs if:

Approximate distance G = (S,E) it a t-spanner for S Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Approximate distance G = (S,E) it a t-spanner for S D positive integer. The degree of each point from S is less then or equal to D. PQ is a priority queue that stores at most k pairs. Each priority(p,q) in PQ is equal to the length of the shortest path in G between p and q at the moment.

Approximate distance Dijkstra’s algorithm Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Approximate distance Dijkstra’s algorithm We use a variant of Dijkstra’s SingleSource(G,s,R) algorithm that takes as input an undirected graph G in which every edge has a positive weight, a vertex s of G, and a real number R>0. It returns a set A of all vertices v for which

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Algorithm The algorithm uses the t-spanner G to compute a sequence of k t-approximate closest pairs in S. The idea is to run Dijkstra’s single-source shortest path algorithm simultaneously from all point of S.

Algorithm ApproxDistEnum(G,k) Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Algorithm ApproxDistEnum(G,k) Initializing: PQ contains the min(k,|E|) shortest edges of E. *. The priority(p,q) of any such edge {p,q} is equal to the Euclidean distance between p and q. Then a sequence of k iterations is carried out.

Algorithm In each iteration: Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Algorithm In each iteration: The pair {p,q} with the lowest priority from PQ is deleted and reported immediately. For each edge {q,r} (and, symmetrically {p,s} ) of G: If the pair {p,r} doesn’t occur in PQ, then priority({p,r})=priority({p,q})+|qr| and {p,r} inserted into PQ. If PQ contains k+1 pairs, the pair with the highest priority is deleted. If the pair {p,r} occures in PQ, then if it’s priority is higher than priority({p,q})+|qr| , then the priority{p,r} is set to priority({p,q})+|qr|.

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Correctness According to the analysis of Dijkstra’s algorithm, the algorithm returns the k shortest path distances in G. We show that these k pairs are the t-approximate closest pairs in G.

Correctness Some new definitions… Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Correctness Some new definitions… the length of a shortest path between and in the t-spanner G is a permutation of {1,2,… } such that

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Correctness ApproxDistEnum(G,k) reports k pairs of points whose final priority values are Since G is a t-spanner, so by replacing i by we get

Correctness Proof Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Proof

Correctness Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Correctness

Correctness Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Correctness

Correctness For each i, 1<i< : Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Correctness For each i, 1<i< : The k pairs of points that are reported by the algorithm are the k t-approximate closest pairs, if:

Correctness Proof Reminder! Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Correctness Proof Reminder! the length of the shortest path in G between and is equal to . Else: G is a t-spanner, so

Time Analysis Initializing: Running Dijkstra: Building PQ: Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis Initializing: Building PQ: Running Dijkstra:

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Exact Distance G = (S,E) it a t-spanner for point set S, such that the maximum degree is D. By making two modifications to ApproxDistEnum(G,k) we can enumerate the k exact closest pairs.

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Algorithm This algorithm takes as input a t-spanner G = (S,E) and an integer k. It returns a sequence of k exact closest pairs in S.

Algorithm ExactDistEnum(G,k) Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Algorithm ExactDistEnum(G,k) We make two modification to ApproxDistEnum(G,k): 1. The priority queue PQ is maintained at full size. 2. The algorithm does not report pairs as before. It keeps the k closest pairs among all pairs that were ever inserted into PQ. to be continued….

Algorithm ExactDistEnum(G,k) Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Algorithm ExactDistEnum(G,k) 2. the terminition is when the smallest priority in PQ is larger then t times the Euclidian-distance of the k-th closest pair found so far. *. At termination, the k closest pairs that have been found are reported.

Algorithm Implementation issues: Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Algorithm Implementation issues: A second priority queue is maintained that contains the same pairs as PQ, and in which the priority of and pair {p,q} is equal to the euclidian distance |pq|.

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Correctness Claim: Let x be the Euclidian distance of the k-th pair reported by the algorithm. Let p,q be any two distinct points of S such that the pair {p,q} is never inserted into PQ. |pq|>x

Correctness Proof: Let {r,s} a pair that causes us to stop. Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Correctness Proof: Let {r,s} a pair that causes us to stop. At the termination time priority({r,s})>tx Also, at the same time priority({r,s}) is equal to the length of the shortest path between r and s in G. At termination, all the shortest paths in G shorter then priority({r,s}) have been found.

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Correctness Proof: - the length of the shortest path in G between p and q. priority({r,s}). Since G is a t-spanner,

Correctness Summary: For each pair {p,q}, with , is inserted into PQ. Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Correctness Summary: For each pair {p,q}, with , is inserted into PQ. The distance of the k-th closest pair in S is less then or equal to x. ExactDistEnum(G,k) enumerates the k closest pairs in S.

Time Analysis Fundamental claim: Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis Fundamental claim: - the k-th smallest Euclidean distance in S. {p,q} – the current pair with minimum priority in PQ. Assume {p,q} is the first pair for which ExactDistEnum(G,k) terminates at the moment when it selects {p,q}

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis Proof: – the length of the shortest path in G between p and q x – the k-th smallest Euclidean distance Priority({p,q})= We have to show that > tx

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis Proof: Any pair {r,s} whose distance in G has already occurred as minimal element in PQ. r,s – distinct points of S such that – the length of a shortest path in G between r and s.

Time Analysis Summary: Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis Summary: At {p,q} selection as a minimal element in PQ, all pairs of distinct points of S having Euclidean distance at most Wk have been inserted into PQ. > tx

Time Analysis Summary: Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis Summary: I – the number of iterations made by ExactDistEnum(G,k) Then the running time is I is less than or equal to the number of pairs of distinct points of S having distance at most Now we need to give an upper bound to I…

Time Analysis Lemma: - the k-th smallest Euclidean distance in S. Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis Lemma: - the k-th smallest Euclidean distance in S. t – a real number, larger then 1. M – the number of pairs of distinct points of S having distance at most

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis Proof: - d-dimensional grid with cells of side lengths . Each cell of this grid has the form for some integers . a cell is the Cartesian product of d intervals, which are closed on the left and open on the right.

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis a cell of is nonempty, if it contains at least one point of S. g – the number of nonempty cells. we number these cell arbitrarily . - the number of points of S that are contained in the i-th nonempty cell. , the total number of pairs {x,y} such that x and y are contained in the same cell of .

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis if two points are in the same cell, their distance is less . w is the k-th smallest distance in S, therefore . , and an arbitrary cell in , the neighborhood of C in the d-dimensional hypercube is defines as followed: To be continued….

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis the side lengths of are equal to , and contains the cell c in its center. Neighborhood of C : the set of all nonempty cells of that overlap . For each i, . is the set of all indices j, such that the j-th nonempty cell is in the neighborhood of the i-th nonempty cell.

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis p,q two distinct points of s such that . p,q are contained in the i-th and j-th nonempty cells of . if but therefore .

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Time Analysis 16. Finally, we can prove the upper bound on M, which is the number of distances in S that are less then or equal to .

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Summary Theorem: Let S be a set on n points in , let be a real number, let be a positive integer, and let be a t-spanner for S of degree . Given any integer with , algorithm ExactDistEnum(G,k) computes a sequence of exact closest pairs in S in

Generalizing Skip Lists Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Generalizing Skip Lists We present a randomized algorithm that constructs a sparse spanner whose expected spanner diameter is . Skip lists – this randomized data structure is a sparse 1-spanner whose spanner diameter is . Lets start by presenting some definitions…

Generalizing Skip Lists Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Generalizing Skip Lists Sparse Spanner – a spanner with or with a spanner with small weight/size. Spanner Diameter – The longest shortest path between a pair of points in S. Next we will present the skip list data structure….

Generalizing Skip Lists Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Generalizing Skip Lists S a set on n real numbers. Construct a sequence of subsets of S: and . As long as ,construct a random subset of as followed: Each number of has a 50% chance of getting picked. Set to be the subset of all the picked points of . Finally, Set and iterate.

Generalizing Skip Lists Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Generalizing Skip Lists - the number of iterations. Then we obtain the following sequence: of subsets of S, where . Definition: , . The Skip List for S: 1. for each i, , there is a double linked list storing the elements of in sorted order. Elements of are at level i of the skip list. 2. for each i, , and each , the occurrences of in and are connected by pointers.

Generalizing skip lists Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Generalizing skip lists Example: 1 2 4 5 8 9 10 12 14 15 A skip list for the set S = {1, 2, 4, 5, 8, 9, 10, 12, 14, 15}. There are four nonempty subsets and The value of h is equal to 4.

Generalizing Skip Lists Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Generalizing Skip Lists Lemma: , , produced by the given random process, and let M be the total size of the corresponding skip list. 1. The expected value of is . 2. There is a constant C that for all large enough real numbers S : 3. M is proportional to , which has expected value of . 4. There is a constant that for all large enough real numbers S :

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Building the paths p,q – two points in S. we want to build a path between p and q. Start at p at level 1. walk right until you reach an point at level 2. If q is reached – finished. Otherwise, let p1 be the first point encountered at level 2. Do the same walking left from q at level 1 - let q1 is the first point encountered at level 2. - if p1 is reached – finished. Recursively build a path between p1 and q1. כמובן שעל מנת לבנות מסלול מ p ל q אנחנו פשוט יכולים ללכת על הרמה התחתונה ביותר של הרשימה, אבל הליכה כזאת יכולה לעבור על n-1 קשתות מה שלא מתאים לנו מכיוון שאנחנו רוצים שהמסלול הארוך הקצר ביותר יהיה O(logn)

Building the paths This way, we construct two paths. Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Building the paths This way, we construct two paths. The construction stops as soon as the two paths meet. The result of building a path between 4 and 14 on the skip list example is:

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Building the paths The expected number of steps made to build a path between p and q is . The excepted number of steps made at level i is O(1), and there are levels. ניתן אינטואיציה למה בכל שלב יש O(1) נקודות. הסיכוי של נקודה שלהי להופיע בשלב i+1 הוא בדיוק חצי ולכן מספר האיברים הצפוי בכל שלב מוגבל בקבוע.

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner The spanner in 1-D By “flattening” the vertices, we can regard the skip list as a graph G. The expected path length between two points p,q is . The path the from the example in G is: 4,5,9,12,14. The skip list is a 1-spanner for S. What is the expected spanner diameter ? 1.מעבר לכך, אפילו הרשימה L1 תהיה 1-spanner ל S. הבעיה ברשימה זו שאורך המסלול הארוך ביותר בה בין שני נקודות הוא n-1. 2. על מנת לענות על השאלה מהו ה spanner diameter עלינו להגביל את מס' הקשתות המקסימאלי לאורך המסלול הקצר ביותר בין כל שני צמתים בגרף. 3. כפי שראינו עבור שתי צמתים p,q אורך המסלול הצפוי ביניהם הוא O(logn) אבל זה לא אומר שאורך המסלול הקצר ביותר המקסימלי הוא O(logn). 4. למזלנו, ניתן להוכיח שההסתברות שאורך המסלול הקצר ביותר המקסימלי גדול בצורה משמעותית מ logn היא קטנה מאוד.

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Summary Theorem: Let S be a set on n real numbers. The skip list of S can be regarded as a graph which is a 1-spanner for S. with high probability, the number of edges of this graph is and its spanner diameter is .

Skip list spanner We want to generalize out solution for 1-D to 2-D. Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Skip list spanner We want to generalize out solution for 1-D to 2-D. S – a set of n points in the plane. We’ll use the same random process to obtain the following sequence: of subsets of S, where .

Skip List 2-D spanner Definition: Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Skip List 2-D spanner Definition: - an integer. , are constructed be the random process. For S is defined as follows: 1. For each, i, , the points of are stored in the graph . The points of are at level i of the skip list spanner. 2. for each i, , and each , the occurrences of in level i and level i-1 are connected by pointers.

Recall Θ graph Definition: Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Recall Θ graph Definition: Let be an integer, let and let S be a set of points in the plane. The undirected graph is defined as follows: 1. The vertices of are the points of S. 2. For each point p of S and for each cone C of Ck, such that the translated cone Cp contains one or more points of , the graph contains one edge where r is a point in , whose orthogonal projection onto is closest to p

Recall Θ graph Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Recall Θ graph

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Skip List 2-D spanner is a graph with vertex set S and edge set the union of the edge sets of the graphs , . Lemma: an integer, , S a set of n points in the plane. The skip list spanner is a t-spanner for S with with high probability, this graph contains edges and can be constructed in time. המצביעים שמחברים גרפים ברמות שכנות לא נחשבים קשתות של הגרף הסופי. אינטואיציה להוכחת הלמה. ע"פ התכונות של טטה גרף הוא t-spanner עם ערך t כפי שמצוין

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Building a path Like in the 1-D case in order to build a path between p and q we build two paths. One starting at p and the other at q. We stop when the paths meet. We start at p at level 1 and build a path in the graph from p toward q. Suppose we’ve built a path from p to x. If x = q – finished. If and x doesn’t occur on level 2: 1. C a cone of such that q in . 2. x’ is the point of such that {x,x’} is an edge of .

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Building a path Then x’ is the next point on the path from p toward q. set x=x’. We keep extending this path until x=q or the point x occurs at level 2. Assume that x occurs at level 2. We start building a path from q to x in . Assume we’ve built a path from q to y. We stop extending the path if y is one of the points on the path from p to x or if y occurs at level 2.

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Building a path Assume y is a point p’ on the path from p to x. In this case we return the path from p to p’ followed by the reverse of the path from q to p’ and stop. Otherwise, x and y are both on level 2 and we use the same algorithm to construct a path between them.

Outline Enumerating distance Using spanners Approximate distance Presentation Algorithm Correctness Time Analysis Exact distance Generalizing skip lists Skip List Skip List Spanner Summary Theorem: Let be an integer, let , and let be a set of n points in the plane. Then the following is true: 1. The skip list spanner is a t-spanner for with high probability it contains edges. 2. The skip list spanner can be constructed in with high probability. 3. with high probability, the spanner diameter of the skip list spanner is . 4. all these bounds are with respect to the coin flips that are used to build the skip list spanner.

Thank You!