Skip to main content

Adaptive Data Structures for 2D Dominance Colored Range Counting

  • Conference paper
  • First Online:
Algorithms and Data Structures (WADS 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14079))

Included in the following conference series:

  • 633 Accesses

Abstract

We propose an optimal adaptive data structure for 2D dominance colored range counting in the word RAM model; namely, for n colored points in two-dimensional rank space, we present a linear space data structure that supports each query in \(O(1+\log _{w} k)\) time, where w denotes the number of bits in a word and k denotes the number of distinct colors in the query range. To this end, we design adaptive data structures for 2D 3-sided stabbing counting. Previously, in the orthogonal colored counting problems, the adaptive data structure is only known for 1D [TODS’2014].

This work was supported by NSERC of Canada.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.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

Institutional subscriptions

Notes

  1. 1.

    In rank space, all \(n'\) rectangles lie on a \(2n'\times n'\) grid, and there is no two rectangles that share the same \(x_1\)-, \(x_2\)-, or \(y_2\)-coordinates.

References

  1. Chan, T.M., He, Q., Nekrich, Y.: Further results on colored range searching. In: 36th International Symposium on Computational Geometry, SoCG 2020, vol. 164, pp. 1–15. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2020). https://doi.org/10.4230/LIPICS.SOCG.2020.28

  2. Chan, T.M., Larsen, K.G., Pătraşcu, M.: Orthogonal range searching on the RAM, revisited. In: 27th International Symposium on Computational Geometry, SoCG 2011, pp. 1–10. ACM (2011). https://doi.org/10.1145/1998196.1998198

  3. Chan, T.M., Nekrich, Y.: Better data structures for colored orthogonal range reporting. In: Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 627–636. Society for Industrial and Applied Mathematics (2020). https://doi.org/10.1137/1.9781611975994.38

  4. Chan, T.M., Wilkinson, B.T.: Adaptive and approximate orthogonal range counting. ACM Trans. Algorithms 12(4), 1–15 (2016). https://doi.org/10.1145/2830567

    Article  MathSciNet  MATH  Google Scholar 

  5. Edelsbrunner, H., Overmars, M.H.: On the equivalence of some rectangle problems. Inf. Process. Lett. 14(3), 124–127 (1982). https://doi.org/10.1016/0020-0190(82)90068-0

    Article  MathSciNet  MATH  Google Scholar 

  6. El-Zein, H., Munro, J.I., Nekrich, Y.: Succinct color searching in one dimension. In: 28th International Symposium on Algorithms and Computation (ISAAC 2017), vol. 92, pp. 1–11. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2017). https://drops.dagstuhl.de/opus/volltexte/2017/8209/

  7. Fredman, M.L., Willard, D.E.: BLASTING through the information theoretic barrier with FUSION TREES. In: Proceedings of the twenty-second annual ACM symposium on Theory of computing - STOC ’90. pp. 1–7. ACM Press (1990). DOI: https://doi.org/10.1145/100216.100217

  8. Gao, Y., He, M.: Space efficient two-dimensional orthogonal colored range counting. In: 29th Annual European Symposium on Algorithms (ESA 2021), vol. 204, pp. 1–17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2021). https://doi.org/10.4230/LIPICS.ESA.2021.46

  9. Gao, Y., He, M.: Faster path queries in colored trees via sparse matrix multiplication and min-plus product. In: 30th Annual European Symposium on Algorithms (ESA 2022), vol. 244, pp. 1–15. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2022). https://doi.org/10.4230/LIPICS.ESA.2022.59

  10. Grossi, R., Vind, S.: Colored range searching in linear space. In: Ravi, R., Gørtz, I.L. (eds.) SWAT 2014. LNCS, vol. 8503, pp. 229–240. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08404-6_20

    Chapter  Google Scholar 

  11. Gupta, P., Janardan, R., Smid, M.: Further results on generalized intersection searching problems: counting, reporting, and dynamization. J. Algorithms 19(2), 282–317 (1995). https://doi.org/10.1006/jagm.1995.1038

    Article  MathSciNet  MATH  Google Scholar 

  12. Gupta, P., Janardan, R., Rahul, S., Smid, M.: Computational geometry: generalized (or colored) intersection searching. In: Handbook of Data Structures and Applications, pp. 1043–1058. Chapman and Hall/CRC (2018)

    Google Scholar 

  13. Gupta, P., Janardan, R., Smid, M.: Algorithms for generalized halfspace range searching and other intersection searching problems. Comput. Geom. 6(1), 1–19 (1996). https://doi.org/10.1016/0925-7721(95)00012-7

    Article  MathSciNet  MATH  Google Scholar 

  14. He, M., Kazi, S.: Data structures for categorical path counting queries. Theoret. Comput. Sci. 938, 97–111 (2022). https://doi.org/10.1016/j.tcs.2022.10.011

    Article  MathSciNet  MATH  Google Scholar 

  15. JaJa, J., Mortensen, C.W., Shi, Q.: Space-efficient and fast algorithms for multidimensional dominance reporting and counting. In: Fleischer, R., Trippen, G. (eds.) ISAAC 2004. LNCS, vol. 3341, pp. 558–568. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30551-4_49

    Chapter  MATH  Google Scholar 

  16. Jørgensen, A.G., Larsen, K.G.: Range selection and median: tight cell probe lower bounds and adaptive data structures. In: Proceedings of the Twenty-Second Annual ACM-SIAM Symposium on Discrete Algorithms. Society for Industrial and Applied Mathematics (2011). https://doi.org/10.1137/1.9781611973082.63

  17. Kaplan, H., Rubin, N., Sharir, M., Verbin, E.: Efficient colored orthogonal range counting. SIAM J. Comput. 38(3), 982–1011 (2008). https://doi.org/10.1137/070684483

    Article  MathSciNet  MATH  Google Scholar 

  18. Kaplan, H., Sharir, M., Verbin, E.: Colored intersection searching via sparse rectangular matrix multiplication. In: Proceedings of the Twenty-Second Annual Symposium on Computational Geometry. ACM (2006). https://doi.org/10.1145/1137856.1137866

  19. Nekrich, Y.: Efficient range searching for categorical and plain data. ACM Trans. Database Syst. 39(1), 1–21 (2014). https://doi.org/10.1145/2543924

    Article  MathSciNet  MATH  Google Scholar 

  20. Rahul, S.: Approximate range counting revisited. J. Comput. Geom. 12, 40–69 (2021). https://doi.org/10.20382/JOCG.V12I1A3

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgments

