combinatorial properties of strings of symbols from a finite alphabet. Also includes sequences such as the Thue-Morse and Rudin-Shapiro sequence.

# Questions tagged [combinatorics-on-words]

332 questions

**7**

votes

**4**answers

### Generalized repetitions of letters with limited amount of adjacent letters

Say I have the first $x$ letters of the alphabet, and I want to generate a sequence of length $y$, such that there are no more than $z$ adjacent repeated letters. For example, if $x = 2$, $y = 3$ and $z = 2$, here are all the valid sequences:
AAB…

Aditya Gupta

- 153
- 6

**7**

votes

**1**answer

### Does every sufficiently long string contain many repetitions of a string of bounded length?

Let $S$ be a finite set and $d > 0$. Does there exist $\ell > 0$ such that the following holds?
Every sufficiently long string with letters in $S$ contains at least $d$ consecutive copies of some string of length at most $\ell$.
For example, when…

Bart Michels

- 24,846
- 5
- 45
- 108

**7**

votes

**1**answer

### For what $n$ is $W_n$ finite?

Suppose, $W_n$ is the set of all words formed by letters '$a$' and '$b$', that do not contain $n$ same consecutive nonempty subwords (that means that for any nonempty word $u$, the word $u^n$ is not a subword of words from $W_n$) For example…

Chain Markov

- 14,796
- 5
- 32
- 111

**7**

votes

**1**answer

### Complexity of Thue-Morse Sequence

Consider the alphabet $\mathcal{A}=\{0,1\}$ and the substitution $\phi$ given by $ \phi(0)=01$, $\phi(1)=10$. Let $t$ be the point given by $t=\lim_{n\rightarrow\infty}\phi^n(0)$. Then $t$ is the Thue-Morse sequence; its first couple of characters…

Simon_Peterson

- 593
- 3
- 15

**6**

votes

**0**answers

### Maximal Hamming distance

Here is a combinatorial problem: let $\Sigma=\{\alpha_1,\ldots,\alpha_n\}$ be an alphabet and we consider any words over $\Sigma$ of length $n$. We also define over the set of such words the Hamming distance: $$d(\omega,\omega')=\#\{i\in…

infoStud

- 61
- 1

**6**

votes

**4**answers

### How to check if an integer has a prime number in it?

Is there any way by which one can check if an integer has a prime number as a subsequence (may be non-contiguous)?
We can check if they contain the digits 2,3,5 or 7 by going through the digits, but how to check if they contain 11, 13,... ?
One…

pranay

- 385
- 4
- 15

**6**

votes

**3**answers

### Four-letter word contains no two consecutive equal letters.

This is taken from the book on Combinatorics, by Daniel Marcus.
Request vetting:
A16: Find the probability that a four-letter word that uses letters from $A,B,C,D,E$ contains (a) no repeated letters; (b) no two consecutive equal letters.
(a)
Total…

jiten

- 3,471
- 2
- 10
- 25

**6**

votes

**1**answer

### Number of binary sequences with exactly $n$ distinct subsequences.

Prove that number of binary sequences that have exactly $n$ distinct subsequences (including empty one) is $\varphi(n+1)$(where $\varphi(n)$ is Euler's totient function). For example, There are $\varphi(8)=4$ sequences with $7$ distinct…

snowAuoue

- 319
- 1
- 8

**6**

votes

**1**answer

### Word problem and quotient group

Let $G$ be given by the group presentation $G = \langle a,b \mid S \rangle$, where $S = \{aa,bbb\}$. The formal definition of $G$ is:
Let $F$ be the free group on $\{a,b\}$. Let $H$ be the conjugate
closure of $S$, i.e. $H$ is the subgroup of $F$…

Wakaka

- 1,323
- 11
- 14

**6**

votes

**1**answer

### What is the max length string that can be formed using k distinct characters so that all of its substrings are unique.

Given k distinct characters , what is the max length string that can be formed using these characters one or more time so that all the sub-string whose size is greater than one are unique.
Eg - For k = 3 {a,b,c}
A string of max 10 length can be…

Sumit Joshi

- 181
- 3

**6**

votes

**2**answers

### Insertion and deletion of cubed words $w^3$

Evan Chen's seminal text presents the following as (spicy) problem 11C:
Consider the set of finite binary words. Show that you can't get from $01$ to $10$ using only the operation "insert or delete any cubed word $www$."
Given a word $w = a_1 a_2…

Sameer Kailasa

- 8,405
- 3
- 27
- 55

**6**

votes

**2**answers

### Describe and count the set of sequences containing $20$ or $02$

Let $X = \{ 0,1,2 \}$ be a ternary alphabet and denote by $X^*$ the set of finite sequences (i.e. strings) with three symbols. For $w \in X^*$ with $n$ the length of $w$ and $w = w_1 w_2 \cdots w_n$ denote by
$$\delta(w) = |\{ i \in \{ 2,\ldots, n…

StefanH

- 17,046
- 6
- 41
- 109

**5**

votes

**1**answer

### Recursive formula for a combinatorial problem and define the generating function

Question:
Let $\sigma=\{a,b,c\}$. How many words can we assemble without the substrings $'ab'$ and $'bc'$?
define the recursive formula.
define the generating function for this formula.
$Solution.A.$
For the first sub-question, we consider 3…

Chopin

- 862
- 1
- 13

**5**

votes

**4**answers

### Combinatorics - How many ways are there to arrange the string of letters AAAAAABBBBBB such that each A is next to at least one other A?

I found a problem in my counting textbook, which is stated above. It gives the string AAAAAABBBBBB, and asks for how many arrangements (using all of the letters) there are such that every A is next to at least one other A.
I calculated and then…

Boris Poris

- 401
- 2
- 8

**5**

votes

**3**answers

### How many different 4-digit numbers can be made with the digits from 12333210?

How many different 4-digit numbers can be made with the digits from $12333210$?
Attempt. So I've tried splitting into cases:
Case 1: Only single letters.
1 2 3 0, except for when 0 is at the first place, so total arrangements minus the…

Xetrez

- 355
- 1
- 8