English
Related papers

Related papers: Counting ternary square-free words quickly

200 papers

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…

Logic · Mathematics 2026-04-28 Yifan Jia , Heer Tern Koh , Bakh Khoussainov

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…

Discrete Mathematics · Computer Science 2017-02-27 Gabriele Fici , Filippo Mignosi , Jeffrey Shallit

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…

Combinatorics · Mathematics 2007-05-23 Jui-Yi Kao , Narad Rampersad , Jeffrey Shallit , Manuel Silva

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…

Numerical Analysis · Mathematics 2025-10-20 Grigori Litvinov , Elena Maslova

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…

General Mathematics · Mathematics 2009-01-14 Ramesh Kumar Muthumalai

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.

Number Theory · Mathematics 2020-08-12 Andrej Dujella , Matteo Paganin , Mohammad Sadek

Let f be a cubic polynomial. Then there are infinitely many primes p such that f(p) is square-free.

Number Theory · Mathematics 2007-06-12 Harald Andres Helfgott

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.

Combinatorics · Mathematics 2007-05-23 Shalosh B. Ekhad , Vince Vatter , Doron Zeilberger

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…

Formal Languages and Automata Theory · Computer Science 2017-08-23 Joey Becker , F. Blanchet-Sadri , Laure Flapan , Stephen Watkins

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…

Discrete Mathematics · Computer Science 2014-07-15 Gabriele Fici , Luca Q. Zamboni

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.

Data Structures and Algorithms · Computer Science 2015-06-12 Holger Petersen

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…

Number Theory · Mathematics 2020-10-30 Jorge Urroz

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…

Computational Complexity · Computer Science 2012-12-03 Sam Buss , Michael Soltys

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…

Number Theory · Mathematics 2020-07-07 Markus Hittmeir

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…

Discrete Mathematics · Computer Science 2014-11-11 Mike Müller , Svetlana Puzynina , Michaël Rao

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…

Formal Languages and Automata Theory · Computer Science 2012-11-05 Andy Lorenz , Yann Ponty

We give an upper bound for the exponential sum over squarefree integers. This establishes a conjecture by Br\"udern and Perelli.

Number Theory · Mathematics 2011-05-10 Jan-Christoph Schlage-Puchta

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…

Combinatorics · Mathematics 2007-05-23 Alexander Barvinok , Alex Samorodnitsky , Alexander Yong

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…

Combinatorics · Mathematics 2024-02-14 Aseem Baranwal , James Currie , Lucas Mol , Pascal Ochem , Narad Rampersad , Jeffrey Shallit

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…

Combinatorics · Mathematics 2026-01-29 Biswajit Das , Ramesh Hariharasubramanian