Abstract
We present an efficient data structure for finding the longest prefix of a query string p in a dynamic database of strings. When the strings are IP-addresses then this is the IP-lookup problem. Our data structure is I/O efficient. It supports a query with a string p using \(O(\log_{B}(n)+\frac{|p|}{B})\) I/O operations, where B is the size of a disk block. It also supports an insertion and a deletion of a string p with the same number of I/O’s. The size of the data structure is linear in the size of the database and the running time of each operation is O(log(n) + |p|).
This work is partially supported by United states - Israel Binational Science Foundation, project number 2006204.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Agarwal, P.K., Arge, L., Yi, K.: An Optimal Dynamic Interval Stabbing-Max Data Structure? In: Proceedings of SODA, pp. 803–812 (2005)
Bayer, R., McCreight, E.M.: Organization and Maintenance of Large Ordered Indexes. Acta Informtica 1(3), 173–189 (1972)
Bender, M.A., Demaine, E., Farach-Colton, M.: Cache-Oblivious B-Trees. SIAM Journal on Computing 35(2), 341–358 (2005)
Bender, M.A., Farach-Colton, M., Kusznaul, B.C.: Cache-Oblivious String B-Trees. In: Proceedings of PODS, pp. 233–242 (2006)
Brodal, G.S., Fagerberg, R.: Cache-oblivious string dictionaries. In: Proc. 17th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 581–590 (2006)
Demaine, E.D., Iacono, J., Langerman, S.: Worst-case optimal tree layout in a memory hierarchy (2004)
Eatherton, W., Dittia, Z., Varghese, G.: Tree Bitmap: Hardware/Software IP Lookups with Incremental Updates. ACM SIGCOMM Computer Communications Review 34(2), 97–122 (2004)
Feldmann, A., Muthukrishnan, S.: Tradeoffs for Packet Classification. In: Proceedings of INFOCOM, pp. 1193–1202 (2000)
Ferragina, P., Grossi, R.: The String B-Tree: A New Data Structure for String Search in External Memory and Its Applications. Journal of the ACM 46(2), 236–280 (1999)
Frigo, M., Leiserson, C.E., Prokop, H., Ramachandran, S.: Cache-Oblivious Algorithms. In: Proceedings of FOCS, pp. 285–297 (1999)
Hasan, J., Cadambi, S., Jakkula, V., Chakradhar, S.: Chisel: A Storage-Efficient, Collision-Free Hash- Based Network Processing Architecture. In: Proceedings of ISCA, May 2006, pp. 203–215 (2006)
Kaplan, H., Molad, E., Tarjan, R.E.: Dynamic Rectangular Intersection with Priorities. In: Proceedings of STOC, pp. 639–648 (2003)
Lu, H., Sahni, S.: A B-Tree Dynamic Router-Table Design. IEEE Transactions on Computers 54(7), 813–824 (2005)
Morrison, D.R.: Patricia: Practical Algorithm to Retrieve Information Coded in Alphanumeric. Journal of the ACM 15(4), 514–534 (1968)
Sahni, S., Kim, K.: O(log n) Dynamic Packet Routing. In: Proceedings of ISCC, pp. 443–448 (2002)
Sleator, D., Tarjan, R.E.: Self-adjusting binary search trees. Journal of the ACM 32, 652–686 (1985)
Sleator, D.D., Tarjan, R.E.: A Data Structure for Dynamic Trees. JCSS 26(3), 362–391 (1983)
Suri, S., Varghese, G., Warkhede, P.: Multiway Range Trees: Scalable IP Lookup with Fast Updates. In: Proceedings of GLOBECOM, pp. 1610–1614 (2001)
Tarjan, R.E.: A Class of Algorithms which Require Nonlinear Time to Maintain Disjoint Sets. Journal of Computing System Science 18, 110–127 (1979)
Vitter, J.S.: External Memory Algorithms and Data Structures: Dealing with Massive Data. ACM Computing Surveys 33(2), 209–271 (2001)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hershcovitch, M., Kaplan, H. (2008). I/O Efficient Dynamic Data Structures for Longest Prefix Queries. In: Gudmundsson, J. (eds) Algorithm Theory – SWAT 2008. SWAT 2008. Lecture Notes in Computer Science, vol 5124. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69903-3_5
Download citation
DOI: https://doi.org/10.1007/978-3-540-69903-3_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69900-2
Online ISBN: 978-3-540-69903-3
eBook Packages: Computer ScienceComputer Science (R0)