Related papers: The distribution of longest run lengths in integer…
We introduce a data structure for counting pattern occurrences in texts compressed with any run-length context-free grammar. Our structure uses space proportional to the grammar size and counts the occurrences of a pattern of length $m$ in…
Recently, the general problem of enumerating permutations $\pi=\pi_1\cdots \pi_n$ such that $\pi_{i+r}-\pi_i \neq s$ for all $1\leq i\leq n-r$, where $r$ and $s$ are fixed, was considered by Spahn and Zeilberger. In this paper, we consider…
Let $m,k$ be fixed positive integers. Determining the generating function for the number of tilings of an $m\times n$ rectangle by $k\times 1$ rectangles is a long-standing open problem to which the answer is only known in certain special…
Given a string $T$ of length $n$ over an alphabet $\Sigma\subset \{1,2,\ldots,n^{O(1)}\}$ of size $\sigma$, we are to preprocess $T$ so that given a range $[i,j]$, we can return a representation of a shortest string over $\Sigma$ that is…
The powers of generating functions and its properties are analyzed. A new class of functions is introduced, based on the application of compositions of an integer $n$, called composita. The methods for obtaining reciprocal and reverse…
The aim of this paper is to construct general forms of ordinary generating functions for special numbers and polynomials involving Fibonacci type numbers and polynomials, Lucas numbers and polynomials, Chebyshev polynomials, Sextet…
We investigate meandric systems with a large number of loops using tools inspired by free probability. For any fixed integer $r$, we express the generating function of meandric systems on $2n$ points with $n-r$ loops in terms of a finite…
Let $w$ be a string of length $n$. The problem of counting factors crossing a position - Problem 64 from the textbook ``125 Problems in Text Algorithms'' [Crochemore, Leqroc, and Rytter, 2021], asks to count the number $\mathcal{C}(w,k)$…
The negative binomial distribution NB$(k,r)$ of Type I is the probability distribution for a sequence of independent Bernoulli trials (with success parameter $p\in(0,1)$) with $r$ nonoverlapping success runs of length $\ge k$. We present a…
The distributions of the number of occurrences of words (the distributions of words for short) play key roles in information theory, statistics, probability theory, ergodic theory, computer science, and DNA analysis. Bassino et al. 2010 and…
We investigate compositions of a positive integer with a fixed number of parts, when there are several types of each natural number. These compositions produce new relationships among binomial coefficients, Catalan numbers, and numbers of…
Given a string of length $n$ that is composed of $r$ runs of letters from the alphabet $\{0,1,\ldots,\sigma{-}1\}$ such that $2 \le \sigma \le r$, we describe a data structure that, provided $r \le n / \log^{\omega(1)} n$, stores the string…
We address the non-redundant random generation of $k$ words of length $n$ in a context-free language. Additionally, we want to avoid a predefined set of words. We study a rejection-based approach, whose worst-case time complexity is shown…
We study generating functions for the number of permutations on n letters avoiding 132 and an arbitrary permutation $\tau$ on k letters, or containing $\tau$ exactly once. In several interesting cases the generating function depends only on…
An ordered partition of [n]:={1,2,..., n} is a sequence of its disjoint subsets whose union is [n]. The number of ordered partitions of [n] with k blocks is k!S(n,k), where S(n,k) is the Stirling number of second kind. In this paper we…
Given an integer $k\ge2$, let $\omega_k(n)$ denote the number of primes that divide $n$ with multiplicity exactly $k$. We compute the density $e_{k,m}$ of those integers $n$ for which $\omega_k(n)=m$ for every integer $m\ge0$. We also show…
Obtained a new property of superposition of the generating functions ln(1/(1-F(x))), where F(x) - generating function with integer coefficients, which allows the construction a primality tests. The theorem which is based on compositions of…
Non-overlapping codes are a set of codewords in $\bigcup_{n \ge 2} \mathbb{Z}_q^n$, where $\mathbb{Z}_q = \{0,1,\dots,q-1\}$, such that, the prefix of each codeword is not a suffix of any codeword in the set, including itself; and for…
Recently, a short and elegant proof was presented showing that a binary word of length $n$ contains at most $n-3$ runs. Here we show, using the same technique and a computer search, that the number of runs in a binary word of length $n$ is…
For which positive integers $n,k,r$ does there exist a linear $[n,k]$ code $C$ over $\mathbb{F}_q$ with all codeword weights divisible by $q^r$ and such that the columns of a generating matrix of $C$ are projectively distinct? The…