Related papers: Counting ternary square-free words quickly
Term algebras are important objects in computer science and are correspondingly well-studied. A natural generalization is to quotient these algebras by finitely many ground term equations, obtaining what we call almost free algebras. One of…
An abelian square is the concatenation of two words that are anagrams of one another. A word of length $n$ can contain at most $\Theta(n^2)$ distinct factors, and there exist words of length $n$ containing $\Theta(n^2)$ distinct…
Carpi constructed an infinite word over a 4-letter alphabet that avoids squares in all subsequences indexed by arithmetic progressions of odd difference. We show a connection between Carpi's construction and the paperfolding words. We…
The concept of a universal algorithm is discussed. Examples of this kind of algorithms are presented. Software implementations of such algorithms in C++ type languages are discussed together with means that provide for computations with an…
We study few properties of square-free integers in certain equations. Using this property, we derive some infinite products in powers of square free numbers. Also, we present a method, to convert power series and trigonometric series to…
We show that for infinitely many square-free integers q there exist infinitely many triples of rational numbers {a, b, c} such that a^2 + q, b^2 + q, c^2 + q, ab + q, ac + q and bc + q are squares of rational numbers.
Let f be a cubic polynomial. Then there are infinitely many primes p such that f(p) is square-free.
We prove, via 30 seconds of Maple computation, that there are 10^n words in the alphabet {3,-2} of length 5n, sum 0, and such that every factor that sums to 0 and that starts with a 3 may not be immediately followed by a -2.
A set X of partial words over a finite alphabet A is called unavoidable if every two-sided infinite word over A has a factor compatible with an element of X. Unlike the case of a set of words without holes, the problem of deciding whether…
We investigate the least number of palindromic factors in an infinite word. We first consider general alphabets, and give answers to this problem for periodic and non-periodic words, closed or not under reversal of factors. We then…
An algorithm counting the number of ones in a binary word is presented running in time $O(\log\log b)$ where $b$ is the number of ones. The operations available include bit-wise logical operations and multiplication.
In the paper we can prove that every integer can be written as the sum of two integers, one perfect square and one squarefree. We also establish the asympotic formula for the number of representations of an integer in this form. The result…
A shuffle of two strings is formed by interleaving the characters into a new string, keeping the characters of each string in order. A string is a square if it is a shuffle of two identical strings. There is a known polynomial time dynamic…
Let $a,k\in\mathbb{N}$. For the $k-1$-th iterate of the exponential function $x\mapsto a^x$, also known as tetration, we write \[ ^k a:=a^{a^{.^{.^{.^{a}}}}}. \] In this paper, we show how an efficient algorithm for tetration modulo natural…
In this paper we answer two recent questions from Charlier et al. and Harju about self-shuffling words. An infinite word $w$ is called self-shuffling, if $w=\prod_{i=0}^\infty U_iV_i=\prod_{i=0}^\infty U_i=\prod_{i=0}^\infty V_i$ for some…
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 give an upper bound for the exponential sum over squarefree integers. This establishes a conjecture by Br\"udern and Perelli.
We present a randomized algorithm, which, given positive integers n and t and a real number 0< epsilon <1, computes the number Sigma(n, t) of n x n non-negative integer matrices (magic squares) with the row and column sums equal to t within…
The (bitwise) complement $\overline{x}$ of a binary word $x$ is obtained by changing each $0$ in $x$ to $1$ and vice versa. An $\textit{antisquare}$ is a nonempty word of the form $x\, \overline{x}$. In this paper, we study infinite binary…
A graph $G = (V, E)$ is word-representable, if there exists a word w over the alphabet V such that for letters ${x, y} \in V$ , $x$ and $y$ alternate in $w$ if and only if $xy \in E$. In this paper, we prove that any non-empty…