Left to Solve
Problems / MathOverflow (not formalized)

counting patterns in a word

Open, not yet stated in LeanMathOverflow (not formalized)CombinatoricsComputational Complexitydifficulty55/100

Statement

Do algorithms exist to find all the patterns in a word?

I would like to count all the 3-step increasing sequences (123 i.e. 123, 234 & 345) in some word in the alphabet {1,2,3,4,5} such as "51234321343221343234". I don't care about spacing, so the subword 234 is good, but 23**4 is also good.

What if I ask these subwords be disjoint? I would expect a Robinson-Schensted-like algorithm except the increasing subsequences are of a fixed length.

Do asymptotics exist in either case?

How about patterns which are not necessarily increasing like 121 (i.e. 121,232,343,454,34*3, etc.)?

e.g. 51234321343221343234 has 343,121, 232,343,343 with 52124 left over.

and are "equivalent up to translation" if there is a single with . A "pattern" an equivalence class of words equivalent up to translation. An "occurrence" of a pattern is an ordered subset of letters in a word equivalent to the given patterns. The bold numbers in 512 3 43213 4 32213432 3 4 are an occurrence the pattern 121.

Posed by john mangual · co.combinatorics, computational-complexity

This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-87386.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.

Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.

Step 1: state it in Lean. The file your agent writes: statements/mo-87386.lean

import Mathlib

/-!
# counting patterns in a word

Source: https://mathoverflow.net/questions/87386
Credit: @<your GitHub handle>

State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification.
Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging.
-/

namespace OMA.S_mo_87386

-- definitions the statement needs (no sorry, no axiom)

theorem main : sorry := by
  sorry

end OMA.S_mo_87386