Left to Solve
Problems / MathOverflow (not formalized)

Neighbourhood of a word and Levenshtein distance

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

Statement

The Levenshtein distance or Edit distance between two strings and over a finite alphabet of size is the minimal number of insertions, deletions and replacements to make the strings equal.

For and we define :

For example if :

\begin{eqnarray*} N_1(AAA) &=& \{ AAA, AA, AAB, AAL, ABA, ALA, BAA, LAA, AAAA, BAAA, \\ &&LAAA, ABAA, ALAA, AABA, AALA, AAAB, AAAL \} \\ N_1(LAB) &=& \{LAB, LA, AB, LB, AAB, BAB, LBB, LLB, LAA, LAL, ALAB, \\ &&BLAB, LLAB, LAAB, LBAB, LALB, LABA, LABB, LABL\} \end{eqnarray*}

My goal is to compute for and fixed :

or an upper bound .

I conjecture that the maximum is reached for the words of the form :

where

Does anyone have an idea of how to compute or to prove this conjecture?

A special case has …

Posed by Distance · co.combinatorics, formal-languages, automata-theory, bioinformatics

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-238580.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-238580.lean

import Mathlib

/-!
# Neighbourhood of a word and Levenshtein distance

Source: https://mathoverflow.net/questions/238580
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_238580

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

theorem main : sorry := by
  sorry

end OMA.S_mo_238580