Online validation of the pi and pi' failure functions
Pawel Gawrychowski, Artur Jez, Lukasz Jez

TL;DR
This paper introduces efficient algorithms for validating and constructing words based on their failure functions, including the first polynomial-time online algorithm for the pi' failure function, with applications in string processing.
Contribution
It presents the first polynomial-time online algorithm for the validation and construction of words from their failure functions, improving understanding of string algorithms.
Findings
Linear-time algorithm for reconstructing words from failure functions with minimal alphabet
Online O(n log n) algorithm for pi' failure function validation
Efficient algorithms use o(n) memory and operate in real-time
Abstract
Let pi_w denote the failure function of the Morris-Pratt algorithm for a word w. In this paper we study the following problem: given an integer array A[1..n], is there a word w over arbitrary alphabet such that A[i]=pi_w[i] for all i? Moreover, what is the minimum required cardinality of the alphabet? We give a real time linear algorithm for this problem in the unit-cost RAM model with \Theta(log n) bits word size. Our algorithm returns a word w over minimal alphabet such that pi_w = A as well and uses just o(n) words of memory. Then we consider function pi' instead of pi and give an online O(n log n) algorithm for this case. This is the first polynomial algorithm for online version of this problem.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · semigroups and automata theory · Coding theory and cryptography
