Skip to main content

General Space-Time Tradeoffs via Relational Queries

  • 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:

  • 588 Accesses

Abstract

In this paper, we investigate space-time tradeoffs for answering Boolean conjunctive queries. The goal is to create a data structure in an initial preprocessing phase and use it for answering (multiple) queries. Previous work has developed data structures that trade off space usage for answering time and has proved conditional space lower bounds for queries of practical interest such as the path and triangle query. However, most of these results cater to only those queries, lack a comprehensive framework, and are not generalizable. The isolated treatment of these queries also fails to utilize the connections with extensive research on related problems within the database community. The key insight in this work is to exploit the formalism of relational algebra by casting the problems as answering join queries over a relational database. Using the notion of boolean adorned queries and access patterns, we propose a unified framework that captures several widely studied algorithmic problems. Our main contribution is three-fold. First, we present an algorithm that recovers existing space-time tradeoffs for several problems. The algorithm is based on an application of the join size bound to capture the space usage of our data structure. We combine our data structure with query decomposition techniques to further improve the tradeoffs and show that it is readily extensible to queries with negation. Second, we falsify two proposed conjectures in the existing literature related to the space-time lower bound for path queries and triangle detection for which we show unexpectedly better algorithms. This result opens a new avenue for improving several algorithmic results that have so far been assumed to be (conditionally) optimal. Finally, we prove new conditional space-time lower bounds for star and path queries.

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.

    Here we extend the valuation to mean \(v((a_1, \dots , a_n)) = (v(a_1), \dots , v(a_n))\).

  2. 2.

    We will omit the parameter \(\textbf{u}\) from the notation of \(\alpha \) whenever it is clear from the context.

  3. 3.

    For all results in this paper, S includes the space requirement of the input as well. If we are interested in only the space requirement of the constructed data structure, then the |D| term in the space requirement of Theorem 1 can be removed.

  4. 4.

    All answering times \(T > \sqrt{|E|}\) are trivial to achieve using linear space by using the data structure for \(T' = \sqrt{E}\) and holding the result back until time T has passed.

References

  1. Abo Khamis, M., Kolaitis, P.G., Ngo, H.Q., Suciu, D.: Decision problems in information theory. In: ICALP (2020)

    Google Scholar 

  2. Afshani, P., Nielsen, J.A.S.: Data structure lower bounds for document indexing problems. In: ICALP (2016)

    Google Scholar 

  3. Agarwal, R.: The space-stretch-time tradeoff in distance oracles. In: Schulz, A.S., Wagner, D. (eds.) ESA 2014. LNCS, vol. 8737, pp. 49–60. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-44777-2_5

    Chapter  Google Scholar 

  4. Agarwal, R., Godfrey, P.B., Har-Peled, S.: Approximate distance queries and compact routing in sparse graphs. In: INFOCOM, pp. 1754–1762. IEEE (2011)

    Google Scholar 

  5. Atserias, A., Grohe, M., Marx, D.: Size bounds and query plans for relational joins. SIAM J. Comput. 42(4), 1737–1767 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  6. Berkholz, C., Keppeler, J., Schweikardt, N.: Answering conjunctive queries under updates. In: PODS, pp. 303–318. ACM (2017)

    Google Scholar 

  7. Chan, T.M., Lewenstein, M.: Clustered integer 3SUM via additive combinatorics. In: STOC, pp. 31–40 (2015)

    Google Scholar 

  8. Cohen, H., Porat, E.: Fast set intersection and two-patterns matching. Theoret. Comput. Sci. 411(40–42), 3795–3800 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  9. Cohen, H., Porat, E.: On the hardness of distance oracle for sparse graph. arXiv preprint arXiv:1006.1117 (2010)

  10. Deep, S., Hu, X., Koutris, P.: General space-time tradeoffs via relational queries. arXiv preprint arXiv:2109.10889 (2021)

  11. Deep, S., Koutris, P.: Compressed representations of conjunctive query results. In: PODS, pp. 307–322. ACM (2018)

    Google Scholar 

  12. Goldstein, I., Kopelowitz, T., Lewenstein, M., Porat, E.: Conditional lower bounds for space/time tradeoffs. In: WADS 2017. LNCS, vol. 10389, pp. 421–436. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-62127-2_36

    Chapter  Google Scholar 

  13. Gottlob, G., Greco, G., Scarcello, F.: Treewidth and hypertree width. In: Tractability: Practical Approaches to Hard Problems, vol. 1 (2014)

    Google Scholar 

  14. Greco, G., Scarcello, F.: Structural tractability of enumerating CSP solutions. Constraints 18(1), 38–74 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  15. Hopcroft, J.E., Ullman, J.D., Aho, A.: The Design and Analysis of Computer Algorithms (1975)

    Google Scholar 

  16. Kara, A., Ngo, H.Q., Nikolic, M., Olteanu, D., Zhang, H.: Counting triangles under updates in worst-case optimal time. In: ICDT (2019)

    Google Scholar 

  17. Kara, A., Nikolic, M., Olteanu, D., Zhang, H.: Trade-offs in static and dynamic evaluation of hierarchical queries. In: PODS, pp. 375–392 (2020)

    Google Scholar 

  18. Kociumaka, T., Radoszewski, J., Rytter, W.: Efficient indexes for jumbled pattern matching with constant-sized alphabet. In: Bodlaender, H.L., Italiano, G.F. (eds.) ESA 2013. LNCS, vol. 8125, pp. 625–636. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40450-4_53

    Chapter  Google Scholar 

  19. Kopelowitz, T., Porat, E.: The strong 3SUM-indexing conjecture is false. arXiv preprint arXiv:1907.11206 (2019)

  20. Larsen, K.G., Munro, J.I., Nielsen, J.S., Thankachan, S.V.: On hardness of several string indexing problems. Theoret. Comput. Sci. 582, 74–82 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  21. Nash, A., Ludäscher, B.: Processing unions of conjunctive queries with negation under limited access patterns. In: Bertino, E., et al. (eds.) EDBT 2004. LNCS, vol. 2992, pp. 422–440. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-24741-8_25

    Chapter  Google Scholar 

  22. Ngo, H.Q., Porat, E., Ré, C., Rudra, A.: Worst-case optimal join algorithms. In: PODS, pp. 37–48. ACM (2012)

    Google Scholar 

  23. Ngo, H.Q., Ré, C., Rudra, A.: Skew strikes back: new developments in the theory of join algorithms. SIGMOD Rec. 42(4), 5–16 (2013)

    Article  Google Scholar 

  24. Olteanu, D., Schleich, M.: Factorized databases. ACM SIGMOD Rec. 45(2), 5–16 (2016)

    Article  Google Scholar 

  25. Patrascu, M., Roditty, L.: Distance oracles beyond the Thorup-zwick bound. In: FOCS, pp. 815–823. IEEE (2010)

    Google Scholar 

  26. Robertson, N., Seymour, P.D.: Graph minors. II. Algorithmic aspects of tree-width. J. Algorithms 7(3), 309–322 (1986)

    Article  MathSciNet  MATH  Google Scholar 

  27. Segoufin, L.: Enumerating with constant delay the answers to a query. In: Proceedings of the 16th ICDT, pp. 10–20. ACM (2013)

    Google Scholar 

  28. Ullman, J.D.: An approach to processing queries in a logic-based query language. In: Brodie, M.L., Mylopoulos, J. (eds.) On knowledge base management systems. Topics in Information Systems, pp. 147–164. Springer, New York (1986). https://doi.org/10.1007/978-1-4612-4980-1_16

    Chapter  Google Scholar 

  29. Wei, F., Lausen, G.: Containment of conjunctive queries with safe negation. In: Calvanese, D., Lenzerini, M., Motwani, R. (eds.) ICDT 2003. LNCS, vol. 2572, pp. 346–360. Springer, Heidelberg (2003). https://doi.org/10.1007/3-540-36285-1_23

    Chapter  Google Scholar 

  30. Xirogiannopoulos, K., Deshpande, A.: Extracting and analyzing hidden graphs from relational databases. In: SIGMOD, pp. 897–912. ACM (2017)

    Google Scholar 

  31. Xirogiannopoulos, K., Khurana, U., Deshpande, A.: GraphGen: exploring interesting graphs in relational data. Proc. VLDB Endowment 8(12), 2032–2035 (2015)

    Article  Google Scholar 

  32. Yannakakis, M.: Algorithms for acyclic database schemes. In: VLDB, pp. 82–94 (1981)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shaleen Deep .

Editor information

Editors and Affiliations

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

Deep, S., Hu, X., Koutris, P. (2023). General Space-Time Tradeoffs via Relational Queries. 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_21

Download citation

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

  • 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