On Prefix Normal Words and Prefix Normal Forms
Preprint
Abstract
A $1$-prefix normal word is a binary word with the property that no factor has more $1$s than the prefix of the same length; a $0$-prefix normal word is defined analogously. These words arise in the context of indexed binary jumbled pattern matching, where the aim is to decide whether a word has a factor with a given number of $1$s and $0$s (a given Parikh vector). Each binary word has an associated set of Parikh vectors of the factors of the word. Using prefix normal words, we provide a characterization of the equivalence class of binary words having the same set of Parikh vectors of their factors. We prove that the language of prefix normal words is not context-free and is strictly contained in the language of pre-necklaces, which are prefixes of powers of Lyndon words. We give enumeration results on $\textit{pnw}(n)$, the number of prefix normal words of length $n$, showing that, for sufficiently large $n$, \[ 2^{n-4 \sqrt{n \lg n}} \le \textit{pnw}(n) \le 2^{n - \lg n + 1}. \] For fixed density (number of $1$s), we show that the ordinary generating function of the number of prefix normal words of length $n$ and density $d$ is a rational function. Finally, we give experimental results on $\textit{pnw}(n)$, discuss further properties, and state open problems.
Keywords
All Related Versions
- Version 1, 2016-11-28, ArXiv
- Published version: Theoretical Computer Science, 659, 1.
This publication has 13 references indexed in Scilit:
- The on-line encyclopedia of integer sequencesNotices of the American Mathematical Society, 2018
- Binary jumbled string matching for highly run-length compressible textsInformation Processing Letters, 2013
- New algorithms for binary jumbled pattern matchingInformation Processing Letters, 2013
- Sub-quadratic time and linear space data structures for permutation matching in binary stringsJournal of Discrete Algorithms, 2012
- On Approximate Jumbled Pattern Matching in StringsTheory of Computing Systems, 2011
- Indexing permutations for binary stringsInformation Processing Letters, 2010
- Simulating multiplexed SNP discovery rates using base-specific cleavage and mass spectrometryBioinformatics, 2007
- Scaled and permuted string matchingInformation Processing Letters, 2004
- Permutation Pattern Discovery in BiosequencesJournal of Computational Biology, 2004
- Generating necklacesJournal of Algorithms, 1992