Related papers: Counting ternary square-free words quickly
We study the complexity of computation in finitely generated free left, right and two-sided adequate semigroups and monoids. We present polynomial time (quadratic in the RAM model of computation) algorithms to solve the word problem and…
Processors may find some elementary operations to be faster than the others. Although an operation may be conceptually as simple as some other operation, the processing speeds of the two can vary. A clever programmer will always try to…
Multiple algorithms are known for efficiently calculating the prefix probability of a string under a probabilistic context-free grammar (PCFG). Good algorithms for the problem have a runtime cubic in the length of the input string. However,…
We show that all perfect odd integer squares not divisible by 3, can be usefully written as sqrt(N) = a + 18p, where the constant a is determined by the basic properties of N. The equation can be solved deterministically by an efficient…
Words whose three successive factors of the same length are all different i.e. 3-anti-power words are a natural extension of square-free words (two successive factors of the same length are different). We give a way to verify whether a…
Given f in Z[x_1,...,x_n], we compute the density of x in Z^n such that f(x) is squarefree, assuming the abc conjecture. Given f,g in Z[x_1,...,x_n], we compute unconditionally the density of x in Z^n such that gcd(f(x),g(x))=1. Function…
A binary shuffle square is a binary word of even length that can be partitioned into two disjoint, identical subwords. Huang, Nam, Thaper, and the first author conjectured that as $n\rightarrow \infty$, asymptotically half of all binary…
A tangram is a word in which every letter occurs an even number of times. Thus it can be cut into parts that can be arranged into two identical words. The \emph{cut number} of a tangram is the minimum number of required cuts in this…
Squares (fragments of the form $xx$, for some string $x$) are arguably the most natural type of repetition in strings. The basic algorithmic question concerning squares is to check if a given string of length $n$ is square-free, that is,…
We present several results on counting untyped lambda terms, i.e., on telling how many terms belong to such or such class, according to the size of the terms and/or to the number of free variables.
We provide the first fully polynomial-time randomized approximation scheme for the following two counting problems: 1. Given a Context Free Grammar $G$ over alphabet $\Sigma$, count the number of words of length exactly $n$ generated by…
We present an algorithm that computes the composition factors of the n-th tensor power of the free associative algebra on a vector space. The composition factors admit a description in terms of certain coefficients $c_{\lambda\mu}$…
A string is said to be closed if its length is one, or if it has a non-empty factor that occurs both as a prefix and as a suffix of the string, but does not occur elsewhere. The notion of closed words was introduced by [Fici, WORDS 2011].…
For coprime positive integers $a, b, c$, where $a+b=c$, $\gcd(a,b,c)=1$ and $1\leq a < b$, the famous $abc$ conjecture (Masser and Oesterl\`e, 1985) states that for $\varepsilon > 0$, only finitely many $abc$ triples satisfy $c >…
We describe a new non-constructive technique to show that squares are avoidable by an infinite word even if we force some letters from the alphabet to appear at certain occurrences. We show that as long as forced positions are at distance…
We study the properties of the ternary infinite word p = 012102101021012101021012 ... , that is, the fixed point of the map h:0->01, 1->21, 2->0. We determine its factor complexity, critical exponent, and prove that it is 2-balanced. We…
We present an explicit algorithmic method for computing square roots in quaternion algebras over global fields of characteristic different from 2.
In this article, we prove that the density of integers $a, b$ such that $a^4+b^3$ is squarefree, when ordered by $\max\{|a|^{1/3},|b|^{1/4}\}$, equals the conjectured product of the local densities. We show that the same is true for…
An algorithm is given to factor an integer with $N$ digits in $\ln^m N$ steps, with $m$ approximately 4 or 5. Textbook quadratic sieve methods are exponentially slower. An improvement with the aid of an a particular function would provide a…
This work describes the number of restricted finite words in the alphabet A={a,b} required to identify an infinite word with some period n in the set of all infinite words in this alphabet given up to a shift. Also reviewed the case of…