Validating the Knuth-Morris-Pratt Failure Function, Fast and Online

23Citations
Citations of this article
15Readers
Mendeley users who have this article in their library.

This article is free to access.

Abstract

Let π′ω denote the failure function of the Knuth-Morris-Pratt algorithm for a word ω. In this paper we study the following problem: given an integer array A′[1..n], is there a word w over an arbitrary alphabet Σ such that A′[i] = π′ω[i] for all i? Moreover, what is the minimum cardinality of Σ required? We give an elementary and self-contained O(n log n) time algorithm for this problem, thus improving the previously known solution (Duval et al. in Conference in honor of Donald E. Knuth, 2007), which had no polynomial time bound. Using both deeper combinatorial insight into the structure of π′ and advanced algorithmic tools, we further improve the running time to O(n). © 2013 The Author(s).

Cite

CITATION STYLE

APA

Gawrychowski, P., Jez, A., & Jeż, Ł. (2014). Validating the Knuth-Morris-Pratt Failure Function, Fast and Online. Theory of Computing Systems, 54(2), 337–372. https://doi.org/10.1007/s00224-013-9522-8

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free