Optimal prefix and suffix queries on texts

  • Authors:
  • Maxime Crochemore;Costas S. Iliopoulos;M. Sohel Rahman

  • Affiliations:
  • Algorithm Design Group, Department of Computer Science,44http://www.dcs.kcl.ac.uk/adg. King's College London, Strand, London WC2R 2LS, England and Institut Gaspard-Monge, University of Marne-la-Va ...;Algorithm Design Group, Department of Computer Science,44http://www.dcs.kcl.ac.uk/adg. King's College London, Strand, London WC2R 2LS, England;Algorithm Design Group, Department of Computer Science,44http://www.dcs.kcl.ac.uk/adg. King's College London, Strand, London WC2R 2LS, England

  • Venue:
  • Information Processing Letters
  • Year:
  • 2008

Quantified Score

Hi-index 0.89

Visualization

Abstract

In this paper, we study a restricted version of the position restricted pattern matching problem introduced and studied by Makinen and Navarro [V. Makinen, G. Navarro, Position-restricted substring searching, in: J.R. Correa, A. Hevia, M.A. Kiwi (Eds.), LATIN, in: Lecture Notes in Computer Science, vol. 3887, Springer, 2006, pp. 703-714]. In the problem handled in this paper, we are interested in those occurrences of the pattern that lies in a suffix or in a prefix of the given text. We achieve optimal query time for our problem against a data structure which is an extension of the classic suffix tree data structure. The time and space complexity of the data structure is dominated by that of the suffix tree. Notably, the (best) algorithm by Makinen and Navarro, if applied to our problem, gives sub-optimal query time and the corresponding data structure also requires more time and space.