The author is thankful to Dr. Meng He for fruitful discussions and suggestions on this project. The author would like to thank the anonymous reviewers for their valuable comments and suggestions.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Younan Gao .

Editor information

Editors and Affiliations

Stabbing Counting to Dominance Range Counting

Stabbing Counting to Dominance Range Counting

Let S denote a set of \(n'\) rectangles of the form \([x_1, x_2]\times [-\infty , y_2]\) in rank space. Let \(\hat{A}\), \(\hat{B}\), and \(\hat{C}\) denote two-dimensional point set such that \(\hat{A}\), \(\hat{B}\), and \(\hat{C}\) contains \((r.x_1, 0)\), \((r.x_2, 0)\), and \((r.y_2,0)\) for each rectangle \(r\in S\), respectively. Then we build 2D dominance range counting data structure over \(\hat{A}\), \(\hat{B}\), and \(\hat{C}\) applying Lemma 3. Note that the x-coordinates of points in \(\hat{A}\), \(\hat{B}\), or \(\hat{C}\) might not be consecutive from 0 to \(2n-1\). To apply Lemma 3, we can simply add some dump points in both sets as follows: For each \(0\le i \le 2n-1\), if i is not a x-coordinate of any point in the set, we append a dump point \((i, n')\). Let \(\hat{D}\) and \(\hat{E}\) denote the point sets such that \(\hat{D}\) contains point \((-r.x_1, r.y_2)\) and \(\hat{E}\) contains point \((r.x_2, r.y_2)\) for each \(r\in S\), respectively. And we construct data structures over \(\hat{D}\) and \(\hat{E}\) for 2D dominance range counting apply Lemma 3. Again, to apply Lemma 3, we need to add some dump points in sets \(\hat{D}\) and \(\hat{E}\) as well: For each \(0\le i \le 2n-1\), if i is not a x-coordinate of any point in the set (either \(\hat{D}\) or \(\hat{E}\)), we append a dump point \((i, n')\). By searching for the number of points in \(\hat{A}\) that are dominated by (q.x, 1), we can find the number, \(k_1\), of rectangles that lie completely on the right side of Q, taking \(O(\log _w n')\) time. In a similar way, we can find the number, \(k_2\), of rectangles that lie completely on the left side of Q, and the number, \(k_3\), of rectangles that lie completely below Q. Since each rectangle is unbounded downwards, no rectangles can completely lie above Q without containing it. The number, \(k_4\), of rectangles that lie completely on the southeast side of Q and the number, \(k_5\), of rectangles that lie completely on the southwest side of Q can be computed by querying over the dominance range counting data structures built for \(\hat{D}\) and \(\hat{E}\) using \((-Q.x, Q.y)\) and (Q.xQ.y) as the query point, respectively. Both \(k_4\) and \(k_5\) can be found in \(O(\log _w n')\) time applying Lemma 3. Note that a rectangle on either southeast or southwest side of Q is counted twice in the sum of \(k_1\), \(k_2\), and \(k_3\). Therefore, the number of rectangles that do not contain Q is \(k_1+k_2+k_3-k_4-k_5\), and we return \(n'-(k_1+k_2+k_3)+k_4+k_5\) as the result.

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Gao, Y. (2023). Adaptive Data Structures for 2D Dominance Colored Range Counting. In: Morin, P., Suri, S. (eds) Algorithms and Data Structures. WADS 2023. Lecture Notes in Computer Science, vol 14079. Springer, Cham. https://doi.org/10.1007/978-3-031-38906-1_30

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-38906-1_30

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-38905-4

  • Online ISBN: 978-3-031-38906-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics