Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Efficient Algorithms for Optimal Location Queries in Road Networks Zitong Chen (Sun Yat-Sen University) Yubao Liu (Sun Yat-Sen University) Raymond Chi-Wing.

Similar presentations


Presentation on theme: "1 Efficient Algorithms for Optimal Location Queries in Road Networks Zitong Chen (Sun Yat-Sen University) Yubao Liu (Sun Yat-Sen University) Raymond Chi-Wing."— Presentation transcript:

1 1 Efficient Algorithms for Optimal Location Queries in Road Networks Zitong Chen (Sun Yat-Sen University) Yubao Liu (Sun Yat-Sen University) Raymond Chi-Wing Wong (Hong Kong University of Science and Technology) Jiamin Xiong (Sun Yat-Sen University) Ganlin Mai (Sun Yat-Sen University) Cheng Long (Hong Kong University of Science and Technology) Presented by Raymond Chi-Wing Wong Prepared by Raymond Chi-Wing Wong

2 2 Outline 1.Introduction 2.Problem Definition 3.Related Work 4.Algorithm 5.Empirical Study 6.Conclusion

3 1. Introduction S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s2s2 s1s1 3

4 1. Introduction S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 Suppose that we want to build a new hospital so that the distance between each residential estate to its nearest hospital is as small as possible. nearest hospital = s 1 nearest hospital = s 2 5 2 4 5 s2s2 6 maximum distance between a residential estate and its nearest hospital = 6 Where should we set up?

5 1. Introduction S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 Suppose that we want to build a new hospital so that the distance between each residential estate to its nearest hospital is as small as possible. Suppose that we build a new hospital here nearest hospital = s 1 nearest hospital = s 2 s 5 2 4 5 s2s2 6 maximum distance between a residential estate and its nearest hospital = 6 Placement 1 Observation 1: Placing a new hospital at some locations cannot reduce the maximum distance between a residential estate and its nearest hospital Placement 1 6

6 1. Introduction S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 Suppose that we want to build a new hospital so that the distance between each residential estate to its nearest hospital is as small as possible. Suppose that we build a new hospital here nearest hospital = s 1 nearest hospital = s 2 s 5 2 4 5 s2s2 6 s 5 s 4 maximum distance between a residential estate and its nearest hospital = 6 5 2 3 2 2 Placement 2 Observation 1: Placing a new hospital at some locations cannot reduce the maximum distance between a residential estate and its nearest hospital Observation 2: Placing a new hospital at some locations can reduce the maximum distance between a residential estate and its nearest hospital Placement 1 6 Placement 2 5

7 1. Introduction S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 Suppose that we want to build a new hospital so that the distance between each residential estate to its nearest hospital is as small as possible. Suppose that we build a new hospital here nearest hospital = s 1 nearest hospital = s 2 s 5 2 4 5 s2s2 6 s 4.5 s maximum distance between a residential estate and its nearest hospital = 6 4.5 2 2.5 2 Placement 3 Observation 1: Placing a new hospital at some locations cannot reduce the maximum distance between a residential estate and its nearest hospital Observation 2: Placing a new hospital at some locations can reduce the maximum distance between a residential estate and its nearest hospital Placement 1 6 Placement 2 5 Placement 3 4.5 Which placement is better? Placement 3

8 1. Introduction S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 Suppose that we want to build a new hospital so that the distance between each residential estate to its nearest hospital is as small as possible. Suppose that we build a new hospital here nearest hospital = s 1 nearest hospital = s 2 s 5 2 4 5 s2s2 6 s 4.5 s maximum distance between a residential estate and its nearest hospital = 6 4.5 2 2.5 2 Placement 3 Problem: We want to find a location for the new hospital so that the maximum distance between a residential estate and its nearest hospital is minimized. Optimal location query The MinMax Query Emergency applications (such as hospitals, police stations and fire stations)

9 9 Outline 1.Introduction 2.Problem Definition 3.Related Work 4.Algorithm 5.Empirical Study 6.Conclusion

