Skip to main content

The K Group Nearest-Neighbor Query on Non-indexed RAM-Resident Data

  • Conference paper
  • First Online:

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 582))

Abstract

Data sets that are used for answering a single query only once (or just a few times) before they are replaced by new data sets appear frequently in practical applications. The cost of buiding indexes to accelerate query processing would not be repaid for such data sets. We consider an extension of the popular (K) Nearest-Neighbor Query, called the (K) Group Nearest Neighbor Query (GNNQ). This query discovers the (K) nearest neighbor(s) to a group of query points (considering the sum of distances to all the members of the query group) and has been studied during recent years, considering data sets indexed by efficient spatial data structures. We study (K) GNNQs, considering non-indexed RAM-resident data sets and present an existing algorithm adapted to such data sets and two Plane-Sweep algorithms, that apply optimizations emerging from the geometric properties of the problem. By extensive experimentation, using real and synthetic data sets, we highlight the most efficient algorithm.

G. Roumelis, M. Vassilakopoulos, A. Corral and Y. Manolopoulos—Work funded by the GENCENG project (SYNERGASIA 2011 action, supported by the European Regional Development Fund and Greek National Funds); project number 11SYN_ 8_1213.

A. Corral—Supported by the MINECO research project [TIN2013-41576-R].

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    This paper is a post proceedings enhanced version of [6], where the last two algorithms of the current paper are presented and compared.

References

  1. Rigaux, P., Scholl, M., Voisard, A.: Spatial Databases - with Applications to GIS. Elsevier, San Francisco (2002)

    Google Scholar 

  2. Preparata, F.P., Shamos, M.I.: Computational Geometry - An Introduction. Springer, New York (1985)

    Book  Google Scholar 

  3. Hinrichs, K., Nievergelt, J., Schorn, P.: Plane-sweep solves the closest pair problem elegantly. Inf. Process. Lett. 26, 255–261 (1988)

    Article  MathSciNet  Google Scholar 

  4. Jacox, E.H., Samet, H.: Spatial join techniques. ACM Trans. Database Syst. 32, 7 (2007)

    Article  Google Scholar 

  5. Roumelis, G., Vassilakopoulos, M., Corral, A., Manolopoulos, Y.: A new plane-sweep algorithm for the K-closest-pairs query. In: Geffert, V., Preneel, B., Rovan, B., Štuller, J., Tjoa, A.M. (eds.) SOFSEM 2014. LNCS, vol. 8327, pp. 478–490. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  6. Roumelis, G., Vassilakopoulos, M., Corral, A., Manolopoulos, Y.: Plane-sweep algorithms for the k group nearest-neighbor query. In: GISTAM Conference, pp. 83–93. Scitepress (2015)

    Google Scholar 

  7. Papadias, D., Shen, Q., Tao, Y., Mouratidis, K.: Group nearest neighbor queries. In: ICDE Conference, pp. 301–312. IEEE (2004)

    Google Scholar 

  8. Papadias, D., Tao, Y., Mouratidis, K., Hui, C.K.: Aggregate nearest neighbor queries in spatial databases. ACM Trans. Database Syst. 30, 529–576 (2005)

    Article  Google Scholar 

  9. Li, H., Lu, H., Huang, B., Huang, Z.: Two ellipse-based pruning methods for group nearest neighbor queries. In: ACM-GIS Conference, pp. 192–199. ACM (2005)

    Google Scholar 

  10. Luo, Y., Chen, H., Furuse, K., Ohbo, N.: Efficient methods in finding aggregate nearest neighbor by projection-based filtering. In: Gervasi, O., Gavrilova, M.L. (eds.) ICCSA 2007, Part III. LNCS, vol. 4707, pp. 821–833. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  11. Namnandorj, S., Chen, H., Furuse, K., Ohbo, N.: Efficient bounds in finding aggregate nearest neighbors. In: Bhowmick, S.S., Küng, J., Wagner, R. (eds.) DEXA 2008. LNCS, vol. 5181, pp. 693–700. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  12. Hashem, T., Kulik, L., Zhang, R.: Privacy preserving group nearest neighbor queries. In: EDBT Conference, pp. 489–500. ACM (2010)

    Google Scholar 

  13. Zhu, L., Jing, Y., Sun, W., Mao, D., Liu, P.: Voronoi-based aggregate nearest neighbor query processing in road networks. In: ACM-GIS Conference, pp. 518–521. ACM (2010)

    Google Scholar 

  14. Jiang, T., Gao, Y., Zhang, B., Liu, Q., Chen, L.: Reverse top-k group nearest neighbor search. In: Wang, J., Xiong, H., Ishikawa, Y., Xu, J., Zhou, J. (eds.) WAIM 2013. LNCS, vol. 7923, pp. 429–439. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  15. Zhang, D., Chan, C., Tan, K.: Nearest group queries. In: SSDBM Conference, p. 7. ACM (2013)

    Google Scholar 

  16. Lian, X., Chen, L.: Probabilistic group nearest neighbor queries in uncertain databases. IEEE Trans. Knowl. Data Eng. 20, 809–824 (2008)

    Article  Google Scholar 

  17. Li, J., Wang, B., Wang, G., Bi, X.: Efficient processing of probabilistic group nearest neighbor query on uncertain data. In: Bhowmick, S.S., Dyreson, C.E., Jensen, C.S., Lee, M.L., Muliantara, A., Thalheim, B. (eds.) DASFAA 2014, Part I. LNCS, vol. 8421, pp. 436–450. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  18. Ahn, H.-K., Bae, S.W., Son, W.: Group nearest neighbor queries in the L \(_\text{1 }\) plane. In: Chan, T.-H.H., Lau, L.C., Trevisan, L. (eds.) TAMC 2013. LNCS, vol. 7876, pp. 52–61. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Antonio Corral .

