23 research outputs found
The asymptotic number of prefix normal words
We show that the number of prefix normal binary words of length is
. We also show that the maximum number of binary
words of length with a given fixed prefix normal form is
.Comment: 9 page
Binary Jumbled String Matching for Highly Run-Length Compressible Texts
The Binary Jumbled String Matching problem is defined as: Given a string
over of length and a query , with non-negative
integers, decide whether has a substring with exactly 's and
's. Previous solutions created an index of size O(n) in a pre-processing
step, which was then used to answer queries in constant time. The fastest
algorithms for construction of this index have running time
[Burcsi et al., FUN 2010; Moosa and Rahman, IPL 2010], or in
the word-RAM model [Moosa and Rahman, JDA 2012]. We propose an index
constructed directly from the run-length encoding of . The construction time
of our index is , where O(n) is the time for computing
the run-length encoding of and is the length of this encoding---this
is no worse than previous solutions if and better if . Our index can be queried in time. While
in the worst case, preliminary investigations have
indicated that may often be close to . Furthermore, the algorithm
for constructing the index is conceptually simple and easy to implement. In an
attempt to shed light on the structure and size of our index, we characterize
it in terms of the prefix normal forms of introduced in [Fici and Lipt\'ak,
DLT 2011].Comment: v2: only small cosmetic changes; v3: new title, weakened conjectures
on size of Corner Index (we no longer conjecture it to be always linear in
size of RLE); removed experimental part on random strings (these are valid
but limited in their predictive power w.r.t. general strings); v3 published
in IP
On Infinite Prefix Normal Words
Prefix normal words are binary words that have no factor with more s than
the prefix of the same length. Finite prefix normal words were introduced in
[Fici and Lipt\'ak, DLT 2011]. In this paper, we study infinite prefix normal
words and explore their relationship to some known classes of infinite binary
words. In particular, we establish a connection between prefix normal words and
Sturmian words, between prefix normal words and abelian complexity, and between
prefix normality and lexicographic order.Comment: 20 pages, 4 figures, accepted at SOFSEM 2019 (45th International
Conference on Current Trends in Theory and Practice of Computer Science,
Nov\'y Smokovec, Slovakia, January 27-30, 2019
Bubble-Flip---A New Generation Algorithm for Prefix Normal Words
We present a new recursive generation algorithm for prefix normal words.
These are binary strings with the property that no substring has more 1s than
the prefix of the same length. The new algorithm uses two operations on binary
strings, which exploit certain properties of prefix normal words in a smart
way. We introduce infinite prefix normal words and show that one of the
operations used by the algorithm, if applied repeatedly to extend the string,
produces an ultimately periodic infinite word, which is prefix normal.
Moreover, based on the original finite word, we can predict both the length and
the density of an ultimate period of this infinite word.Comment: 30 pages, 3 figures, accepted in Theoret. Comp. Sc.. This is the
journal version of the paper with the same title at LATA 2018 (12th
International Conference on Language and Automata Theory and Applications,
Tel Aviv, April 9-11, 2018