10 2. Problem Definition After we define the problem, we need to give some concepts 10 Problem: We want to find a location for the new hospital so that the maximum distance between a residential estate and its nearest hospital is minimized.

11 2. Problem Definition S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 Suppose that we want to build a new hospital so that the distance between each residential estate to its nearest hospital is as small as possible. nearest hospital = s 1 nearest hospital = s 2 5 2 4 5 s2s2 6 Nearest location component (NLC) NLC of c 1 NLC of c 2 c 1.dist c 2.dist A set of points on the road network with distances at most c 1.dist A set of points on the road network with distances at most c 2.dist Problem: We want to find a location for the new hospital so that the maximum distance between a residential estate and its nearest hospital is minimized.

12 12 Outline 1.Introduction 2.Problem Definition 3.Related Work 4.Algorithm 5.Empirical Study 6.Conclusion

13 3. Related Work Optimal Location Queries with Non-Road Network Setting Optimal Location Queries with Road Network Setting Best-known Method Proposed in ICDE 2011 13

14 3. Related Work Best-known Method Proposed in ICDE 2011 It is very time-consuming For each client/server, it creates a vertex in the road network It creates a larger road network It solves the optimal location query with this larger road network 14 However, our MinMax-Alg does not need to generate this larger road network

15 3. Related Work Best-known Method Proposed in ICDE 2011 Time Complexity O((|V|+|S|+|C|) 2 log (|V|+|S|+|C|)) where |V| is the number of vertices, |S| is the number of servers and |C| is the number of clients 15 The time complexity of our method = O(  |V|log|V|+|V||C|log|C|) where  is a small number at most |C| (e.g., in SF,  = 27 but |C| = 300k)

16 3. Related Work In our experiment, Our MinMax-Alg runs within 3 minutes only The best-known method runs for more than 10 hours At least 200 times faster 16

17 17 Outline 1.Introduction 2.Problem Definition 3.Related Work 4.Algorithm 5.Empirical Study 6.Conclusion

18 4. Algorithm S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 nearest hospital = s 1 nearest hospital = s 2 5 2 4 5 s2s2 6 NLC of c 1 NLC of c 2 c 1.dist c 2.dist Assume that all clients are sorted in descending order of their costs. That is, Cost(c 1 ) ≥ Cost(c 2 ) Cost(c 1 ) Cost(c 2 )

19 4. Algorithm S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 nearest hospital = s 1 nearest hospital = s 2 5 2 4 5 s2s2 6 c 1.dist c 2.dist NLC(c 1, 5) NLC(c 2, 5) Shrinking NLC of c 1 wrt 5 Shrinking NLC of c 2 wrt 5 e.g.1 A set of points on the road network with distances at most 5

20 4. Algorithm Given an integer m in [1, 2] and a non- negative real number C, the (m, C)-critical intersection is defined to be 20 No. of clients

21 4. Algorithm S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 nearest hospital = s 1 nearest hospital = s 2 5 2 4 5 s2s2 6 c 1.dist c 2.dist NLC(c 1, 5) NLC(c 2, 5) Shrinking NLC of c 1 wrt 5 Shrinking NLC of c 2 wrt 5 e.g.1 (m, C)-Critical Intersection m = 2 C = 5 (2, 5)-Critical Intersection = It can be re-written as (2, Cost(c 2 ))-Critical Intersection Note that Cost(c 2 )=5

22 4. Algorithm The critical number denoted by m o is defined to be the greatest integer in [1, 2] such that (m o, Cost(c m o ))-critical intersection is non-empty. 22 No. of clients m = 1 Is the (1, Cost(c 1 ))-Critical Intersection non-empty?Yes m = 2 Is the (2, Cost(c 2 ))-Critical Intersection non-empty? Yes e.g. Conclusion: 2 is the critical number m o

