| Issue |
RAIRO-Theor. Inf. Appl.
Volume 60, 2026
|
|
|---|---|---|
| Article Number | 19 | |
| Number of page(s) | 16 | |
| DOI | https://doi.org/10.1051/ita/2026020 | |
| Published online | 04 June 2026 | |
Hamming–Levenshtein gap of a string
1
King Fahd University of Petroleum and Minerals, College of Computing and Mathematics Department of Mathematics,
Dhahran,
Saudi Arabia
2
Department of Mathematics, Faculty of Mathematical, Physical and Natural Sciences of Tunis, University of Tunis El Manar,
El-Manar 1,
2092,
Tunisia
* Corresponding author: This email address is being protected from spambots. You need JavaScript enabled to view it.
Received:
15
October
2025
Accepted:
23
April
2026
Abstract
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.
Mathematics Subject Classification: 68R15 / 68W32 / 68P30 / 94A29
Key words: Hamming distance / Levenshtein distance / run-length encoding / string metrics
© The authors. Published by EDP Sciences, 2026
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.
