Abstract
The weak-prefix search problem consists of searching for the strings in a dictionary S that are prefixed by a pattern P[1,p]; if no such string does occur, any answer can be returned. Strings in S have average length ℓ, are n in number, and are given in advance to be preprocessed, whereas the pattern P is provided on-line. In this paper we solve this problem in the external-memory and in the cache-oblivious models by using the optimal O(nlogℓ) bits of space and requiring O(p/B+logBn) I/Os. The searching algorithm is of Monte Carlo type, so its answer is correct with high probability. We also discuss some variants of the problem concerning with a distribution over the queried patterns, a deterministic solution, and foresee applications in the design of energy-efficient data structures.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.