What's the minimum number M such that any string with M elements taking values from 1 to N will have a substring repeating itself at least 2 times in a row? The case where N=2 is trivial, you have M=4: 1212 for example the substring 12 repeats itself 2 times in a row, or 1111 where the substring 1 reapeats itself 4 times in a row. It's difficult to find the number even for N=3...
2025-01-13 05:43:17.1736746997
When will a string have a repeating substring?
130 Views Asked by Marcelo Campos https://math.techqa.club/user/marcelo-campos/detail At
1
There are 1 best solutions below
Related Questions in COMBINATORICS
- How many different games are there in bridge?
- Discrete mathematics, sets, increasing functions
- Number of necklaces of 16 beads with 8 red beads, 4 green beads and 4 yellow beads
- Logic & Reasoning Question
- Delannoy Paths and Pell Sequence Relation
- Combinatorics Problem - Clients using two seperate services
- There are few boxes labelled with $1,2,4,5,7,8,9$ respectively. How many ways to choose $5$ boxes and arranges the boxes in a row.
- Confused by book's given solution to basic combinatorial problem
- How many ways to write a number $n$ as the product of natural numbers $\geq 2$?
- Confused about how to solve basic combinatorial problem
Related Questions in COMBINATORICS-ON-WORDS
- Generating function for the set of $w$-free words.
- How many binary sequences are there which have given numbers of substrings 00, 01, 10, 11?
- When will a string have a repeating substring?
- Permutations- How many three letter words can you produce from the letters BALLSY?
- Combinatorics Name Generating
- "L-normal" finite strings?
- How can we have a circular sequence of $0$s and $1$s of length $d$ that are not periodic?
- Does $gcd(p,q)$ a period in string, where $p$ and $q$ are periods?
- Probability of a repeated substring in a randomly selected string
- Subsequence occurring exactly twice in pattern
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Refuting the Anti-Cantor Cranks
- Find $E[XY|Y+Z=1 ]$
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- What are the Implications of having VΩ as a model for a theory?
- How do we know that the number $1$ is not equal to the number $-1$?
- Defining a Galois Field based on primitive element versus polynomial?
- Is computer science a branch of mathematics?
- Can't find the relationship between two columns of numbers. Please Help
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- A community project: prove (or disprove) that $\sum_{n\geq 1}\frac{\sin(2^n)}{n}$ is convergent
- Alternative way of expressing a quantied statement with "Some"
Popular # Hahtags
real-analysis
calculus
linear-algebra
probability
abstract-algebra
integration
sequences-and-series
combinatorics
general-topology
matrices
functional-analysis
complex-analysis
geometry
group-theory
algebra-precalculus
probability-theory
ordinary-differential-equations
limits
analysis
number-theory
measure-theory
elementary-number-theory
statistics
multivariable-calculus
functions
derivatives
discrete-mathematics
differential-geometry
inequality
trigonometry
Popular Questions
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- How to find mean and median from histogram
- Difference between "≈", "≃", and "≅"
- Easy way of memorizing values of sine, cosine, and tangent
- How to calculate the intersection of two planes?
- What does "∈" mean?
- If you roll a fair six sided die twice, what's the probability that you get the same number both times?
- Probability of getting exactly 2 heads in 3 coins tossed with order not important?
- Fourier transform for dummies
- Limit of $(1+ x/n)^n$ when $n$ tends to infinity
As requested in the comments...
Words of the desired type are said to be "square free". As the OP correctly observes, for binary strings there aren't many instances. $0,1,01,10,101,010$ are the only examples. Somewhat surprisingly, however, even for ternary strings there are infinitely long examples. Wikipedia has a good survey here
Perhaps the simplest, and so far as I know the first, example of an infinite square free ternary word was produced by Thue. It begins with the so-called Thue-Morse binary string, obtained by starting with either character and then successively appending the complement of what's come before. Thus:
$$1,\;10,\;1001,\;10010110,\;1001011001101001,\dots$$
Thue's square free example is then derived from this by taking successive differences. Thus:
$$-1,0,1,-1,1,0,-1,\dots$$
References for these and related results can be found in the Wikipedia article linked to earlier. The proof that the difference sequence of the Thue-Morse word is square free is somewhat lengthy, but it isn't difficult. A good reference for that can be found here.