Net Module β’ Intuition: sampling points from each line finely enough to get a set of points π , and building an π΅ππ(π, π) should suffice to find the approximate closest line. 38
Net Module β’ Intuition: sampling points from each line finely enough to get a set of points π , and building an π΅ππ(π, π) should suffice to find the approximate closest line. Lemma: β’ Let π¦ be the separation parameter: distance between two adjacent samples on a line β’ Then β Either the returned line β π is an approximate closest line β Or πππ‘π’ π, β π β€ π¦/π 39
Parallel Module - Intuition β’ All lines in π are parallel 42
Parallel Module - Intuition β’ All lines in π are parallel β’ Data structure: β Project all lines onto any hyper-plane π which is perpendicular to all the lines to get point set π β Build ANN data structure π΅ππ(π, π) 43
Parallel Module - Intuition β’ All lines in π are parallel β’ Data structure: β Project all lines onto any hyper-plane π which is perpendicular to all the lines to get point set π β Build ANN data structure π΅ππ(π, π) β’ Query algorithm: β Project the query on π to get πβ² β Find the approximate closest point to πβ² , i.e., π = π΅ππ π π β² β Return the corresponding line to π 44
Parallel Module All lines in π are π -close to a base line β π β’ Project the lines onto a hyper-plane π which is β’ perpendicular to β π Query is close enough to π β’ β’ Use the same data structure and query algorithm 45
Parallel Module All lines in π are π -close to a base line β π β’ Project the lines onto a hyper-plane π which is β’ perpendicular to β π Query is close enough to π β’ β’ Use the same data structure and query algorithm πΈπ Lemma : if πππ‘π’ π, π β€ π , then Either the returned line β π is an approximate closest β’ line Or πππ‘π’ π, β π β€ πΈ β’ 46
Parallel Module All lines in π are π -close to a base line β π β’ Project the lines onto a hyper-plane π which is β’ perpendicular to β π Query is close enough to π β’ β’ Use the same data structure and query algorithm πΈπ Lemma : if πππ‘π’ π, π β€ π , then Either the returned line β π is an approximate closest β’ line Or πππ‘π’ π, β π β€ πΈ β’ Thus, for a set of almost parallel lines, we can use a set of parallel modules to cover a bounded region. 47
General Case β’ Input lines can have any configuration β’ Divergent Case Input lines are π(π) -far from each other β’ β’ Almost Parallel Case Input lines are all π(π) -close to each other β’ ALGORITHMS 51
Outline of the Algorithms β’ Input : a set of π lines π 52
Outline of the Algorithms β’ Input : a set of π lines π β’ Randomly choose a subset of π/2 lines π 53
Outline of the Algorithms β’ Input : a set of π lines π β’ Randomly choose a subset of π/2 lines π β’ Solve the problem over π to get a line β π 54
Outline of the Algorithms β’ Input : a set of π lines π β’ Randomly choose a subset of π/2 lines π β’ Solve the problem over π to get a line β π β’ For logπ iterations β Use β π to find a much closer line β π β² Improvement β² β Update β π with β π step 55
Outline of the Algorithms β’ Input : a set of π lines π β’ Randomly choose a subset of π/2 lines π β’ Solve the problem over π to get a line β π β’ For logπ iterations β Use β π to find a much closer line β π β² Improvement β² β Update β π with β π step 56
Outline of the Algorithms β’ Input : a set of π lines π β’ Randomly choose a subset of π/2 lines π β’ Solve the problem over π to get a line β π β’ For logπ iterations β Use β π to find a much closer line β π β² Improvement β² β Update β π with β π step Why? 57
Outline of the Algorithms β’ Input : a set of π lines π β’ Randomly choose a subset of π/2 lines π β’ Solve the problem over π to get a line β π β’ For logπ iterations β Use β π to find a much closer line β π β² Improvement β² β Update β π with β π step Let β 1 , β¦ , β log π be the log π closest lines to π in the set π 58
Outline of the Algorithms β’ Input : a set of π lines π β’ Randomly choose a subset of π/2 lines π β’ Solve the problem over π to get a line β π β’ For logπ iterations β Use β π to find a much closer line β π β² Improvement β² β Update β π with β π step Let β 1 , β¦ , β log π be the log π closest lines to π in the set π With high probability at least one of {β 1 , β¦ , β log π } are sampled in π β πππ‘π’ π, β π β€ πππ‘π’ π, β log π (1 + π) β log π improvement steps suffices to find an approximate closest line 59
Improvement Step Given a line β , how to improve it, i.e., find a closer line? 60
Improvement Step Given a line β , how to improve it, i.e., find a closer line? β’ Data structure β’ Query Processing Algorithm 61
General Case β’ Search among all lines that are π -far from current line using Divergent Case 62
General Case β’ Search among all lines that are π -far from current line using Divergent Case β’ Search among the lines that are almost parallel to line found in previous step using Almost Parallel Case 63
Divergent Case Assume any two lines are π -far; they diverge quickly. 64
Divergent Case Assume any two lines are π -far; they diverge quickly. β’ Let β be the current line, and β β be the closest line to π β’ Let π¦ = πππ‘π’(π, β) β’ πππ‘π’ π, β β β€ π¦ 65
Divergent Case Assume any two lines are π -far; they diverge quickly. β’ Let β be the current line, and β β be the closest line to π β’ Let π¦ = πππ‘π’(π, β) β’ πππ‘π’ π, β β β€ π¦ β All potential β β intersect πΆ(π, π¦) 66
Divergent Case Assume any two lines are π -far; they diverge quickly. β’ Let β be the current line, and β β be the closest line to π β’ Let π¦ = πππ‘π’(π, β) β’ πππ‘π’ π, β β β€ π¦ β All potential β β intersect πΆ(π, π¦) β Good news: we can build a net module inside πΆ π, π¦ with separation parameter π¦Ο΅ 2 to improve over β 67
Divergent Case Assume any two lines are π -far; they diverge quickly. β’ Let β be the current line, and β β be the closest line to π β’ Let π¦ = πππ‘π’(π, β) β’ πππ‘π’ π, β β β€ π¦ β All potential β β intersect πΆ(π, π¦) β Good news: we can build a net module inside πΆ π, π¦ with separation parameter π¦Ο΅ 2 to improve over β β Bad news: we donβt know this ball in advance 68
Divergent Case contd. What we know: β’ πππ‘π’ β,β β β€ 2π¦ β’ Let πβ² be the projection of π on β 69
Divergent Case contd. What we know: β’ πππ‘π’ β,β β β€ 2π¦ β’ Let πβ² be the projection of π on β 70
Divergent Case contd. What we know: β’ πππ‘π’ β,β β β€ 2π¦ β’ Let πβ² be the projection of π on β π¦ β π·π βββ β is not farther than π from πβ² since they are π -far 71
Divergent Case contd. What we know: β’ πππ‘π’ β,β β β€ 2π¦ β’ Let πβ² be the projection of π on β π¦ β π·π βββ β is not farther than π from πβ² since they are π -far π β πͺ(π β² , π· π ) touches all such lines 72
Data Structure For each β β π β’ Sort all lines ββ² according to their distance from β 73
Data Structure For each β β π β’ Sort all lines ββ² according to their distance from β For all 1 β€ π β€ π , let π π be the π π’β closest lines β’ 74
Data Structure For each β β π β’ Sort all lines ββ² according to their distance from β For all 1 β€ π β€ π , let π π be the π π’β closest lines β’ β Sort all lines in π π such as ββ² according to the position of π·π ββββ² 75
Data Structure For each β β π β’ Sort all lines ββ² according to their distance from β For all 1 β€ π β€ π , let π π be the π π’β closest lines β’ β Sort all lines in π π such as ββ² according to the position of π·π ββββ² β For each interval of lines π΅ in sorted π π 76
Data Structure For each β β π β’ Sort all lines ββ² according to their distance from β For all 1 β€ π β€ π , let π π be the π π’β closest lines β’ β Sort all lines in π π such as ββ² according to the position of π·π ββββ² β For each interval of lines π΅ in sorted π π β’ Find smallest ball πΆ π΅ (o A , r A ) with its center on β which intersects all lines in π΅ π¦ -> ( π π΅ β€ π( π )) 77
Data Structure For each β β π β’ Sort all lines ββ² according to their distance from β For all 1 β€ π β€ π , let π π be the π π’β closest lines β’ β Sort all lines in π π such as ββ² according to the position of π·π ββββ² β For each interval of lines π΅ in sorted π π β’ Find smallest ball πΆ π΅ (o A , r A ) with its center on β which intersects all lines in π΅ π¦ -> ( π π΅ β€ π( π )) β’ Construct a net module inside of the ball π΅ /π 2 ) with separation π π΅ π 3 of πΆ(π π΅ , π π΅ /(π 2 π π΅ π 3 )) = π(π/π 5 )) (#samples = O( π π 78
Data Structure For each β β π β’ Sort all lines ββ² according to their distance from β For all 1 β€ π β€ π , let π π be the π π’β closest lines β’ β Sort all lines in π π such as ββ² according to the position of π·π ββββ² β For each interval of lines π΅ in sorted π π β’ Find smallest ball πΆ π΅ (o A , r A ) with its center on β which intersects all lines in π΅ π¦ -> ( π π΅ β€ π( π )) β’ Construct a net module inside of the ball π΅ /π 2 ) with separation π π΅ π 3 of πΆ(π π΅ , π π΅ /(π 2 π π΅ π 3 )) = π(π/π 5 )) (#samples = O( π π β’ Construct an unbounded module outside 1 of πΆ π΅ π π΅ , π 2 π π΅ 79
Query Processing Algorithm Given query point π 80
Query Processing Algorithm Given query point π Project π on β to get πβ² β Use binary search to find the set π΅ of all lines β ββ² that are within distance 2π¦ of β , and that π·π βββ β² is within distance 2π¦/π of πβ² 81
Query Processing Algorithm Given query point π Project π on β to get πβ² β Use binary search to find the set π΅ of all lines β ββ² that are within distance 2π¦ of β , and that π·π βββ β² is within distance 2π¦/π of πβ² 82
Query Processing Algorithm Given query point π Project π on β to get πβ² β Use binary search to find the set π΅ of all lines β ββ² that are within distance 2π¦ of β , and that π·π βββ β² is within distance 2π¦/π of πβ² Let πΆ π΅ (π π΅ , π π΅ ) be the corresponding ball β 83
Query Processing Algorithm Given query point π Project π on β to get πβ² β Use binary search to find the set π΅ of all lines β ββ² that are within distance 2π¦ of β , and that π·π βββ β² is within distance 2π¦/π of πβ² Let πΆ π΅ (π π΅ , π π΅ ) be the corresponding ball β π π΅ If π¦ β πΆ π΅ (π π΅ , π 2 ) use net module: β β’ Find approximate closest line -> done! β’ Or find a line with distance at most π΅ π 2 β€ π¦π ( π π π΅ β€ π¦/π) -> we improved 84
Query Processing Algorithm Given query point π Project π on β to get πβ² β Use binary search to find the set π΅ of all lines β ββ² that are within distance 2π¦ of β , and that π·π βββ β² is within distance 2π¦/π of πβ² Let πΆ π΅ (π π΅ , π π΅ ) be the corresponding ball β π π΅ If π¦ β πΆ π΅ (π π΅ , π 2 ) use net module: β β’ Find approximate closest line -> done! β’ Or find a line with distance at most π΅ π 2 β€ π¦π ( π π π΅ β€ π¦/π) -> we improved β Otherwise use unbounded module to find the approximate closest line -> done! 85
Almost Parallel All lines are 2π -close to each other. For each line β slab β’ Partition the space into slabs using perpendicular hyperplanes to β s.t. for any pair of lines β 1 , β 2 : 86
Almost Parallel All lines are 2π -close to each other. For each line β β’ Partition the space into slabs using perpendicular hyperplanes to β s.t. for any pair of lines β 1 , β 2 : β In each slab the relative order of dist πΌ β,π β, β 1 and πππ‘π’ πΌ β,π (β, β 2 ) on the hyper-plane remains the same as we move π on β in the slab There is a unique ordering of the lines 87
Almost Parallel All lines are 2π -close to each other. For each line β β’ Partition the space into slabs using perpendicular hyperplanes to β s.t. for any pair of lines β 1 , β 2 : β In each slab the relative order of dist πΌ β,π β, β 1 and πππ‘π’ πΌ β,π (β, β 2 ) on the hyper-plane remains the same as we move π on β in the slab There is a unique ordering of the lines β πππ‘π’ πΌ β,π β 1 ,β 2 on the hyper-plane is monotone 88
Almost Parallel All lines are 2π -close to each other. For each line β β’ Partition the space into slabs using perpendicular hyperplanes to β s.t. for any pair of lines β 1 , β 2 : β In each slab the relative order of dist πΌ β,π β, β 1 and πππ‘π’ πΌ β,π (β, β 2 ) on the hyper-plane remains the same as we move π on β in the slab There is a unique ordering of the lines β πππ‘π’ πΌ β,π β 1 ,β 2 on the hyper-plane is monotone The minimum ball intersecting any prefix of lines have its center on the boundary of slab 89
Almost Parallel All lines are 2π -close to each other. For each line β β’ Partition the space into slabs using perpendicular hyperplanes to β s.t. for any pair of lines β 1 , β 2 : β In each slab the relative order of dist πΌ β,π β, β 1 and πππ‘π’ πΌ β,π (β, β 2 ) on the hyper-plane remains the same as we move π on β in the slab There is a unique ordering of the lines β πππ‘π’ πΌ β,π β 1 ,β 2 on the hyper-plane is monotone The minimum ball intersecting any prefix of lines have its center on the boundary of slab. β’ π π 2 slabs suffices 90
Data Structure in Each Slab For each π , let πΆ(π, π ) be the smallest ball β’ touching the closest π π’β lines s.t. π β β . We know π would be on the boundary of slab. 91
Data Structure in Each Slab For each π , let πΆ(π, π ) be the smallest ball β’ touching the closest π π’β lines s.t. π β β . We know π would be on the boundary of slab. 92
Data Structure in Each Slab For each π , let πΆ(π, π ) be the smallest ball β’ touching the closest π π’β lines s.t. π β β . We know π would be on the boundary of slab. 93
Data Structure in Each Slab For each π , let πΆ(π, π ) be the smallest ball β’ touching the closest π π’β lines s.t. π β β . We know π would be on the boundary of slab. β’ Let π 0 > β― > π π’ be all pairwise angles π π Let π 0 = ππ 0 , β¦ , π π’ = β’ ππ π’ Consider the balls πΆ π, π 0 , β¦ , πΆ π, π π’ β’ 94
Data Structure in Each Slab For each π , let πΆ(π, π ) be the smallest ball β’ touching the closest π π’β lines s.t. π β β . We know π would be on the boundary of slab. β’ Let π 0 > β― , > be all pairwise angles π π Let π 0 = ππ 0 , β¦ , π π’ = β’ ππ π’ Consider the balls πΆ π, π 0 , β¦ , πΆ π, π π’ β’ β’ Build net module inside πΆ π, π 0 95
Data Structure in Each Slab For each π , let πΆ(π, π ) be the smallest ball β’ touching the closest π π’β lines s.t. π β β . We know π would be on the boundary of slab. β’ Let π 0 > β― > π π’ be all pairwise angles π π Let π 0 = ππ 0 , β¦ , π π’ = β’ ππ π’ Consider the balls πΆ π, π 0 , β¦ , πΆ π, π π’ β’ β’ Build net module inside πΆ π, π 0 96
Data Structure in Each Slab For each π , let πΆ(π, π ) be the smallest ball β’ touching the closest π π’β lines s.t. π β β . We know π would be on the boundary of slab. β’ Let π 0 > β― > π π’ be all pairwise angles π π Let π 0 = ππ 0 , β¦ , π π’ = β’ ππ π’ Consider the balls πΆ π, π 0 , β¦ , πΆ π, π π’ β’ β’ Build net module inside πΆ π, π 0 For each ball πΆ(π, π π ) β’ β Build unbounded module on it 97
Data Structure in Each Slab For each π , let πΆ(π, π ) be the smallest ball β’ touching the closest π π’β lines s.t. π β β . We know π would be on the boundary of slab. β’ Let π 0 > β― > π π’ be all pairwise angles π π Let π 0 = ππ 0 , β¦ , π π’ = β’ ππ π’ Consider the balls πΆ π, π 0 , β¦ , πΆ π, π π’ β’ β’ Build net module inside πΆ π, π 0 For each ball πΆ(π, π π ) β’ β Build unbounded module on it β For each line β π β’ Build a set of parallel modules with β π as their base line for all the lines that are π π -close to β π , so that they cover the space between πΆ(π, π π ) and πΆ(π, π π+1 ) with separation π π+1 π 98
Query Processing Algorithm β’ Given π , find the right slab, and retrieve all candidate lines β’ Using binary search find π 99
Query Processing Algorithm β’ Given π , find the right slab, and retrieve all candidate lines β’ Using binary search find π β’ Find largest π such that π β πΆ(π, π π ) 100
Query Processing Algorithm β’ Given π , find the right slab, and retrieve all candidate lines β’ Using binary search find π β’ Find largest π such that π β πΆ(π, π π ) β’ Use the unbounded module of πΆ(π, π π ) to find a line β β² , we know β Either ββ² is an approximate closest line -> done β It is π π+1 -close to β β 101
Query Processing Algorithm β’ Given π , find the right slab, and retrieve all candidate lines β’ Using binary search find π β’ Find largest π such that π β πΆ(π, π π ) β’ Use the unbounded module of πΆ(π, π π ) to find a line β β² , we know β Either ββ² is an approximate closest line -> done β It is π π+1 -close to β β β’ Use the parallel modules of β β² to find an approximate closest line. -> done 102
Query Processing Algorithm β’ Given π , find the right slab, and retrieve all candidate lines β’ Using binary search find π β’ Find largest π such that π β πΆ(π, π π ) β’ Use the unbounded module of πΆ(π, π π ) to find a line β β² , we know β Either ββ² is an approximate closest line -> done β It is π π+1 -close to β β β’ Use the parallel modules of β β² to find an approximate closest line. -> done 103
Summary β’ Nearest Line Search Problem 104
Summary β’ Nearest Line Search Problem β’ Modules: unbounded, net, parallel 105
Summary β’ Nearest Line Search Problem β’ Modules: unbounded, net, parallel β’ Use of random sampling 106
Summary β’ Nearest Line Search Problem β’ Modules: unbounded, net, parallel β’ Use of random sampling β’ How to improve given a line 107
Summary β’ Nearest Line Search Problem β’ Modules: unbounded, net, parallel β’ Use of random sampling β’ How to improve given a line β’ Bounds of our algorithm β Polynomial Space: π 1 π 1 1 ππ π = π π + π π π2 Γ π― , π π π β Poly-logarithmic query time : π 1 π 1 π log π π 1 Γ π°( π 1 , π) = π + log π + π π 108
Recommend
More recommend