23 4. Algorithm S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 nearest hospital = s 1 nearest hospital = s 2 5 2 4 5 s2s2 6 c 1.dist c 2.dist NLC(c 1, 5) NLC(c 2, 5) Shrinking NLC of c 1 wrt 5 Shrinking NLC of c 2 wrt 5 e.g.1 (m, C)-Critical Intersection m = 2 C = 5 (2, 5)-Critical Intersection = It can be re-written as (2, Cost(c 2 ))-Critical Intersection Note that Cost(c 2 )=5 2 is the greatest integer such that (2, Cost(c 2 ))- critical intersection is non- empty. 2 is the critical number m o.

24 4. Algorithm Lemma: There exists an optimal location p o in the (m o, Cost(c m o ))-critical intersection. 24 In our running example, we know that 2 is the critical number m o. According to this lemma, there exists an optimal location p o in the (2, Cost(c 2 ))-critical intersection.

25 4. Algorithm S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 nearest hospital = s 1 nearest hospital = s 2 5 2 4 5 s2s2 6 c 1.dist c 2.dist NLC(c 1, 5) NLC(c 2, 5) e.g.1 (2, Cost(c 2 ))-Critical Intersection We know that 2 is the critical number. According to this lemma, there exists an optimal location p o in the (2, Cost(c 2 ))-critical intersection.

26 4. Algorithm Two-Step Algorithm Step 1 (Finding Critical Number m o ) Find the critical number m o Step 2 (How to Find Optimal Location in Critical Intersection) Find the optimal location in the (m o, Cost(c m o ))- critical intersection 26

27 4. Algorithm Enhancement When we encounter some scenarios, we do not need to perform Step 2 (which can speed up the computation) Details are skipped 27

28 28 Outline 1.Introduction 2.Problem Definition 3.Related Work 4.Algorithm 5.Empirical Study 6.Conclusion

29 5. Empirical Study Road Network SF (San Francisco) (High Resolution) 174,955 vertices 223,000 edges 1000 servers 300,000 clients 29

30 5. Empirical Study Measurements Execution Time Memory Algorithms MinMax-Alg best-known 30

31 5. Empirical Study 31

32 5. Empirical Study 32

33 33 Outline 1.Introduction 2.Problem Definition 3.Related Work 4.Algorithm 5.Empirical Study 6.Conclusion

34 Study the Optimal Location Query MinMax Query Propose an efficient algorithm which is much faster than the best-known algorithm (more than 200 times faster in some experiments) 34

35 6. Conclusion We studied Three Extensions Optimal Location Queries with Multiple Locations Optimal Location Queries on 3D Terrain Optimal Location Queries with another cost (Maximize the total number of clients attracted by servers) 35

36 Q&A 36

37 37

38 5. Empirical Study Road Network SF (San Francisco) (High Resolution) 174,955 vertices 223,000 edges 1000 servers 300,000 clients CA (California) (Low Resolution) 21,047 vertices 21,692 edges 250 servers 40,000 clients 38

39 5. Empirical Study Two Sets of Experiments Experiments for the MinMax query Experiments for the MaxSum query 39

40 5. Empirical Study Second Set: Experiment for the MaxSum query 40

41 4. Algorithm S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 nearest hospital = s 1 nearest hospital = s 2 5 2 4 5 s2s2 6 c 1.dist c 2.dist NLC(c 1, 3) NLC(c 2, 3) Shrinking NLC of c 1 wrt 3 Shrinking NLC of c 2 wrt 3 e.g.2 A set of points on the road network with distances at most 3

42 4. Algorithm S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 nearest hospital = s 1 nearest hospital = s 2 5 2 4 5 s2s2 6 c 1.dist c 2.dist NLC(c 1, 3) NLC(c 2, 3) Shrinking NLC of c 1 wrt 3 Shrinking NLC of c 2 wrt 3 e.g.2 (m, C)-Critical Intersection m = 2 C = 3 (2, 3)-Critical Intersection =

43 4. Algorithm Concepts Cost Shrinking NLC Critical Intersection Critical Number Algorithm Enhancement 43

