Covering Uncertain Points in a Tree Haitao Wang and Jingru Zhang Utah State University WADS 2017, St. John’s, Canada
An uncertain point in a tree T An uncertain point 𝑷 𝒊 has multiple possible locations on T with probabilities 𝑝 𝑖2 0.2 𝑝 𝑖1 0.4 0.3 𝑝 𝑖5 𝑝 𝑖4 0.1 𝑝 𝑖3 0.1
An uncertain point The expected distance from 𝑷 𝒊 to a point x is 𝐸𝑑 𝑃 𝑖 ,𝑥 = 𝜔 𝑖 ∙ 𝑗=1 𝑚 𝑓 𝑖𝑗 ∙𝑑(𝑥, 𝑝 𝑖𝑗 ) 𝑓 𝑖3 𝑝 𝑖3 𝑓 𝑖2 x 𝑓 𝑖5 𝑓 𝑖1 𝑝 𝑖2 𝑝 𝑖5 𝑝 𝑖1 𝑓 𝑖4 𝑝 𝑖4
Problem definition T 𝑄= 𝑞 1 , 𝑞 2 𝑞 1 𝑞 2 Input: a tree T a set 𝑷 of n uncertain points and each 𝑷 𝒊 has 𝒎 𝒊 locations a covering range 𝝀 Goal: Find a set 𝑄 of a minimum number of centers on T such that max 1≤𝑖≤𝑛 𝐸𝑑( 𝑃 𝑖 ,𝑄)≤𝝀 where 𝐸𝑑 𝑃 𝑖 ,𝑄 = min 𝑞∈𝑄 𝐸𝑑( 𝑃 𝑖 ,𝑞) T 𝑄= 𝑞 1 , 𝑞 2 𝑞 1 𝑞 2 𝑃 1 ---- 𝑃 2 ---- 𝑃 3 ----
An application The k-center of uncertain points on a tree Input: a tree T and a set 𝑷 of uncertain points Goal: Find a set 𝑄 of at most k centers to minimize max 1≤𝑖≤𝑛 𝐸𝑑( 𝑃 𝑖 ,𝑄)
Related works Covering certain points in a tree: Time: 𝑂 𝑛 --- O. Kariv and S. Hakimi (1979) The k-center problem of uncertain points on a line: Time: 𝑂 𝑚𝑛 log 𝑚𝑛 +𝑛 log 𝑘 log 𝑛 --- Wang and Zhang (2014) The one-center problem of uncertain points in a tree: Time: 𝑂 𝑚𝑛 --- Wang and Zhang (2015)
Our result The problem has not been studied before Our result: 𝑂( 𝑇 +𝑀 log 𝑀 2 ) where 𝑀 is the number of locations of all uncertain points The k-center problem: O(|T|+n2 log n log M + M log3 M)
Problem definition T 𝑄= 𝑞 1 , 𝑞 2 𝑞 1 𝑞 2 Input: a tree T a set 𝑷 of n uncertain points and each 𝑷 𝒊 with 𝒎 𝒊 locations a covering range 𝝀 Goal: Find a set 𝑄 of a minimum number of centers on T such that max 1≤𝑖≤𝑛 𝐸𝑑( 𝑃 𝑖 ,𝑄)≤𝝀 T 𝑄= 𝑞 1 , 𝑞 2 𝑞 1 𝑞 2 𝑃 1 ---- 𝑃 2 ---- 𝑃 3 ----
𝐸𝑑 𝑝 𝑖 , 𝑃 𝑖 ≤𝐸𝑑 𝑥, 𝑃 𝑖 for all 𝑥∈𝑇 The Median 𝑝 𝑖 of 𝑃 𝑖 The median 𝑝 𝑖 of an uncertain point 𝑃 𝑖 is a vertex of T such that 𝐸𝑑 𝑥, 𝑃 𝑖 is minimized for all 𝑥∈𝑇. 𝑇 𝑝 𝑖1 𝑝 𝑖2 𝑝 𝑖 𝑝 𝑖3 𝑝 𝑖4 𝑝 𝑖5 𝐸𝑑 𝑝 𝑖 , 𝑃 𝑖 ≤𝐸𝑑 𝑥, 𝑃 𝑖 for all 𝑥∈𝑇 Observation: 𝐸𝑑 𝑥, 𝑃 𝑖 is monotonically increasing if x is moving away from pi
The medians-spanning tree The Medians-Spanning Tree 𝑇 𝑚 is the minimum connected subtree of T that spans all medians. 𝑇 𝑚 𝑝 6 𝑇 𝑝 3 𝑝 1 𝑝 2 𝑝 4 𝑝 5
An observation 𝑇 𝑇 𝑚 All centers are in the medians-spanning tree of T 𝑞 1 𝑞 2 𝑝 3 𝑝 1 𝑝 2 𝑝 4 𝑝 5
A greedy algorithm 𝑇 𝑚 𝑝 6 𝑞 𝑝 7 𝑝 3 𝑝 1 𝑝 2 𝑝 8 𝑝 4 𝑝 5 𝑝 9 𝑝 10 Place centers on 𝑇 𝑚 from bottom to top in the post-order traversal 𝑇 𝑚 𝑟 --- root of 𝑇 𝑚 𝑝 6 Initially, all medians are active. 𝑞 𝑝 7 𝑝 3 𝑝 1 𝑝 2 𝑝 8 𝑝 4 𝑝 5 𝑝 9 𝑝 10 Deactivation: make medians whose uncertain points are covered by 𝑞 inactive
Processing a leaf 𝑇 𝑚 ∙∙∙∙∙∙ 𝑟 𝑐 𝑐 𝑝 𝑗 e 𝑝 𝑖 𝑝 𝑖+1 Test whether a center is necessary on e for active 𝑃 𝑖 Compute c on 𝜋( 𝑝 𝑖 ,r) with 𝐸𝑑 𝑐, 𝑃 i =𝜆 𝑟 𝑇 𝑚 𝜋( 𝑝 𝑖 ,r) c is on e? Y N 𝐸𝑑 𝑐, 𝑃 i =𝜆 𝑐 ∙∙∙∙∙∙ Put a center at c for 𝑃 𝑖 𝑃 𝑖 served by a center not on e 𝑐 e 𝑝 𝑗 Report all uncertain points covered by 𝑐 𝑝 𝑖 𝑝 𝑖+1 c --- a candidate center Deactivation
Processing an internal node Test whether a center is necessary on e for active 𝑃 𝑖1 , 𝑃 𝑖2 , ∙∙∙, 𝑃 𝑖𝑥 Data Structure 𝐴 1 Range-status-query 𝑟 Check whether 𝑻 v has active medians 𝑇 𝑚 𝜋(v,r) Y Data Structure 𝐴 2 Compute c on 𝜋(v,r) with max 𝑖1≤𝑖≤𝑖𝑥 𝐸𝑑 𝑐, 𝑃 i =𝜆 Candidate center 𝑐 Candidate-center-query 𝑐 e v c is on e? Data Structure 𝐴 3 N Y 𝑻 v Coverage-report-query Severed by a center not on e Active medians 𝑝 𝑖1 , 𝑝 𝑖2 , ∙∙∙, 𝑝 𝑖𝑥 Report all uncertain points covered by 𝑐 Deactivation
Designing data structures---Major challenge Preprocessing time Range-status query Deletion 𝑂(𝑀) 𝑂( log 𝑛 ) Data Structure 𝐴 1 Preprocessing time Candidate-center-query Deletion 𝑂(𝑀 log 𝑀 +𝑛 log 2 𝑀) 𝑂( log 𝑛 ) Data Structure 𝐴 2 Preprocessing time Coverage-report-query Deletion 𝑂(𝑀 log 2 𝑀) 𝑂(𝑘 log 𝑛 + log 𝑀 log 𝑛 ) 𝑂( 𝑚 𝑖 log 𝑀 log 2 𝑛) Data Structure 𝐴 3 amortized
A connector-bounded centroid decomposition 𝑇 2 (𝑐) 𝑇 1 (𝑐) 𝒄 c---the centroid of T max{ 𝑇 1 𝑐 , | 𝑇 2 (𝑐)|}≤ 2 𝑇 3 Decomposition Tree 𝛤 T c --- connector of 𝑇 1 𝑐 and 𝑇 2 𝑐 𝑇 1 (𝑐) 𝑇 2 (𝑐)
A connector-bounded centroid decomposition 𝑇 2 ( 𝑐 1 ) 𝑇 1 (𝑐) 𝒄 c 𝑇 2 (𝑐) 𝑇 1 ( 𝑐 1 ) Decomposition Tree 𝛤 T 𝑇 1 (𝑐) 𝑇 2 (𝑐) c, 𝑐 1 --- connectors of 𝑇 1 ( 𝑐 1 ) 𝑐 1 --- connectors of 𝑇 2 ( 𝑐 1 ) 𝑇 1 ( 𝑐 1 ) 𝑇 2 ( 𝑐 1 )
A connector-bounded centroid decomposition 𝑇 1 ( 𝑐 1 ) 𝑇 13 ( 𝑐 4 ) Every subtree of 𝛤 has at most two connectors. 𝑇 1 ( 𝑐 3 ) 𝒄 𝟏 c 𝒄 𝟒 Decomposition Tree 𝛤 𝑇 11 ( 𝑐 4 ) 𝒄 c c 𝒄 𝟑 T c 𝑇 12 ( 𝑐 4 ) 𝑇 1 (𝑐) 𝑇 2 (𝑐) 𝑇 2 ( 𝑐 3 ) 𝑐 4 is the vertex such that 𝑇 1 ( 𝑐 3 ) can be decomposed to three subtrees that contain c, 𝑐 1 , 𝑐 3 , respectively. 𝑇 1 ( 𝑐 1 ) 𝑇 2 ( 𝑐 1 ) Decompose 𝑇 1 ( 𝑐 3 ) at 𝑐 4 𝑇 11 ( 𝑐 4 ) 𝑇 12 ( 𝑐 4 ) 𝑇 13 ( 𝑐 4 ) 𝑇 2 ( 𝑐 3 )
The decomposition tree Γ of T Each node 𝑢 of Γ has at most four children 𝑇 1 𝑇 2 Each node 𝑢 of Γ --- A subtree 𝑇(𝑢) of 𝑇 Every 𝑇(𝑢) has at most two connectors 𝑇 3 𝑇 4 𝑇 5 𝑇 6 Height: 𝑂( log 𝑀 ) # of nodes: 𝑂(𝑀) 𝑢 𝑇(𝑢) ∙∙∙∙∙∙ ∙∙∙∙∙∙
Data structure 𝐴 3 for coverage-report-query Decomposition Tree Γ For every node 𝑢 of Γ 𝐿 𝑢 --- List of all such 𝑃 𝑖 𝑢′ 𝑇(𝑢′) 𝐸𝑑(𝑥,𝑃 𝑖 ) --- Expected distance functions of all 𝑃 𝑖 ∈𝐿(𝑢) with respect to x∈𝑇(𝑢) 𝑢 𝑇(𝑢) 𝑡 𝑢 = |𝐿 𝑢 | ∙∙∙∙∙∙ Coverage-report-query in 𝑇(𝑢) --- 𝑂(𝑘 log 𝑡 𝑢 + log 𝑡 𝑢 ) time For any point x∈𝑇(𝑢), Report all 𝑃 𝑖 ∈𝐿(𝑢) covered by 𝑥 --- all 𝑃 𝑖 ∈𝐿 𝑢 with 𝐸𝑑(𝑥,𝑃 𝑖 )≤𝜆 𝑃 𝑖 --- no location in 𝑇(𝑢) but in 𝑇( 𝑢 ′ )
Coverage-report-query in 𝑇(𝑢) 𝑐 2 Observation: for each 𝑃 𝑖 ∈𝐿(𝑢) 𝐸𝑑 𝑥, 𝑃 𝑖 = 𝜔 𝑖 ( 𝑎 𝑥 + 𝑑 𝑖 𝑏 𝑥 + 𝐷 𝑖 ) a plane in ℝ 3 𝑇(𝑢) 𝑣 𝑥 for each 𝑃 𝑖 ∈𝐿(𝑢), 𝐸𝑑 𝑥, 𝑃 𝑖 ≤𝝀 defines a half-plane in the plane z = 𝝀 𝑐 1 𝑏 𝑥 𝑎 𝑥 𝑥= 𝑎 𝑥 , 𝑏 𝑥 Report all bounding lines above 𝑥 --- report all 𝑃 𝑖 ∈𝐿(𝑢) with 𝐸𝑑 𝑥, 𝑃 𝑖 ≤λ 𝑎 𝑥 --- the distance of 𝑥 to the closest vertex 𝑣 𝑥 on 𝜋( 𝑐 1 , 𝑐 2 ) 𝑏 𝑥 --- the distance of 𝑣 𝑥 to 𝑐 1 𝐸𝑑 𝑥, 𝑃 𝑖1 ≤𝝀 𝑏 𝑥 𝐸𝑑 𝑥, 𝑃 𝑖2 ≤𝝀 L --- the set of 𝑡 𝑢 bounding lines 𝑥 𝐸𝑑 𝑥, 𝑃 𝑖3 ≤𝝀 𝑎 𝑥
Coverage-report-query in 𝑇(𝑢) 𝑐 2 𝑇(𝑢) Report bounding lines of 𝐿 above 𝑥 𝑐 1 Build half-plane range reporting data structure on 𝐿 in 𝑂( 𝑇 𝑢 + 𝑡 𝑢 log 𝑡 𝑢 ) time 𝑥= 𝑎 𝑥 , 𝑏 𝑥 Half-plane range reporting query for 𝑥 𝜑(𝑢) 1. Coverage-report-query in 𝑇(𝑢) --- 𝑂(𝑘 log 𝑡 𝑢 + log 𝑡 𝑢 ) time Report all 𝑃 𝑖 ∈𝐿(𝑢) with 𝐸𝑑 𝑥, 𝑃 𝑖 ≤λ for any 𝑥∈𝑇 𝑢 2. Removing any 𝑃 𝑖 from 𝜑(𝑢) --- 𝑂( log 𝑡 𝑢 ) time
Coverage-report-query on 𝐴 3 𝑇(𝑢), 𝐿(𝑢), 𝜑 𝑢 𝝅 Any point 𝒙 on T A path 𝝅 in Υ 𝑢 𝑂 log 𝑀 nodes --- subtrees 𝑇(𝑢) ∙∙∙∙∙∙ Coverage-report-query at 𝒙 in every 𝑇(𝑢) 𝒙 Report all indices i with 𝐸𝑑(𝑥,𝑃 𝑖 )≤𝜆 --- 𝑂(𝑘 log 𝑛 + log 𝑀 log 𝑛 ) time
Candidate-center-query Coverage-report-query Data structures Preprocessing time Range-status query Deletion 𝑂(𝑀) 𝑂( log 𝑛 ) Data Structure 𝐴 1 Preprocessing time Candidate-center-query Deletion 𝑂(𝑀 log 𝑀 +𝑛 log 2 𝑀) 𝑂( log 𝑛 ) Data Structure 𝐴 2 Preprocessing time Coverage-report-query Deletion 𝑂(𝑀 log 2 𝑀) 𝑂(𝑘 log 𝑛 + log 𝑀 log 𝑛 ) 𝑂( 𝑚 𝑖 log 𝑀 log 𝑛 ) Data Structure 𝐴 3
Thank you! Q&A