Let u, v be strings over an alphabet Σ with |Σ| ≥ 2. Let L (u, v) be the Levenshtein distance and, when |u| = |v|, let H (u, v) be the Hamming distance. For equal-length strings, L (u, v) ≤ H (u, v). For u ∈ Σ*, define hl (u): = max| v |=| u | (H (u, v) −L (u, v) ). Ruth and Lladser Discrete Math. 346 (2023) Paper No. 113310 showed that if the run-length of u is at most 2, then hl (u) = 0; conversely, hl (u) = 0 implies ρ (u) ≤ 2. For p ∈ 2, 3, we characterize all strings u with hl (u) = |u| – p. We also identify two types of strings u such that hl (u) = |u| – 4.
Alfuraidan et al. (Thu,) studied this question.