Abstract
Let be a nonempty set of characters, called an alphabet. The run-length encoding algorithm processes any nonempty string u over and produces two outputs: a k-tuple , where each is a character and ; and a corresponding k-tuple of positive integers, so that the original string can be reconstructed as . The integer k is termed the run-length of u, and symbolized by . By convention, we let . In the Euclidean space , the volume of a sphere is determined solely by the dimension n and the radius, following well-established formulas. However, for spheres of strings under the edit metric, the situation is more complex, and no general formulas have been identified. This work intended to show that the volume of the sphere , composed of all strings of Levenshtein distance 1 from u, is dependent on the specific structure of the “-decomposition” of u. Notably, this volume equals , where represents the run-length of u and denotes its length (i.e., the number of characters in u). Given an integer , we present a partial result concerning the computation of the volume in the specific case where the run-length . More precisely, for a fixed integer and a character , we explicitly compute the volume of the Levenshtein sphere of radius p, centered at the string . This case corresponds to the simplest run structure and serves as a foundational step toward understanding the general behavior of Levenshtein spheres.
Keywords:
edit distance; Hamming distance; inclusion–exclusion principle; run-length encoding; sphere of strings MSC:
05A20; 68R15
1. Introduction
The Levenshtein metric [1], denoted , is widely used for identifying the closest valid strings to a misspelled term by evaluating edit distances. This metric is also pivotal in genetic sequence comparison, where it quantifies the count of mutations required to transform one sequence into another, thereby elucidating evolutionary relationships. Furthermore, it plays a significant role in plagiarism detection, text similarity analysis, and the comparison of documents or code to identify discrepancies (see, for instance, [2]).
In natural language processing (NLP), the edit metric is crucial for tasks like machine translation (see [3,4]), where it helps measure the similarity between machine-generated translations and human-created reference texts. Additionally, it is employed to detect duplicate records in databases by assessing the similarity between entries.
In voice recognition, the edit metric serves to accurately compare phonetic transcriptions, aiding in the correct identification of spoken strings [5]. Moreover, it helps correct OCR errors by suggesting the most likely corrections based on the recognized text and a reference dictionary.
The Hamming metric, extensively used in coding theory, particularly in error-correcting codes like Hamming codes, is essential for detecting and correcting errors in data transmission or storage (see [6,7,8]). It is also used in computer science for comparing binary data, such as hashes or binary fingerprints [9].
In bioinformatics, the Hamming metric is utilized to compare genetic sequences or protein structures of equal length, accounting for substitutions without considering insertions or deletions. Both the Hamming and edit metrics are effective tools in bioinformatics and computational biology (see [10,11]).
The Hamming metric is also applied in machine learning for clustering and classification tasks, particularly with binary or categorical data.
Run-length encoding is a fundamental data compression technique where sequences of the same data value, called runs, are substituted by a unique value followed by a count. This is especially effective for compressing data with many runs, such as simple graphics and animations (see [12]).
Throughout this paper, represents a (finite) alphabet of size ; denotes the set of all finite strings, including the empty string ; and is the set of all nonempty strings over .
Given a nonempty string u of length n over the alphabet , produces two k-tuples:
- (i)
- , where each is a character and ;
- (ii)
- , where each , with .
The integer k, known as the run-length of u, is denoted . By convention, we let .
For , with , and a vector , the sphere and ball are specified by
where represents the Euclidean norm. The volumes of and of rely exclusively on the radius r, independent of the center .
If u is a string, we denote its length by , that is, the number of characters in u. The set of all strings of length n formed from the alphabet is denoted by .
For the Hamming and Levenshtein metrics and on the monoid of strings over the alphabet of size s, consider and a string u of length n. We define
For further information regarding volume formulas for balls of strings, see [13].
Given a string u of length n over an alphabet , the volumes of and are precisely and , respectively (see Section 2). These volumes are solely determined by , the alphabet size s, and the radius p. However, for the edit metric, this is not the case. We are aiming to demonstrate that the volume of (consisting of Levenshtein neighbors of u) is influenced by the structure of the “-decomposition” of u. Specifically, this volume equals .
Given integers and and a character , we compute the volume of the Levenshtein sphere .
2. Spheres of Strings Under the Hamming Metric
Let be an alphabet of size , and let represent the set of all possible strings over , including the empty string . The set is defined as , which includes all nonempty strings over .
Consider two strings u and v over , both sharing the same length, denoted . The Hamming metric between u and v, denoted by , is the count of positions where the corresponding characters in u and v differ. Alternatively, it is the smallest number of substitutions needed to transform one string into the other.
Named after Richard Hamming, the Hamming metric was initially introduced to aid in error detection and correction in data transmission [6]. Since then, it has been applied in various fields, particularly in coding theory and information theory.
It is worth noting that the Hamming distance on strings is closely related to hypercubes and k-ary n-cube structures; see, for instance, [14,15].
Formally, if and are two strings of length n over the alphabet , the Hamming metric is specified by where if and 1 otherwise. This function essentially counts the total number of positions i where and differ.
This section reviews the determination of the count of strings v that have a Hamming distance p from a string u.
We now discuss a well-known formula for the volume of a p-Hamming sphere, demonstrating that depends solely on p, the length , and the size s of the alphabet .
To construct all the strings in , we select a subset I of with size p, which can be achieved in ways. For each chosen subset I, there are possible p-tuples of characters , so that . This results in the expression
Another approach to derive this formula involves using the “combinatorial additive rule”. Let . Consider the mapping
Given that and noting that
is bijective, we can infer that
This confirms the following desired result.
Proposition 1.
The volume of the p-Hamming sphere is expressed by the formula where .
3. Scattered Strings and Run-Length Encoding
Run-length encoding is a simple yet effective data compression method where sequences of repeated elements are substituted by a unique value followed by a count of its occurrences. The concept of has its roots in early developments in data compression and digital image processing.
In 1961, Freeman introduced a method for encoding lines and curves in digital images that utilized run-length encoding [12]. This work laid the foundation for the widespread use of in various fields, including image compression, data transmission, and digital storage.
operates by substituting consecutive identical characters in a string with the character itself succeeded by the count of its repetitions. For instance, the string “bbbabb” would be encoded as “3b1a2b”. This method is particularly effective for compressing data that contains many consecutive repeating characters, such as simple visual graphics, text with repeated letters, or other forms of repetitive data.
This section presents a fundamental theorem concerning the decomposition of a nonempty string using run-length encoding .
To begin, we introduce the following concept.
Definition 1.
A string is termed scattered if either or , where each is a character and . The set of all scattered strings of length n is denoted .
Partitioning an integer into k positive parts involves expressing n as the sum , where each . This concept is central to number theory and combinatorics, as it explores the different ways in which an integer can be decomposed into a specific number of summands. Each partition corresponds to a unique combination of these summands that collectively equal the original integer n. The ordered k-tuple is known as a k-partition of n, and the set of all such k-partitions is denoted .
Theorem 1
(-decomposition). Let u be a nonempty string over Σ with length n. There are a single positive integer k, a unique scattered string , and a unique k-partition of n so that
where this expression is termed the -decomposition of u.
Proof.
Existence. We will establish the existence through induction on n. For the initial step, where , let . We can simply set , , and .
Assume, the decomposition is ensured for all nonempty strings of length n. Let be a string of length . By the inductive assumption, there exist , a sequence , and an s-partition of n such that
Two cases may be considered.
If , then the required decomposition of u is , associated with , and the s-partition of is .
If , then the decomposition of u is , where , and the -partition of is .
Uniqueness of the decomposition. Again, we proceed through induction on n. For the initial step, where , suppose
then , , and .
Now, for a given positive integer n, assume that every nonempty string u with possesses a unique decomposition. Let be a nonempty string of length , and assume
are two decompositions of u. Thus, .
If , then the equality implies , since is scattered. Consequently, , establishing the decomposition as unique.
If , then necessarily (since is scattered). We assert that . Indeed, if (for instance) , then we would have . Therefore, , contradicting the condition that is scattered. As a consequence, . Thus, we obtain . By the inductive assumption, we derive , , and for . This confirms that the decomposition is unique. □
The above result motivates the following definitions.
Definition 2.
The integer k in the previous theorem is termed the run-length of u, referred to as . The scattered string is termed the run-root of u, denoted by . The k-tuple is called the run-partition of u and is referred to as .
Remark 1.
Theorem 1 can be reformulated using functions. For each positive integer n, the map
defines a bijection.
4. Unit Spheres of Strings Under the Levenshtein Metric
Unlike the Hamming metric, where the volume of a unit sphere depends only on the length of the string and the size of the alphabet, the volume of under the Levenshtein metric exhibits a more intricate dependence. Specifically, it is entirely determined by three parameters: the run-length of the string u, the size s of the alphabet , and the length of u. This dependence highlights the sensitivity of the Levenshtein metric to the internal structure and redundancy within strings, especially with respect to repeated characters and their arrangements.
For further detailed comparisons between the Hamming distance and the Levenshtein distance, we refer the reader to [16].
To proceed with the calculation of , the number of strings at Levenshtein distance one from u, we begin by introducing some notation and conventions that are used throughout the computation.
Notation 1.
Let u be a string of length n over the alphabet Σ, and let .
- 1.
- For real numbers , the notation represents the intersection .
- 2.
- If , where , , and , then v is referred to as (the prefix of u of length i), and w is referred to as (the suffix of u of length j). By convention, .
- 3.
- denotes the set of all strings obtained from u by deleting one character. The cardinality of is referred to as the deletion degree of u and denoted by . By convention, . Using prefix–suffix notation,
- 4.
- denotes the set of all strings obtained from u by inserting one character. The cardinality of is referred to as the insertion degree of u and denoted by . Using prefix–suffix notation, we have
- 5.
- represents the set of all strings obtained from u by replacing one character with a character from . The cardinality of is referred to as the substitution degree of u and denoted by . By convention, . Using prefix–suffix notation, we have
- 6.
- For , we denote by the string obtained from u by deleting the character , i.e., .
- 7.
- For and , we denote by the string obtained by inserting the character a at position in u, i.e., .
- 8.
- For and , we denote by the string obtained by substituting the character with a, i.e., .
Remark 2.
Applying a basic combinatorial rule, namely, the additive rule, for any string u over Σ we have
In what follows, let be a nonempty string over of length n. The enumeration of requires a sequence of lemmas.
From Theorem 1, we derive the following lemma.
Lemma 1.
The substitution degree of the string u equals .
The strings and share a common prefix of length and a common suffix of length . Consequently, the equality is equivalent to the condition . This insight results in the following lemma.
Lemma 2.
Let be indices in . Then, is equivalent to for every .
This indicates that whenever consecutive characters are identical, deleting either of them results in the same string. As a consequence, we have the following corollary.
Corollary 1.
The deletion degree of a string u equals , where denotes the run-length of u.
For the insertion degree, the two strings and share a common prefix of length i and a common suffix of length . Therefore, the equality is equivalent to . This insight results in the following lemma.
Lemma 3.
Let be indices in , and let . Then, means for every .
Now, we provide the enumeration of for a run-length 1 string.
Lemma 4.
Let a be a character and , then the insertion degree of the string is
Proof.
It is clear that and by Lemma 3 the union is disjoint. Consequently,
□
Lemma 5.
Let be a string over Σ, with run-length , and let
the following properties are satisfied:
- 0.
- 1.
- If , then
- 2.
- If and , then
- 3.
- If , then .
Proof.
- 1.
- Letfor some and . In turn, there is , , and so that and . We consider four cases.Case 1: and . Based on Lemma 3, the two equal insertions of u lead to , contradicting the -decomposition of u. So this case cannot happen.Case 2: and . Following Lemma 3, we obtain , andCase 3: and . Lemma 3 guarantees the equality . This givesCase 4: and . In this scenario, and , and as a consequence, can be any character of .As a conclusion, we obtain
- 2.
- Letfor some and . So there exist , , and so that and .Based on Lemma 3, this results in .We assert that . Otherwise, by Lemma 3, the equality of two insertions of u implies that , which contradicts the -decomposition of u.We also claim that . Otherwise, by Lemma 3, , again obtaining a contradiction.As a consequence,Additionally, it is clear that . Therefore,
- 3.
- If , and , then there would be a stringwith and . Again, using Lemma 3, , that is not possible.
□
The earlier lemma highlights the existence of bijections: between and , and between and . Additionally, the intersections and are singletons. Using Lemma 4, the following cardinalities are derived.
Corollary 2.
- 1.
- ;
- 2.
- ;
- 3.
To evaluate , we use the inclusion–exclusion principle (or the sieve formula), first introduced by Abraham de Moivre as part of his efforts to understand and quantify probabilities [17].
Recall that if are finite sets, then the cardinality of their union equals
The following lemma indicates that the insertion degree of a string u is solely determined by and .
Lemma 6.
The insertion degree of u equals
Proof.
Lemma 4 confirms the validity of the given equality for strings with a run-length .
Now, we extend this result to strings with a run-length .
Applying the inclusion–exclusion principle in conjunction with Lemma 5, we obtain
□
By combining Lemma 1, Corollary 1, and Lemma 6, we can now present the main result of this paper, which calculates the volume of .
Theorem 2.
The volume of is given by
Corollary 3
(Minimum and maximum values of volumes). Let and Σ be an alphabet of size . The following properties are satisfied.
- 1.
- The minimum value of is . This value is attained by strings structured as , where a is a character from the alphabet.
- 2.
- The maximum value of is . This value is attained by strings u where the characters are maximally scattered.
- 3.
- Intermediate value result: Every integer in is the volume of for some string u of length n.
Proof.
Clearly, minimizing the value of is equivalent to minimizing . This occurs when , which corresponds to for some character a. Therefore, the minimum value is .
Similarly, the maximum value of is attained when is maximized. This occurs when , corresponding to a scattered string u. The maximum value is .
Now, let . Then for some integer . Let v be a scattered string of length with a tail character , and let . Then . By Theorem 2,
□
5. Spheres of Strings with Centers of Run-Length 1
This section is devoted to computing the cardinality of the Levenshtein sphere , where is a fixed integer and is a string consisting of n repetitions of a single character a from the alphabet . In other words, u has run-length one.
This special case is of particular interest due to the structural simplicity of u, which allows for an explicit enumeration of all strings at Levenshtein distance p. The analysis will rely on combinatorial principles and recursive formulations of the Levenshtein distance.
We begin by recalling a classical result often referred to as the recurrence relation for the Levenshtein distance, which forms the foundation for our computations; the details may be found, for example, in [18].
Remark 3.
Let Σ be a nontrivial alphabet (i.e., of cardinality at least 2). Let be strings over Σ; ε be the empty string; and be single characters. Then, the following properties hold.
- 1.
- .
- 2.
- .
- 3.
- 4.
- .
- 5.
- If , then
The following result provides a formula for computing the Levenshtein distance between a string , which has run-length 1, and an arbitrary string v of the same or varying length.
Remark 4.
Before stating the result, we first show how to transform the string v into the string by means of edit operations. Three situations arise:
- 1.
- Case 1: .Replace every character of v that is not equal to a with a, obtaining the intermediate string . The number of such substitutions is , where denotes the number of occurrences of a in v.Then, insert the character a exactly times to produce the string .The total number of edit operations is thereforewhich shows that .
- 2.
- Case 2: and .Delete every character of v that is not equal to a, obtaining the string .Then, delete occurrences of a to obtain the string .The number of edit operations performed iswhich implies .
- 3.
- Case 3: .Delete characters of v that are not equal to a, producing a string w of length n.Then, substitute each character of w that is not equal to a with a, resulting in the string .The total number of edit operations ishence .
The following result shows that the inequalities obtained in cases 1, 2, and 3 are in fact equalities.
Theorem 3.
Let v be a string, n a non-negative integer, and a a character. Then, the Levenshtein distance between the constant string and v is given by
where denotes the length of v, and is the number of occurrences of the character a in v.
Proof.
The formula given in the theorem can be equivalently written in a more compact form as
We proceed by induction on .
Base case: Suppose . Then , and we have
Hence, the formula holds in the base case.
Inductive step: Let k be a non-negative integer. Assume that for every non-negative integer n and every string w such that , the formula given in the theorem for holds.
Now, let v be a string such that . Write , where w is a string and b is a character. We consider two cases.
Case 1: If , then since , the induction hypothesis gives
Case 2: If , then by Remark 3, we have
By the induction hypothesis, since , , and , we deduce the following:
From Equation (1), it follows that
We now consider several sub-cases:
This completes the induction. □
The above theorem allows us to compute the volume of the Levenshtein sphere . In line with the three cases considered in the computation of in Theorem 3, we begin by establishing the following lemma.
Lemma 7.
Let a be a character in an alphabet Σ of size , and let and be integers. Set
The following statements hold:
- 1.
- 2.
- 3.
Proof.
- 1.
- A string v lies in if and only if ; equivalently, . Consequently, whenever .Assume now that . Any string v of length in contains exactly occurrences of a; all remaining characters belong to . The number of such strings of length j isHence,
- 2.
- A string v with length lies in precisely when and . Set ; thenThe number of strings v of length for which equalsConsequently,
- 3.
- Strings satisfy , , and . Set ; then . For such an integer j, the number of strings v of length with equals
- -
- If , then the admissible values of j are . Hence,
- -
- If , then the admissible values of j are . Thus,
□
Taking into consideration Lemma 7, we are ready to provide a formula of the volume of the Levenshtein sphere .
Theorem 4.
Let a be a character of an alphabet Σ with . For integers and , the volume of the Levenshtein sphere centered at with radius p is given by
In [13], the authors provided a formula for the volume of the sphere , where and is an integer. This formula can be recovered from the above theorem by taking .
Corollary 4
([13]).
Proof.
By Theorem 4, we have
Since
it follows that
□
In [13], the authors also suggested the following conjecture.
Problem 1
([13]). There is a function that satisfies the following conditions:
- is monotonically increasing as ;
- as ,
so that if , then
where s is the size of Σ.
We conclude this section by formulating the following open problems, which naturally arise from the preceding analysis. These problems highlight directions for future investigation and aim to deepen our understanding of the combinatorial structure of Levenshtein spheres.
Problem 2.
Given an integer and a string u over an alphabet Σ of size s, a considerably more difficult task is to determine the volume of the Levenshtein sphere when the run-length of u satisfies .
Problem 3.
Given an alphabet Σ, an integer , and two strings over Σ of the same length, under what conditions on and does the equality hold?
6. Pseudocode and Illustrative Examples
In this section we present concise pseudocode for our principal computational tasks (Algorithm 1):
- 1.
- Evaluating the Levenshtein distance between arbitrary strings;
- 2.
- Enumerating the volume of the Levenshtein sphere of radius p centered at a fixed string u, denoted .
To demonstrate the effectiveness of this pseudocode and to corroborate the theoretical results established earlier, we also include a series of tables (Table 1, Table 2, Table 3, Table 4, Table 5 and Table 6). Each table showcases carefully chosen input strings and parameters (run-length), together with the corresponding output values. The examples serve as a practical guide for the implementation and highlight how the run-length , the word length , the radius p, and the alphabet size s influence the cardinality of .
Table 1.
Levenshtein spheres of center u and radius over the alphabet , illustrating the cardinality stated in Theorem 2.
Table 2.
Levenshtein spheres over the alphabet .
Table 3.
Levenshtein spheres over , illustrating Theorem 4.
Table 4.
Levenshtein spheres over the alphabet , illustrating the volume computation described in Theorem 4.
Table 5.
Illustration of for over the alphabet with fixed and run-length . See Problem 3 for further discussion.
Table 6.
Distinct Volumes for equal run-partitions (the alphabet is ).
Implementing this pseudocode in Python 3.12 yields the sequence of tables presented in this section.
We now present a series of tables that illustrate the theoretical results established in the preceding sections. These tables are intended to highlight how the structure of the string u, particularly its length and run-length, influences the cardinality of the corresponding Levenshtein sphere . Each table serves to validate and exemplify the formulas and properties discussed earlier.
| Algorithm 1 Enumerate all strings at Levenshtein distance p from a given string u |
|
Observe from the above table that for radii , the equality does not necessarily hold, even when the two strings share the same run-length and length . By contrast, when , these two conditions are sufficient to guarantee (see Theorem 2).
7. Discussion
In this paper, we established a closed-form expression for the volume of the unit Levenshtein sphere, that is, the set expressed as a function of the string length , the alphabet size s, and the run-length .
To provide a comparative perspective, we also revisited the classical Hamming metric, for which we derived exact counts of Hamming sphere volumes. This comparison highlighted the structural differences between the Hamming distance, which only accounts for substitutions, and the more flexible Levenshtein distance, which captures a broader spectrum of edit operations—including insertions, deletions, and substitutions.
The general problem of determining the volume for an arbitrary radius remains a challenging and largely unresolved combinatorial question. Nonetheless, for strings of the form —i.e., strings with run-length —we obtained a closed-form expression for valid for all .
The difficulty in deriving a closed-form expression for when stemmed from the absence of an explicit formula for the Levenshtein distance , even in seemingly simple cases. For instance, in the case where (so that ), no general closed-form expression for was known. This lack of an analytic formula complicated the enumeration of all strings v such that , and thereby hindered the computation of .
When the run-length satisfied , the allowable transformations are strongly influenced by the run-partition , which records the lengths of the successive character runs in u. We generated experimental values for the volumes for selected strings with , providing benchmark data that future theoretical developments must aim to explain.
A key open direction is to identify and formalize the structural patterns that emerged in the case and translate them into rigorous closed-form expressions.
Beyond their intrinsic combinatorial appeal, explicit formulas for Levenshtein sphere volumes have concrete applications in areas such as error-correcting codes(particularly in sequence alignment) and compressed-text indexing. Advancing our understanding of the multi-run case thus offers both theoretical insight and practical impact.
Author Contributions
Methodology, S.A. and O.E.; Investigation, S.A. and O.E.; Writing—review & editing, S.A. and O.E. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.
Acknowledgments
The authors gratefully acknowledge the valuable comments and suggestions of the three anonymous referees, which significantly improved both the mathematical content and the clarity of the exposition. The authors also acknowledge the support provided by the Deanship of Research at King Fahd University of Petroleum and Minerals, Saudi Arabia.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Levenshtein, V.I. Binary codes capable of correcting deletions, insertions, and reversals. Sov. Phys. Dokl. 1966, 10, 707–710. [Google Scholar]
- Barrón-Cedeno, A.; Stein, B.; Rosso, P. Cross-language plagiarism detection. Lang Resour. Eval. 2011, 45, 45–62. [Google Scholar]
- Brill, E.; Moore, R.C. An improved error model for noisy channel spelling correction. In Proceedings of the 38th Annual Meeting on Association for Computational Linguistics, Hong Kong, China, 3–6 October 2000; pp. 286–293. [Google Scholar]
- Koehn, P. Europarl: A Parallel Corpus for Statistical Machine Translation. In Proceedings of the 10th Machine Translation Summit, Phuket, Thailand, 12–16 September 2005; pp. 79–86. [Google Scholar]
- Jurafsky, D.; Martin, J.H. Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition; Prentice Hall: Upper Saddle River, NJ, USA, 2008. [Google Scholar]
- Hamming, R.W. Error detecting and error correcting codes. Bell Syst. Tech. J. 1950, 29, 147–160. [Google Scholar] [CrossRef] [Scilit]
- Katz, J.; Lindell, Y. Introduction to Modern Cryptography, 3rd ed.; Chapman & Hall/CRC Cryptography and Network Security; CRC Press: Boca Raton, FL, USA, 2021. [Google Scholar]
- Lin, S.; Costello, D.J. Error Control Coding: Fundamentals and Applications, 2nd ed.; Pearson/Prentice Hall: Upper Saddle River, NJ, USA, 2004. [Google Scholar]
- Andoni, A.; Indyk, P. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. Commun. ACM 2018, 51, 117–122. [Google Scholar] [CrossRef] [Scilit]
- Amir, A.; Amit, M.; Landau, G.M.; Sokol, D. Period recovery of strings over the Hamming and edit distances. Theor. Comput. Sci. 2018, 710, 2–18. [Google Scholar] [CrossRef] [Scilit]
- Marçais, G.; DeBlasio, D.; Pandey, P.; Kingsford, C. Locality-sensitive hashing for the edit distance. Bioinformatics 2019, 35, i127–i135. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Malon, S.; Freeman, H. On the encoding of arbitrary geometric configurations. IRE Trans. EC 1961, 10, 260–268. [Google Scholar]
- Koyano, H.; Hayashida, M. Volume formula and growth rates of the balls of strings under the edit distances. Appl. Math. Comput. 2023, 458, 128202. [Google Scholar] [CrossRef] [Scilit]
- Wang, M.; Wang, S. Connectivity and diagnosability of center k-ary n-cubes. Discrete Appl. Math. 2021, 294, 98–107. [Google Scholar] [CrossRef] [Scilit]
- Wang, M.; Lin, Y.; Wang, S. The connectivity and nature diagnosability of expanded k-ary n-cubes. RAIRO Theor. Inform. Appl. 2017, 51, 71–89. [Google Scholar] [CrossRef] [Scilit]
- Bakhtary, P.; Echi, O. On minimal Hamming compatible distances. RAIRO Theor. Inform. Appl. 2014, 48, 495–503. [Google Scholar] [CrossRef] [Scilit]
- de Moivre, A. The Doctrine of Chances: Or, a Method of Calculating the Probabilities of Events in Play; Chelsea Publishing Company: New York, NY, USA, 1967. [Google Scholar]
- Navarro, G. A guided tour to approximate string matching. ACM Comput. Surv. 2001, 33, 31–88. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).