Related papers: Runs of Ones in Binary Strings
Many problems in Computer Science can be abstracted to the following question: given a set of objects and rules respectively, which new objects can be produced? In the paper, we consider a succinct version of the question: given a set of…
If the list of binary numbers is read by upward-sloping diagonals, the resulting ``sloping binary numbers'' 0, 11, 110, 101, 100, 1111, 1010, ... (or 0, 3, 6, 5, 4, 15, 10, ...) have some surprising properties. We give formulae for the n-th…
We investigate the number of squares in a very broad family of binary recurrence sequences with $u_{0}=1$. We show that there are at most two distinct squares in such sequences (the best possible result), except under such very special…
We pose thirty conjectures on arithmetical sequences, most of which are about monotonicity of sequences of the form $(\root n\of{a_n})_{n\ge 1}$ or the form $(\root{n+1}\of{a_{n+1}}/\root n\of{a_n})_{n\ge1}$, where $(a_n)_{n\ge 1}$ is a…
The distribution of a given sequence in the set of all sequences with n ones and m = M - n zeros are found by relating the problem to the partitions of a natural number in m natural summands, taking into account the order. The formulas…
A lower time bound $\Omega(\min(\nu(x), n-\nu(x))$ for counting the number of ones in a binary input word $x$ of length $n$ is presented, where $\nu(x)$ is the number of ones. The operations available are increment, decrement, bit-wise…
Let $R(n,k)$ denote the number of permutations of ${1,2,...,n}$ with $k$ alternating runs. In this note we present an explicit formula for the numbers $R(n,k)$.
We analyze the connection between the autocorrelation of a binary sequence and its run structure given by the run length encoding. We show that both the periodic and the aperiodic autocorrelation of a binary sequence can be formulated in…
We establish new upper bounds for the length of runs of consecutive positive integers each with exactly $k$ divisors, where $k$ is a given positive integer of some special forms. Also we have found exact values of the maximum possible runs…
We study pattern densities in binary sequences, finding optimal limit sequences with fixed pattern densities.
A run in a string is a maximal periodic substring. For example, the string $\texttt{bananatree}$ contains the runs $\texttt{anana} = (\texttt{an})^{3/2}$ and $\texttt{ee} = \texttt{e}^2$. There are less than $n$ runs in any length-$n$…
Much research in stringology focuses on structures that can, in a way, ``grasp'' repeats (substrings that occur multiple times) as, for example, the so-called runs, a.k.a. maximal repetitions, compactly describe all tandem repeats. In this…
Consider n unit intervals, say [1,2], [3,4], ..., [2n-1,2n]. Identify their endpoints in pairs at random, with all (2n-1)!! = (2n-1) (2n-3) ... 3 1 pairings being equally likely. The result is a collection of cycles of various lengths, and…
We take a fresh look at the classical problem of runs in a sequence of i.i.d.\ coin tosses and derive a general identity/recursion which can be used to compute (joint) distributions of functionals of run types. This generalizes and unifies…
In this paper, we consider the problem of constructing optimal average-length binary codes under the constraint that each codeword must contain at most $D$ ones, where $D$ is a given input parameter. We provide an $O(n^2D)$-time complexity…
A formula for the number of toroidal m x n binary arrays, allowing rotation of the rows and/or the columns but not reflection, is known. Here we find a formula for the number of toroidal m x n binary arrays, allowing rotation and/or…
Consider infinite random words over a finite alphabet where the letters occur as an i.i.d. sequence according to some arbitrary distribution on the alphabet. The expectation and the variance of the waiting time for the first completed…
This paper presents results on maximal runs, order of squares, palindromes, and unbordered factors of members of the family of binary pattern sequences with the all-one pattern. Restricting ourselves to binary pattern sequences with the…
A complete classification of the perfect binary one-error-correcting codes of length 15 as well as their extensions of length 16 is presented. There are 5983 such inequivalent perfect codes and 2165 extended perfect codes. Efficient…
Constant-weight and constant-charge binary sequences with constrained run length of zeros are introduced. For these sequences, the weight and the charge distribution are found. Then, recurrent and direct formulas for calculating the number…