Editor information

Editors and Affiliations

Appendix

Appendix

Lemma: The sum of dx-distances between one given point \(p(x,y) \in P\) and all points of the query set Q (sumdx(pQ)):

A :

Is minimized at the median point q[m] (where q[m] is the array notation of \(q_m\)),

B :

For all \(p.x \ge q[m].x\), sumdx is constant or increasing with the increment of x, and

C :

For all \(p.x < q[m].x\), sumdx is increasing while x decreases.

Fig. 5.
figure 5

The point p has K query points on the left and the point \(p'\) \((p'.x > p.x)\) has \(K'\) query points on the left.

Proof: Property A has been proved in [18]. To prove property B, for every point \(p \in P\) and \(q \in Q\), we use

figure h

If the point p has K query points on the left (\(p.x < q[K-1].x\)) and \(M-K\) query points on the right (Fig. 5), then:

For another point \(p' \in P\) with \(p'.x > p.x\) which has \(K'\) query points on the left (Fig. 5) and \(M-K'\) query points on the right, it is:

The difference between dx-distances of the points \(p'\) and p is: . If the set of the query points Q has cardinality M and this is an even number then there are two medians q[m1] and q[m2], while if M is odd then there is only one median point q[m].

B.1 M is even and \(q[m1].x \le p.x < p'.x\) then \(M \le 2K \le 2K'\) so \((2K-M)\ge 0\), \((p'.x-p.x) \ge 0\) and \((K'-K)p'.x - \displaystyle \sum _{i=K}^{K'-1} q[i].x \ge 0\) because \(p'.x \ge q[i].x\), whereas \(K \le i \le K'\)

B.2 All of the above apply to M if it is odd and it is only one median point \(q[m].x \le p.x < p'.x\). It is proven that for all points p on the right of the median query point the sum of dx-distances is increasing.

C For both types of cardinality of the query set Q and for the case \(p.x < p'.x < q[m].x\) it is: \( \varDelta sumdx = (2K-M)(p'.x-p.x) + 2(K'-K)p'.x \ - 2 \displaystyle \sum _{i=K}^{K'-1} q[i].x \ \le (2K-M)(p'.x-p.x) + 2(K'-K)p'.x \ - 2(K'-K)p.x \ = 2(K-M)(p'.x-p.x) \ + 2(K'-K)(p'.x-p.x) \ = (2K-M+2K'-2K)(p'.x-p.x) \ = (2K'-M)(p'.x-p.x) < 0 \). It is proven that for all points p on the left of the median query point the sum of dx-distances is strictly decreasing.    \(\square \)

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Roumelis, G., Vassilakopoulos, M., Corral, A., Manolopoulos, Y. (2016). The K Group Nearest-Neighbor Query on Non-indexed RAM-Resident Data. In: Grueau, C., Gustavo Rocha, J. (eds) Geographical Information Systems Theory, Applications and Management. GISTAM 2015. Communications in Computer and Information Science, vol 582. Springer, Cham. https://doi.org/10.1007/978-3-319-29589-3_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-29589-3_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-29588-6

  • Online ISBN: 978-3-319-29589-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics