Papers
Topics
Authors
Recent
Search
2000 character limit reached

A Fast Heuristic for Exact String Matching

Published 11 Dec 2015 in cs.DS | (1512.03512v1)

Abstract: Given a pattern string PP of length nn consisting of δ\delta distinct characters and a query string TT of length mm, where the characters of PP and TT are drawn from an alphabet Σ\Sigma of size Δ\Delta, the {\em exact string matching} problem consists of finding all occurrences of PP in TT. For this problem, we present a randomized heuristic that in O(nδ)O(n\delta) time preprocesses PP to identify sparse(P)sparse(P), a rarely occurring substring of PP, and then use it to find all occurrences of PP in TT efficiently. This heuristic has an expected search time of O(mmin(∣sparse(P)∣,Δ))O( \frac{m}{min(|sparse(P)|, \Delta)}), where ∣sparse(P)∣|sparse(P)| is at least δ\delta. We also show that for a pattern string PP whose characters are chosen uniformly at random from an alphabet of size Δ\Delta, E[∣sparse(P)∣]E[|sparse(P)|] is Ω(Δlog(2Δ2Δ−δ))\Omega(\Delta log (\frac{2\Delta}{2\Delta-\delta})).

Authors (1)

Summary

No one has generated a summary of this paper yet.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.