Dictionary Matching in a Stream

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9294)


We consider the problem of dictionary matching in a stream. Given a set of strings, known as a dictionary, and a stream of characters arriving one at a time, the task is to report each time some string in our dictionary occurs in the stream. We present a randomised algorithm which takes O(loglog(k + m)) time per arriving character and uses O(k logm) words of space, where k is the number of strings in the dictionary and m is the length of the longest string in the dictionary.


Pattern Match Binary Search Arithmetic Progression String Match Exit Node 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aho, A.V., Corasick, M.J.: Efficient string matching: an aid to bibliographic search. Communications of the ACM 18(8), 333–340 (1975)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Belazzougui, D., Boldi, P., Pagh, R., Vigna, S.: Monotone minimal perfect hashing: Searching a sorted table with O(1) accesses. In: SODA 2009: Proc. 20th ACM-SIAM Symp. on Discrete Algorithms, pp. 785–794 (2009)Google Scholar
  3. 3.
    Breslauer, D., Galil, Z.: Real-time streaming string-matching. ACM Transactions on Algorithms 10(4), 22 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Breslauer, D., Grossi, R., Mignosi, F.: Simple real-time constant-space string matching. In: Giancarlo, R., Manzini, G. (eds.) CPM 2011. LNCS, vol. 6661, pp. 173–183. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  5. 5.
    Broder, A.Z., Mitzenmacher, M.: Survey: Network applications of bloom filters: A survey. Internet Mathematics 1(4), 485–509 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Clifford, R., Jalsenius, M., Porat, E., Sach, B.: Pattern matching in multiple streams. In: Kärkkäinen, J., Stoye, J. (eds.) CPM 2012. LNCS, vol. 7354, pp. 97–109. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  7. 7.
    Clifford, R., Sach, B.: Pseudo-realtime pattern matching: Closing the gap. In: Amir, A., Parida, L. (eds.) CPM 2010. LNCS, vol. 6129, pp. 101–111. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  8. 8.
    Clifford, R., Sach, B.: Pattern matching in pseudo real-time. Journal of Discrete Algorithms 9(1), 67–81 (2011)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Crochemore, M., Perrin, D.: Two-way string matching. J. ACM 38(3), 651–675 (1991)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Crouch, M.S., McGregor, A.: Periodicity and cyclic shifts via linear sketches. In: Goldberg, L.A., Jansen, K., Ravi, R., Rolim, J.D.P. (eds.) APPROX and RANDOM 2011. LNCS, vol. 6845, pp. 158–170. Springer, Heidelberg (2011)Google Scholar
  11. 11.
    Ergun, F., Jowhari, H., Sağlam, M.: Periodicity in streams. In: Serna, M., Shaltiel, R., Jansen, K., Rolim, J. (eds.) APPROX and RANDOM 2010. LNCS, vol. 6302, pp. 545–559. Springer, Heidelberg (2010)Google Scholar
  12. 12.
    Jalsenius, M., Porat, B., Sach, B.: Parameterized matching in the streaming model. In: STACS 2013: Proc. 30th Annual Symp. on Theoretical Aspects of Computer Science, pp. 400–411 (2013)Google Scholar
  13. 13.
    Karp, R.M., Rabin, M.O.: Efficient randomized pattern-matching algorithms. IBM Journal of Research and Development 31(2), 249–260 (1987)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Knuth, D.E., Morris, J.H., Pratt, V.B.: Fast pattern matching in strings. SIAM Journal on Computing 6, 323–350 (1977)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Lothaire, M.: Algebraic Combinatorics on Words. Cambridge University Press (2002)Google Scholar
  16. 16.
    Muthukrishnan, S., Müller, M.: Time and space efficient method-lookup for object-oriented programs. In: SODA 1996: Proc. 7th ACM-SIAM Symp. on Discrete Algorithms, pp. 42–51 (1996)Google Scholar
  17. 17.
    Porat, B., Porat, E.: Exact and approximate pattern matching in the streaming model. In: FOCS 2009: Proc. 50th Annual Symp. Foundations of Computer Science, pp. 315–323 (2009)Google Scholar
  18. 18.
    Ružić, M.: Constructing efficient dictionaries in close to sorting time. In: Aceto, L., Damgård, I., Goldberg, L.A., Halldórsson, M.M., Ingólfsdóttir, A., Walukiewicz, I. (eds.) ICALP 2008, Part I. LNCS, vol. 5125, pp. 84–95. Springer, Heidelberg (2008)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  1. 1.Department of Computer ScienceUniversity of BristolBristolUK
  2. 2.Department of Computer ScienceBar-Ilan UniversityRamat GanIsrael

Personalised recommendations