44 4. Algorithm Enhancement Concept Method 44

45 4. Algorithm We define R to be the (m o, Cost(c m o -1 ))- critical intersection. 45

46 4. Algorithm Enhancement Concept Method 46

47 4. Algorithm Lemma: Suppose that m o < n. If R is non-empty, (1) cost o = Cost(c m o +1 ), and (2) when a new server is set up at any location in R, the maximum cost of a client is equal to cost o. If R is empty, then Cost(c m o +1 ) < cost o <= Cost(c m o ) 47

48 4. Algorithm Two-Step Algorithm Step 1 (Finding Critical Number m o ) Find the critical number m o Step 2 (a) If m o < n, then we check whether R is empty or not. If not, we immediately return R. If yes, we find the optimal location in the (m o, Cost(c m o ))-critical intersection Step 2 (b) We find the optimal location in the (m o, Cost(c m o ))-critical intersection 48

49 4. Algorithm Step 1 is straightforward Step 2 is described as follows. 49

50 4. Algorithm S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 nearest hospital = s 1 nearest hospital = s 2 5 2 4 5 s2s2 6 c 1.dist c 2.dist NLC(c 1, 5) NLC(c 2, 5) e.g.1 (2, Cost(c 2 ))-Critical Intersection p1p1 p2p2 d(p 1, p) d(c, p) 0 0.51.0 1.5 4.0 5.0 6.0 3.0 2.0 1.0 p1p1 p2p2

51 4. Algorithm S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 nearest hospital = s 1 2 4 5 s2s2 6 c 1.dist NLC(c 1, 5) e.g.1 (2, Cost(c 2 ))-Critical Intersection p1p1 p2p2 c1c1 d(p 1, p) d(c, p) 0 0.51.0 1.5 4.0 5.0 6.0 3.0 2.0 1.0 p1p1 p2p2 d(c 1, p 1 ) = 5 d(c 1, p 2 ) = 4.5

52 4. Algorithm S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 nearest hospital = s 2 5 2 4 5 s2s2 c 2.dist nearest hospital = s 1 6 c 1.dist NLC(c 1, 5) NLC(c 2, 5) e.g.1 (2, Cost(c 2 ))-Critical Intersection p1p1 p2p2 c2c2 c1c1 d(p 1, p) d(c, p) 0 0.51.0 1.5 4.0 5.0 6.0 3.0 2.0 1.0 p1p1 p2p2 d(c 2, p 1 ) = 4 d(c 2, p 2 ) = 4.5

53 4. Algorithm S = {s 1, s 2 } C = {c 1, c 2 } hospitals residential estates v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 c1c1 c2c2 s1s1 nearest hospital = s 2 5 2 4 5 s2s2 c 2.dist nearest hospital = s 1 6 c 1.dist NLC(c 1, 5) NLC(c 2, 5) e.g.1 (2, Cost(c 2 ))-Critical Intersection p1p1 p2p2 c2c2 c1c1 d(p 1, p) d(c, p) 0 0.51.0 1.5 4.0 5.0 6.0 3.0 2.0 1.0 Maximum distance between a client and its closest server p1p1 p2p2 d(c 2, p 1 ) = 4 d(c 2, p 2 ) = 4.5 Find the point along this line with the smallest d(c, p) value

54 4. Algorithm 54 c2c2 c1c1 d(p 1, p) d(c, p) 0 0.51.0 1.5 4.0 5.0 6.0 3.0 2.0 1.0 c2c2 c1c1 d(p 1, p) d(c, p) 0 0.51.0 1.5 4.0 5.0 6.0 3.0 2.0 1.0 c3c3 p1p1 p2p2 p1p1 p2p2


Download ppt "1 Efficient Algorithms for Optimal Location Queries in Road Networks Zitong Chen (Sun Yat-Sen University) Yubao Liu (Sun Yat-Sen University) Raymond Chi-Wing."

Similar presentations


Ads by Google