1 / 57

Presented by: Chan Kit Yan, Anissa Chau Chun Wai , Vincent Chau Ming Lung, Aaron

On Efficient Spatial Matching Raymond Chi-Wing Wong (the Chinese University of Hong Kong) Yufei Tao (the Chinese University of Hong Kong) Ada Wai-Chee Fu (the Chinese University of Hong Kong) Xiaokui Xiao (the Chinese University of Hong Kong). Presented by: Chan Kit Yan, Anissa

wauna
Download Presentation

Presented by: Chan Kit Yan, Anissa Chau Chun Wai , Vincent Chau Ming Lung, Aaron

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. On Efficient Spatial MatchingRaymond Chi-Wing Wong (the Chinese University of Hong Kong)Yufei Tao (the Chinese University of Hong Kong)AdaWai-Chee Fu (the Chinese University of Hong Kong)Xiaokui Xiao (the Chinese University of Hong Kong) Presented by: Chan Kit Yan, Anissa Chau Chun Wai, Vincent Chau Ming Lung, Aaron TseWai Lam, Forest

  2. Outline • Introduction • Bichromatic Reverse Nearest Neighbor (BRNN) • Problem • Spatial Matching Problem (SPM) • Unweighted SPM • Weighted SPM • Related Work • Closest Pair • Stable Marriage • Algorithm • Chain for Unweighted SPM • Chain for Wighted SPM • Empirical Study • Conclusion

  3. Introduction Bichromatic Reverse Nearest Neighbor (BRNN) • Given • P and O are two sets of objects in the same data space. • Problem • Given an object p  P, a BRNN query finds all the object o  O whose nearest neighbors (NN) in P are p.(There does not exist any object p’  P such that |o, p’| < |o, p|)

  4. Introduction p3, RNN = { } o1, NN in P = { p1 } o2, NN in P = { p1 } p2, RNN = { } p1, RNN = { o1 , o2 , o3 } o3, , NN in P= { p1 }

  5. Introduction The method fails! p3, RNN = { } o1, NN in P = { p1 } o2, NN in P = { p1 } p2, RNN = { } p1, RNN = { o1 , o2 , o3 } o3, , NN in P= { p1 } The total population from o1, o2 and o3 is equal to 14k, which is greater than the capacity of p1.

  6. Introduction • Our Goal • Allocate each estate o  O to the polling-place p  P that • (i) is as near to o as possible, and • (ii) its servicing capacity has not been exhausted in serving other closer estates.

  7. Problem • Spatial Matching Problem (SPM) • Unweighted SPM • Capacity of pi  P = 1 • Population of oj  O = 1 • Weighted SPM • Capacity of pi  P  1 • Population of oj  O  1

  8. Problem • The problem of computing the BRNN set of each object p  P is an instance of weighted SPM, where • p.w = |O| for every p  P and • o.w=1 for every o  O. • SPM can be regarded as a generic version of BRNN search that incorporates serving capacities.

  9. Related Work • Related Work • Closest Pair • Running time = O(|P| x |O|2) • Stable Marriage • A classical problem in Computer Science • Running time = O(|P| x |O|)

  10. Closest Pair • Given • Two sets P and O of objects. • Problem • A closest pair query finds the pair of objects (p, o) whose distance is the smallest among object-pairs in the Cartesian product P x O. • Running Time • O(|P| x |O|) for each query • O(|P| x |O|2) for |O| times

  11. Stable Marriage • Given • Two sets O (for woman) and P (for man) • For each woman o  O, • there is a preference list which sorts the men in descending order of how much o loves them. • For each man p  P, • there is a preference list which sorts the women in descending order of how much p loves them. • Running Time • O(|P| x |O|)

  12. Algorithm • Algorithm • Chain for Unweighted/Weighted SPM - Fairness Result - High Efficiency

  13. p3 o1 o2 p2 o3 p1 Chain For Unweighted/Weighted SPM • Fairness - No Dangling Pair • Definition of Dangling Pair: • 1. |p, o| < the distance between o and some of its partners in A • 2. |p, o| < the distance between p and some of its partners in A

  14. p3 o1 o2 p2 o3 p1 Chain For Unweighted/Weighted SPM Fair • Fairness - No Dangling Pair • Definition of Dangling Pair: • 1. |p, o| < the distance between o and some of its partners in A • 2. |p, o| < the distance between p and some of its partners in A

  15. p3 o1 o2 p2 o3 p1 Chain For Unweighted/Weighted SPM Not Fair • Fairness - No Dangling Pair • Definition of Dangling Pair: • 1. |p, o| < the distance between o and some of its partners in A • 2. |p, o| < the distance between p and some of its partners in A

  16. Chain For Unweighted/Weighted SPM • Algorithm Chain use two techniques - Bichromatic mutual NN Search { Let A’be a fair assignment for the SPM with P’ and O’. } - Then, A’U {(p, o)} is a fair assignment for the SPM with P and O. • Definition of Bichromatic mutual NN: For an object p  P and an object o  O • 1. p is NN of o in P • 2. o is NN of p in O NN = Nearest Neighbor

  17. Chain For Unweighted/Weighted SPM • Algorithm Chain use two techniques - Bichromatic mutual NN Search { Let A’be a fair assignment for the SPM with P’ and O’. } - Then, A’U {(p, o)} is a fair assignment for the SPM with P and O. • Prove of A’U {(p, o)} is a fair assignment : Prove by Contradiction, assume it is a unfair assignment: • 1. The dangling pointer must include p or o (not both) • 2. |p’,o| < |p , o|, contradicting p & o are mutual NNs. • 3. |p,o’| < |p , o|, contradicting p & o are mutual NNs.

  18. Chain For Unweighted/Weighted SPM • Algorithm for Unweighted Chain: 1) Randomly pick a point, put it into a list. 2) Find NN, and then put it into the list. 3) If the first mutual NN is found, remove them. 4) Back to step 2….. • Example: Potter Hermione Ronald

  19. Chain For Unweighted/Weighted SPM • Algorithm for Unweighted Chain: 1) Randomly pick a point, put it into a list. 2) Find NN, and then put it into the list. 3) If the first mutual NN is found, remove them. 4) Back to step 2….. • Example: Potter Hermione Ronald

  20. Chain For Unweighted/Weighted SPM • Algorithm for Unweighted Chain: 1) Randomly pick a point, put it into a list. 2) Find NN, and then put it into the list. 3) If the first mutual NN is found, remove them. 4) Back to step 2….. • Example: Potter Hermione Ronald

  21. Chain For Unweighted/Weighted SPM • Algorithm for Unweighted Chain: 1) Randomly pick a point, put it into a list. 2) Find NN, and then put it into the list. 3) If the first mutual NN is found, remove them. 4) Back to step 2….. • Example: Potter Hermione Ronald

  22. Assignment = null Chain For Unweighted/Weighted SPM • Algorithm for Unweighted Chain: 1) Randomly pick a point, put it into a list. 2) Find NN, and then put it into the list. 3) If the first mutual NN is found, remove until one of the weight = 0. 4) Back to Step 2….. • Example: boys2 girls1 boys1 10 10 5

  23. Assignment = null Chain For Unweighted/Weighted SPM • Algorithm for Unweighted Chain: 1) Randomly pick a point, put it into a list. 2) Find NN, and then put it into the list. 3) If the first mutual NN is found, remove until one of the weight = 0. 4) Back to Step 2….. • Example: boys2 girls1 boys1 10 10 5

  24. Assignment = { (boys1, girls1, 5) } Chain For Unweighted/Weighted SPM • Algorithm for Unweighted Chain: 1) Randomly pick a point, put it into a list. 2) Find NN, and then put it into the list. 3) If the first mutual NN is found, remove until one of the weight = 0. 4) Back to Step 2….. • Example: boys2 girls1 5 10

  25. Assignment = { (boys1, girls1, 5) (boys2, girls1, 5)} Chain For Unweighted/Weighted SPM • Algorithm for Unweighted Chain: 1) Randomly pick a point, put it into a list. 2) Find NN, and then put it into the list. 3) If the first mutual NN is found, remove until one of the weight = 0. 4) Back to Step 2….. • Example: boys2 5

  26. Cost of CHAIN for un-weighted SPM • Theorem 1: Chain performs at most 3|O| NN queries, and exactly 2 |O| object deletions. Proof : At most 3|O| NN queries • For each couple (p,o)  A, at least 2 queries • Each couple (p,o) found by Chain must appear at the end of the chain. • Assume that P appears as the last object of the chain O appears as the second last object of the chain

  27. Cost of CHAIN for un-weighted SPM For each couple (p,o)  A, Case A: 2 NN queries ( no previous object, i.e. p’)  1 query from p  1 query from o Case B: 3 NN queries  1 query from p  1 query from o  1 query from p’ where p’ is the previous object before o along the chain

  28. Cost of CHAIN for un-weighted SPM P1 find O2  1 queryO2 find P2  1 queryP2 find O2  1 query  Couple (P2, O2) is assigned Case B P1 find O4  1 queryO4 find P4  1 queryP4 find O4  1 query  Couple (P4, O4) is assigned Case B Case A O1 find P1  1 queryP1 find O1  1 query  Couple (P1, O1) is assigned

  29. Cost of CHAIN for un-weighted SPM Since |P| > |O|,  |O| couple in assignment Thus, At most 3|O| NN queries Proof:exactly 2 |O| object deletions When find a couple,  delete 1 object from P  delete 1 object from O Since |O| couple in assignment Thus, exactly 2 |O| object deletions

  30. Cost of CHAIN for weighted SPM • Theorem 3: Weighted Chain performs at most 3(|P| + |O|) NN queries, and at most |P| + |O| object deletions. Proof: At most 3(|P| + |O|) NN queries - 3 NN queries for each extended couple (p,o,w) - Remove only one object from its origin dataset  total No. of couples (p,o,w) <= |P| + |O| Thus, at most 3(|P| + |O|) NN queries Proof: At most |P| + |O| deletions - Remove only one object from its origin dataset Thus, total deletions <= |P| + |O|

  31. Running time of Chain (|N|) = complexity of NN query (|N|) = object deletion For Un-weighted SPM Running time of Chain = O(|O|. ((|P|)+(|P|))) If randomized technique (one of NN queries) used, (|P|) = log2 (|P|) (|P|) = log(|P|) Thus, in this case, time complexity of Chain = O(|O|. logO(1)|P|)

  32. Running time of Chain For Weighted SPM Running time of Chain = O(|O|+|P|. ((|P|)+(|P|)+ (|O|)+(|O|))) If randomized technique (one of NN queries) used, (|P|) = log2 (|P|) (|P|) = log(|P|) Thus, in this case, time complexity of Chain = O((|O|+|P|). (logO(1)|P| + logO(1)|O|))

  33. Empirical Study

  34. Empirical Study

  35. Empirical Study

  36. Empirical Study

  37. Empirical Study

  38. Empirical Study

  39. Empirical Study

  40. Empirical Study

  41. Empirical Study

  42. Empirical Study

  43. Empirical Study

  44. Empirical Study

  45. Empirical Study

  46. Empirical Study

  47. Empirical Study

  48. Empirical Study

  49. Empirical Study

  50. Empirical Study

More Related