EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS 2025, Vol. 18, Issue 2, Article Number 5873 ISSN 1307-5543 – ejpam.com Published by New York Business Global Peak-Shift Control Codes for the L1 Metric Nawaf A. Alqwaifly Department of Electrical Engineering, College of Engineering, Qassim University, Buraydah, Saudi Arabia Abstract. We propose a new efficient design of q-ary block codes capable of controlling single peak shifts of one direction (left or right shift) of size l. The proposed design is based on elementary symmetric functions. We show that the problem of controlling the lL(lR)-peak shift is equivalent to the efficient design of some L1 metric asymmetric error control codes on the natural alphabet N. From the relations with the L1 distance error control codes and constant weight codes, new improved upper and lower bounds on the size of the optimal single lL(lR)-peak shift error correcting codes are given. Furthermore, some non-systematic code designs are also given. Decoding can be efficiently performed by algebraic means with the Extended Euclidean Algorithm. 2020 Mathematics Subject Classifications: 11T71, 14G50, 94A60 Key Words and Phrases: Recording codes, Peak-shift correction, L1 distance, Asymmetric distance, Elementary symmetric functions, Constant weight codes, Design, Algorithm 1. Introduction In high density magnetic recording systems, peak-shifts (or bit-shifts) and randomly generated errors are considered to be one of the major impairments responsible for most of the errors [1],[2]. Initially, Kuznetsov and Han Vinck [3] related the problem of peak-shift correction to the construction of block codes over the ring of integers modulo q. These codes are capable of correcting specific types of double errors caused by single peak-shifts. The research was exponentially propelled when Levenshtein and Han Vinck proposed a code that can correct a single peak-shift of size l [4]. They proposed perfect (d, k)-codes capable of correcting peak-shift of size l using weight sequences in Abelian groups. Klove [5] proposed a special case of the code in [4] and can correct a single peak-shift or an insertion of a zero and can correct a single transition or transposition. He constructed a large class of perfect constant-weight codes which can correct a single insertion, deletion, or peak-shift. Both [4], [5] restricted their attention to the prefect (d, k) sequences, since many popular recording codes for peak detection channels fall into the class of (d, k) sequences. In [6], a new code design has been proposed that can correct insertions/deletions of the symbol 0 using the elementary symmetric functions. A proposed approach using coset graphs and DOI: https://doi.org/10.29020/nybg.ejpam.v18i2.5873 Email address: nkoiefly@qu.edu.sa (N. A. Alqwaifly) https://www.ejpam.com 1 Copyright: © 2025 The Author(s). (CC BY-NC 4.0) N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 2 of 16 matrix operations is discussed for secure communication through reliable S-box design in [7] and an efficient S-box design scheme is described for image encryption based on the combination of a coset graph and a matrix transformer in [8]. In this paper, we are interested in the efficient design of q-ary block codes that are capable of correcting a single left (right) peak-shifts of size l or less based on the proposed codes in [6], where l∈N. Peak-shift errors represent a distinct form of misalignment of symbol positions com- pared to erased or inserted errors, where the length of the strings changes. This is common in applications like magnetic recording, DNA storage and sequencing, quantum commu- nication channels, etc. Although numerous coding techniques for peak-shift error control exist in the literature, the proposed coding framework is different from those techniques by implementing the constant weight codes and elementary symmetric functions. It is a new approach in this area that allows one to handle lL(lR)-peak shift errors by utilizing asymmetric distance models. It opens the door for more researchers to look at the mis- alignment of symbol positions from different perspectives and might lower the redundancy requirements to detect errors and eventually correct them. In this work, we use l as a representation of the peak-shift error. So, l can be a lL peak shift or a lR peak shift error, where lL and lR represent left and right peak-shift errors, respectively. The main contributions of this work are as follows. (i) We propose a new coding framework to handle lL(lR)-peak shift errors using constant weight codes and elementary symmetric functions. (ii) We show that the problem of controlling the lL(lR)-peak shift is equivalent to the efficient design of some L1 metric asymmetric error control codes on the natural alphabet N. (iii) Some efficient non-systematic lL(lR)-peak shift error of size l correcting codes are designed. (iv) Some improved upper and lower bounds for the lL(lR)-peak shift codes are presented. This paper is organized as follows. Section 2 briefly reviews the basic definitions, nota- tions, and the characterization of l-peak-shift error correcting codes and the L1 distance. Section 3 focuses on a non-systematic code construction and shows its l-peak shift cor- recting capability. It also gives the upper and lower bounds and the decoding algorithm. Finally, the paper is concluded in Section 4. 2. Peak-Shifts and the L1 Metric In this section, the connection between the peak-shifts control codes and the L1 metric is shown, but first some basic definitions and background are presented. Let X ∈ Zn 2 be a binary sequence of length n, where n ≥ 1. A code C is a set of sequences (codewords), X ′ is, where i ∈ {1, |C|}. Furthermore, a code C is a single peak- shifts of size l controlling code if any codeword is uniquely determined from any word that N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 3 of 16 can be obtained from it by a single left (right) peak-shifts in at most l digits, where l ∈ N. For example, if X = 1000010001∈Z10 2 (1) is a transmitted binary sequence of length n = 10, then Y = 0011000010∈Z10 2 (2) is the received sequence of length n̂ = 10 obtained from X by shifting the first-one two positions to the right, shifting the second-one two positions to the left, and shifting the third-one one position to the left, totaling l = 5 shifts (Figure 1). The focus is only on a single shift occurs; meaning just only one of any 1’s experiences a shift of size l in the previous example. Figure 1: Illustration of Peak-Shift Errors The following L1 metric distances between q ary words X,Y ∈ Zn q are important to describe l peak shift error correction codes in Section 3. Let x .− y def = max {0, x− y} for x, y∈Zq. Then Symmetric L1: dsyL1 (X,Y ) def = |Y .−X|+|X .−Y |, Asymmetric L1: dasL1 (X,Y ) def = max{|Y .−X|, |X .−Y |}. (3) For example, if q = 5, n = 9, X = 014230120, Y = 432130001 then |X .− Y | = 6, |Y .− X| = 7, and dsyL1 (X,Y ) = 6 + 7 = 13, dasL1 (X,Y ) = max{6, 7} = 7. Note that if X and Y are the transmitted and received words, respectively, then Y .− X and X .− Y give the increasing (right shift) and decreasing (left shift) error vectors, respectively. N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 4 of 16 Constant weight codes play an important role in the code design and hence in the derivations of the upper and lower bounds. So, given n,w∈N and any numeric set A ⊆ N as alphabet, let B(A,n,w) def = {X∈An : wL1(X) = |X| = w} (4) be the set of all word over A of length n and constant weight w. From [6], if A = Z∞ = N, then |B(N, n, w)| = ( n+ w − 1 n− 1 ) (5) Figure 2 illustrates the decomposition into constant weight codes. Figure 2: Decomposition into Constant Weight Codes Levenshtein in [4, 9], introduced the following representation of X. If X ∈Z∗ 2 then X can be uniquely written as X = 0v110v210 . . . 010vw10vw+1 (6) for all integers h∈ [1, w + 1], vh def = vh(X)∈Zn−w+1 ⊆ N is the h-th run of 0’s in the word X, where n∈N is the length of X and w = wH(X)∈ [0, n] is the Hamming weight of X. Note that vw+1 = n− w(X)− w∑ i=1 vi. (7) So, V (X) def = (v1, v2, . . . , vw, vw+1). (8) Now, restricting the discussion to sequences of fixed length n and fixed Hamming weight w as the representation above, consider the following bijective function. I : Zn 2 → Zw n ⊂ N∗ (9) which associates any V (X)∈Z∗ w+1 represented as in (8) with I(X) def = (i0, i1, . . . , iw−1)∈N∗. The functions I(X) and V (X) are related as follows. X = 0v110v210 . . . 010vw10vw+1 ↔ I(X) def = (i1, i2, . . . , iw) def = (v1, v1 + v2 + 1, . . . , v1 + v2 + · · ·+ vw + w − 1). (10) N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 5 of 16 Therefore, the function I(X) : Zn 2 → Zw n ⊂ N∗, which maps a binary sequence to its support, plays a crucial role in explaining that the peak-shift EC problem can be reconsidered as the L1 distance problem, which becomes easier to solve. Assume X = (x1, x2, . . . , xn) ∈ Z2. The function I(X) can be simply defined as I(X) = {i : xi = 1}, returning the set of indices where the binary sequence X has 1. For example, given n = 22, w = 7. Let X = 01 001 01 0001 01 1 1 0000000 ∈ Z22 2 , then V (X) = (1, 2, 1, 3, 1, 0, 0, 7) ∈ N∗, and I(X) = (1, 4, 6, 10, 12, 13, 14) ∈ Z7 22 ⊂ N∗. Now, the peak-shift errors occur when the peaks (positions of ones) shift either left or right, as stated in the above example. Since the scope of this discussion is restricted to sequences of fixed length n and fixed Hamming weight w, the mapping I in (10) be- comes a bijection function from the set of all binary words of any finite length n∈N and Hamming weight w (= number of 1’ of the binary words) into words over N of length w. Therefore, it enables this transformation and preserves the distance as stated in Theorem 1. Thus, it establishes the equivalence between the spaces B(Z2, n, w) and B(Zw n , n, w) and hence between the metrics dbs(X,Y ) and dsyL1 (I(X), (Y )), where dbs stands for the bit-shift distance. Therefore, the peak-shift error correction problem is reformulated with the L1 distance problem. Throughout this work, we define this mapping as ”the index mapping”, and it is worth mentioning that I(X) is always a strictly increasing sequence. For example, for n = 4, the mapping I acts on Z4 2 is reported in Table 1; the mapping I acts on binary sequences X of length n = 4, producing output sequences in Zw n . In this context, m(X) indicates the length of any I(X) ∈ Zw n , while wL1(I(X)) denotes the L1 weight (i.e., the sum of values of entries) of the codeword I(X). The following Theorem 1 connects the peak-shifts controlling codes and the L1 metric. This connection is similar to some extent to the ideas in [6]. Theorem 1 (Isometry between (B(Z2, n, w), dbs) and B(Zw n , w, n), d sy L1 )). For all X,Y ∈ Z∗ 2, dbs(X,Y ) = { dsyL1 (I(X), I(Y )) if w(X)=w(Y ), ∞ if w(X) ̸=w(Y ). (11) Note that if we extend the domain of dsyL1 to include the case when m(A) ̸= m(B), then dbs(X,Y ) < ∞ ⇐⇒ w(X) = w(Y ) and for all X,Y ∈ Z∗ 2, dbs(X,Y ) = dsyL1 (I(X), I(Y )). This means that the mapping I in (10) is an isometry (a distance-preserving transforma- tion) between the metric spaces (Z∗ 2, dbs) and (N∗, dsyL1 ). The dbs stands for the bit-shift distance. For example, Case 1: wH(X) = wH(Y ). Assume X = 0101100 and Y = 0011100. Thus, V (X) = 1102 ∼ I(X) = 134 and V (Y ) = 2002 ∼ I(Y ) = 234. Now, a ℓR = 1 peak shift of size 1 will transfer X to Y . Thus, dbs(X,Y ) = 1 and dasL1 (I(X), I(Y )) = 1. N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 6 of 16 Table 1: Action of the Mapping I on Binary Sequences of Length n = 4 Z4 2 space Zw 4 space Weight w(X) Sequence X I(X) m(I(X)) wL1(I(X)) 0 0000 − 0 0 0001 3 3 0010 2 1 2 0100 1 1 1000 0 0 0011 23 5 0101 13 4 0110 12 2 3 1001 03 3 1010 02 2 1100 01 1 0111 123 6 1011 023 3 5 1101 013 4 1110 012 3 4 1111 0123 4 6 Case 2: wH(X) ̸= wH(Y ). Assume X = 01011001 and Y = 0011100. Thus, V (X) = 11020 ∼ I(X) = 1347 and V (Y ) = 2002 ∼ I(Y ) = 234. Now, since wH(X) ̸= wH(Y ), X will never transfer to Y . Thus, dbs(X,Y ) = ∞ and dasL1 (I(X), I(Y )) = ∞. The function I, and therefore I−1, is a one-to-one mapping such that I(B(Z2, n, w)) = B(Zw n , w, n), and B(Z2, n, w) = I−1(B(Zw n , w, n)). This one-to-one correspondence between binary words and vectors of non-negative increasing integers plays an important role in the following discussion. Since a single l-peak-shift in a word X does not change the number, but only the values of components in the vector I(X), the code design in Section 3 is based on the I codomain. 3. Non-systematic Code Design In this section, the code construction, lower and upper bounds, and the decoding algorithm for a single l peak-shift code are presented. 3.1. Code Design The proposed code design is based on the L1 metric error control σ-codes over Zq in [10],[6], however, first we need the following definition of the sigma polynomials of a word before introducing the σ-codes. Definition 1 ([11]: The σ-polynomial of a word). Let q∈N ∪ {∞}, F be any field and ∂S ⊆ F be a set of n∈N distinct elements in F. The σ-polynomial associated with a word N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 7 of 16 X∈Zn q is σX(z) def = zx0 ∏ s∈∂S−{0} (1− sz)xs (12) = zx0 ( 1 + σ1(X)z + σ2(X)z2 + . . . ) ∈F[z]. For example, if n = 7, ∂S = {s0, s1, s2, s3, s4, s5, s6} ⊆ F − {0} and X = 4121000 = {s0, s0, s0, s0, s1, s2, s2, s3}, then σX(z) = (1− s0z) 4(1− s1z)(1− s2z) 2(1− s3z) = 1− (4s0 + s1 + 2s2 + s3)z + (6s20+ 4s0s1 + 8s0s2 +4s0s3 + 2s1s2 +s1s3 + s22 +2s2s3)z 2 + . . .+ (s40s1s 2 2s3)z 8. To understand how the σ-polynomial associated with a word X ∈ Zn q is calculated, consider the following example. Assume that X = 00111 and the field is GF (4). Then I(X) = 234. The elementary symmetric functions, σ0σ1σ2σ3, associated with 234 is (1− z)2 + (1− 2z)3 + (1− 3z)4 = 1032. Note that σX(z) is a polynomial of degree deg(σX) = wL1(X) = |X| that has wH(X) = |∂X| distinct roots in F, each with multiplicity xs, for s ∈ ∂S ⊆ F. In particular, X coincides with the multiset of all inverses of the roots of σX(z), where we let 1/0 def = 0. Hence, its coefficient sequence is given by the elementary symmetric functions, 1, σ1(X), σ2(X), . . .∈F, of the elements in the multiset X −{0} ordered in increasing order of their degrees and eventually shifted to the right by x0 ∈ Zq ⊆ N if 0 ∈ ∂S ⊆ F. For example, the elementary symmetric functions for Z5 2 and Z7 2 are shown in Table 2 and Table 6, respectively. In these two examples, the choice of the field is the smallest field, F, whose cardinality is |F| > w. Now, the general definition of σ-code as follows: Definition 2 ([11], [6]: The σ-Code). For all polynomials g(z), σ(z) ∈ F[z], the q-ary σ-code of length n associated with g and σ is Cg,σ(Zq, n) def = { X∈Zn q ∣∣∣∣ σX(z) = cXσ(z) mod g(z), with cX ∈F− {0} } . (13) For clarity, we choose g(z) = zl+1. N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 8 of 16 Table 2: The mapping I acting on Z5 2 and the elementary symmetric functions, (σ0σ1 . . . σ|F|−1), associated with I(X). w(X) X I(X) Fw σ0σ1 . . . σ|F|−1 0 00000 − GF (2) 10 00001 4 10 00010 3 11 1 00100 2 GF (2) 10 01000 1 11 10000 0 10 00011 34 110 00101 24 122 00110 23 111 01001 14 102 01010 13 120 2 01100 12 GF (3) 112 11000 01 110 10100 02 121 10010 03 100 10001 04 110 00111 234 1032 01011 134 1102 01101 124 1322 01110 123 1202 10110 023 1331 3 11010 013 GF (22) 1113 11100 012 1012 10011 034 1220 10101 024 1020 11001 014 1220 01111 1234 10020 10111 0234 11133 4 11011 0134 GF (5) 13222 11101 0124 11023 11110 0123 10021 5 11111 01234 GF (7) 1210030 N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 9 of 16 Now, to define a l-peak-shift error correcting code, C ⊆ Zn 2 , the σ-codes in (13) are used in the function I codomain; where I is given in (10). Thus, X ∈ C if and only if σI(X)0∗(z) = σ(z) mod zl+1, where σ(z) is a monic polynomial of degree l. Note that under the mapping X → σI(X)0∗(z) mod zl+1, the set of constant weight w vectors of length n over Z2 is partitioned into |F|l classes, C1, C2, . . . , CFl . Now, X and Y are in Ci if, and only if, σI(X)0∗(z) = σI(Y )0∗(z) mod zl+1 and from the σ-code theory, each of the I(Ci)’s is an asymmetric L1 distance (l+1) code. Thus, by pigeon-hole principle, one of the classes, for example, C̃(F;n,w) should have at least ( n w ) /|F|l codewords. The l-peak-shift error correction code, C, can be simply defined as Cw def = C̃(F;n,w) ⊆ B(Z2, n, w) for all w∈ [0, n]. In order to maximize |C|, the algebraic structure F is chosen to be the smallest possible field if l > 1 or the smallest group if l = 1. Figure 3 provides a flowchart that illustrates the proposed coding framework for peak-shift control. Figure 3: Flowchart Illustrating the Proposed Coding Framework for Peak-Shift Control 3.2. Lower and Upper Bounds Since the proposed code is a constant weight q-ary code, we can use the lower and upper L1 bounds for the q-ary codes derived in [6] as stated in the following Theorem 2. Theorem 2 (lower bound on l-Peak-Shift Error Correcting Codes). For all n, l∈N there exists a l-peak-shift error correcting binary code C ⊆ Zn 2 of length n whose cardinality is |C| ≥ 1 + ⌈ n l + 1 ⌉ + n∑ w=2 ⌈( n w )/ |Fw|l ⌉ (14) N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 10 of 16 where Fw is the smallest field, F, whose cardinality is |F| > w, when l > 1; and Fw = (Zw+1,+ mod (w + 1)) when l = 1. Note that if l = 1, then |Fw| = w + 1. We can have some improvements in terms of the numbers of codewords if we relax the restriction on the choice of the field, but for clarity, we did not. The upper L1 bound for q-ary codes as follows; given n, l∈N, then the upper L1 bound, D(n, l) ≤ n∑ w=0 ⌊( n+ 2l w + l )/( n+ 2l l )⌋ . (15) Consider the following two examples; Table 3 shows a code of length n = 5 which is capable of correcting a single left (right) peak shift of size l = 1 and Table 4 presents a code of length n = 7 which is capable of correcting a single left (right) peak shift of size l = 2. Note that, in Table 3, the minimum asymmetric L1 distance between any two codewords X,Y ∈ Cw is 2. Thus, this code is capable of correcting a single peak shift of size l = 1. In Table 4, the minimum asymmetric L1 distance between any two codewords X,Y ∈ Cw is 3 and therefore this code is capable of correcting a single peak shift of size l = 2. In Table 5, the numbers of codewords for the proposed code for the codelength, n = 1, . . . , 20 and the peak shift of sizes l = lL(lR) = 1, . . . , 8 are shown. The following is an example of how the lower and upper bounds are calculated in Table 3. Let n = 5 and ℓ = 1. Thus, |C| ≥ 1 + ⌈ n ℓ+ 1 ⌉ + n∑ w=2 ⌈ ( n w ) |Fw|ℓ ⌉ |C| ≥ 1 + ⌈ 5 2 ⌉ + ⌈ 10 3 ⌉ + ⌈ 10 4 ⌉ + 1 + ⌈ 1 7 ⌉ = 13. D(n, ℓ) ≤ n∑ w=0 ⌊( n+2ℓ w+ℓ )( n+2ℓ ℓ )⌋⌊( 7 1 )( 7 1 )⌋+ ⌊( 7 2 )( 7 1 )⌋+ ⌊( 7 3 )( 7 1 )⌋+ ⌊( 7 4 )( 7 1 )⌋+ ⌊( 7 5 )( 7 1 )⌋+ ⌊( 7 6 )( 7 1 )⌋ = ⌊ 7 7 ⌋ + ⌊ 21 7 ⌋ + ⌊ 35 7 ⌋ + ⌊ 35 7 ⌋ + ⌊ 21 7 ⌋ + ⌊ 7 7 ⌋ = 1 + 3 + 5 + 5 + 3 + 1 = 18 as stated in the table. Table 5 shows the cardinality of the proposed code versus the peak-shift errors for different code lengths, n, and various numbers of errors, lL (lR). As expected, for fixed n, the number of codewords decreases as lL (lR)-peak shift errors increase. It is worth mentioning that for fixed n, the numbers of codewords tends to increase with weight increases until it reaches the middle weight and then it starts decreasing. For example, for n = 15 and lL(lR) = 2, the highest numbers of codewords occur in weight 6 which is around 85 codewords. In particular, cardinality increases with respect to n, which is consistent with standard coding theory principles and reflects the increasing capability and capacity of the proposed σ-code as the code length grows. N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 11 of 16 Table 3: Non-systematic code parameters with n = 5 and l = 1. Here, the lower bound in (14) gives 13, however, the actual code defining the lower bound in (14) has |C| = 15. Also, the upper bound value obtained with (15) is 18. w(X) X I(X) m(I(X)) Fw |C| = 15 0 00000 − 0 GF (2) 1 00001 4 1 00100 2 1 GF (2) 3 10000 0 00011 34 00110 23 2 11000 01 2 GF (3) 5 01100 12 10001 04 00111 234 3 11100 012 3 GF (22) 3 10101 024 4 01111 1234 4 GF (5) 2 11110 0123 5 11111 01234 5 GF (7) 1 3.3. l-Peak-Shift Decoding Algorithm Since the problem is transferred from peak-shift EC problem into the constant weight L1 problem, we can implement the General l-SyEC/(l + 1)-SyED/AUED decoding algo- rithm for constant weight codes as the one in [6]. The algorithm 1 is a general efficient error control algorithm for any q-ary constant weight w code, A, of length n with a minimum L1 distance dsyL1 (A) ≥ 2(l + 1). Algorithm 1. General l-SyEC/(l + 1)-SyED/AUED decoding algorithm for Constant Weight codes Input: 1) The code A def = Âxn−1 ⊆ S(Zm, n, w), where xn−1 def = w − wL1(X̂)∈Zm, X̂∈Â, is the parity digit. 2) Any efficient (lL, lR)-EC decoding algorithms, Dec(Â, lL, lR), for Â, for all l∈N such that l < dasL1 (Â). 3) The (received) word Y = Ŷ yn∈Zn m with Ŷ ∈Zn−1 m and yn∈Zm. N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 12 of 16 Table 4: Non-systematic code parameters with n = 7 and l = 2. Here, the lower bound in (14) gives 15, however, the actual code defining the lower bound in (14) has |C| = 18. Also, the upper bound value obtained with (15) is 36. w(X) X I(X) m(I(X)) Fw |C| = 18 0 0000000 0 − GF (2) 1 0000001 6 1 1000000 0 1 GF (2) 2 0001100 34 2 1000100 04 2 GF (3) 3 1100000 01 0011100 234 3 1000011 056 3 GF ( 22 ) 3 1100001 016 0001111 3456 4 0011110 2345 4 GF (5) 4 0111100 1234 1010101 0246 5 1101011 01356 5 GF (7) 2 1111100 01234 6 1111110 012345 6 GF (7) 2 0111111 123456 7 1111111 0123456 7 GF ( 23 ) 1 Output: 1) A word X ′ = X̂ ′ x′n ∈Zn m, where X̂ ′ ∈Zn−1 m and x′n ∈Zm (the estimation of the original codeword). 2) An indication signal cor ∈ {0, 1} such that if cor = 1 then errors are corrected (X ′ = X). Execute the following steps. S1: Assessing the error correction capability. Compute ∆(X,Y ) def = |Y .− X| − |X .− Y | = |Y | − w. (16) S2: If |∆(X,Y )| ≥ l + 1 then set cor = 0, set X ′ to be any word, output cor, output X ′ and exit. S3: Otherwise, if |∆(X,Y )| ≤ l then execute the following steps. S3.1: Compute lL def = ⌊ l −∆(X,Y ) 2 ⌋ and lR def = ⌊ l +∆(X,Y ) 2 ⌋ . (17) Note that 0 ≤ lL, lR ≤ l (because |∆(X,Y )| ≤ l) and lL + lR ≤ lL −∆(X,Y ) 2 + lR +∆(X,Y ) 2 = l. (18) N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 13 of 16 Table 5: The number of codewords for the proposed method for codelength, n = 1, . . . , 20 and peak shifts, lL(lR) = 1, . . . , 8 where lL and lR represent the left and right shifts, respectively. n\l 1 2 3 4 5 6 7 8 1 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 5 4 4 4 4 4 4 4 4 7 6 5 5 5 5 5 5 5 13 8 7 6 6 6 6 6 6 19 10 8 8 7 7 7 7 7 33 15 9 9 9 8 8 8 8 57 20 11 10 10 10 9 9 9 103 28 15 11 11 11 11 10 10 181 43 16 12 12 12 12 12 11 334 69 22 14 13 13 13 13 12 611 108 28 15 14 14 14 14 13 1136 180 40 18 16 15 15 15 14 2119 308 58 21 17 16 16 16 15 3972 530 86 26 18 18 17 17 16 7470 926 135 32 19 19 18 18 17 14096 1636 219 43 20 20 20 19 18 26657 2907 326 59 22 21 21 20 19 50542 5208 591 87 27 22 22 22 20 96039 9369 995 129 34 23 23 23 S3.2: With the word Ŷ ∈Zn−1 m as input, execute the algorithm Dec(Â, lL, lR) for Â. Let X̂ ′∈Zn−1 m be its output word. S3.3: Set X ′ = X̂ ′ x′n−1∈A if X̂ ′∈Â, and X ′ = any word if X̂ ′ ̸∈ Â; where x′n−1 = w − wL1(X̂ ′) (19) is the parity digit of X̂ ′. S3.4: Set cor = { 1 if X ′∈A and dasL1 (X ′, Y ) ≤ l, 0 otherwise (20) S3.5: Output X ′, output cor and exit. 4. Conclusions Even though the proposed code solves only the one-direction shift, it provides a new scheme in designing a peak-shift code using elementary symmetric functions (σ-codes). Based on the results developed in this paper and [12],[13], [6, 10, 11, 14–19], whenever it is possible to define an isometry from the metric space which characterizes a given coding problem to the L1 metric (as the mapping I in (10)), any information on codes for the L1 metric is reflected in the analogous information for that coding problem. N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 14 of 16 Table 6: The mapping I acting on Z7 2 and the elementary symmetric functions, (σ0σ1 . . . σ|F|−1), associated with I(X). w(X) X I(X) Fw σ0σ1 . . . σ|F|−1 w(X) X I(X) Fw σ0σ1 . . . σ|F|−1 0 0000000 − GF (2) 10 7 1111111 0123456 GF (23) 10647400 0000001 6 10 1111110 012345 1000031 0000010 5 11 1111101 012346 1100034 0000100 4 10 1111011 012356 1320033 1 0001000 3 GF (2) 11 6 1110111 012456 GF (7) 1646035 0010000 2 10 1101111 013456 1301333 0100000 1 11 1011111 023456 1111144 1000000 0 10 0111111 123456 1000030 0000011 56 111 1111100 01234 1210030 0000101 46 120 1110101 01235 1452036 0000110 45 112 1111001 01236 1665435 0001001 36 100 1110110 01245 1033631 0001010 35 121 1110101 01246 1232510 0001100 34 110 1110011 01256 1524423 0010001 26 111 1101110 01345 1431466 0010010 25 101 1101101 01346 1640604 0010100 24 122 1101011 01356 1215644 0011000 23 111 1100111 01456 1622506 2 0100001 16 GF (3) 120 5 1011110 02345 GF (7) 1222251 0100010 15 112 1011101 02346 1466424 0100100 14 102 1011011 02356 1043363 0101000 13 120 1010111 02456 1445146 0110000 12 112 1001111 03456 1234525 1000001 06 100 0111110 12345 1100033 1000010 05 121 0111101 12346 1320032 1000100 04 110 0111011 12356 1646034 1001000 03 100 0110111 12456 1301332 1010000 02 121 0101111 13456 1111143 1100000 01 110 0011111 23456 1000036 0000111 456 1012 0001111 3456 10023 0001011 356 1120 0010111 2456 11131 0001101 346 1300 0011011 2356 13220 0001110 345 1222 0011101 2346 11021 0010011 256 1200 0011110 2345 10024 0100101 246 1000 0100111 1456 12312 0100110 245 1313 0101011 1356 14133 0011001 236 1200 0101101 1346 12240 0011010 235 1131 0101110 1345 11132 0011100 234 1032 0110011 1256 11341 0100011 156 1333 0110101 1246 14043 0100101 146 1111 0110110 1245 13221 0100110 145 1010 0111001 1236 12124 0101001 136 1333 0111010 1235 11022 0101010 135 1212 0111100 1234 10020 0101100 134 1102 1000111 0456 13124 3 0110001 126 GF (22) 1111 4 1001011 0356 GF (5) 10142 0110010 125 1010 1001101 0346 13044 0110100 124 1322 1001110 0345 12313 0111000 123 1202 1010011 0256 12040 1000011 056 1032 1010101 0246 10042 1000101 046 1230 1010110 0245 14134 1000110 045 1122 1011001 0236 13410 1001001 036 1032 1011010 0235 12241 1001010 035 1302 1011100 0234 11133 1001100 034 1220 1100011 0156 14300 1010001 026 1230 1100101 0146 12421 1010010 025 1122 1100110 0145 11342 1010100 024 1020 1101001 0136 10443 1011000 023 1331 1101010 0135 14044 1100001 016 1032 1101100 0134 13222 1100010 015 1302 1110001 0126 13332 1100100 014 1220 1110010 0125 12120 1101000 013 1113 1110100 0124 11023 1110000 012 1012 1111000 0123 10021 N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 15 of 16 In addition, lower bounds, upper bounds, code designs, and decoding algorithms can be given for l-Sy0EC codes which satisfy the RLL(d, k) constraint [4, 20] using the results in this work, [6] and L1 error control codes over Zq, with q∈N ∪ {∞}. It is because the set of all RLL(d, k) binary words of length n and weight w with the d0-D/I metric can be put in bijection with ( Zw+1 k−d+1, d sy L1 ) through the following isometry 0v110v21 . . . 0vw10vw+1 ↔ (v1 − d, v2 − d, . . . , vw − d). For future direction, the results of this work can be extended to include multi-error correc- tion. In addition, this method can be applied to the (d, k) sequences and practical storage systems. Acknowledgements The researcher would like to thank the Deanship of Graduate Studies and Scientific Research at Qassim University for financial support (QU-APC-2025). References [1] T.D. Howell. Analysis of correctable errors in the ibm 3380 disk file. IBM Journal of Research and Development, 28(2):206–211, 1984. [2] P. Siegel. Recording codes for digital magnetic storage. IEEE Transactions on Mag- netics, 21(5):1344–1349, 1985. [3] A.V. Kuznetsov and A.J.H. Vinck. A coding scheme for single peak-shift correction in (d, k)-constrained channels. IEEE Transactions on Information Theory, 39(4):1444– 1450, 1993. [4] V.I. Levenshtein and A.J.H. Vinck. Perfect (d, k)-codes capable of correcting single peak-shifts. IEEE Transactions on Information Theory, 39(2):656–662, 1993. [5] T. Klove. Codes correcting a single insertion/deletion of a zero or a single peak-shift. IEEE Transactions on Information Theory, 41(1):279–283, 1995. [6] L.G. Tallini, N. Alqwaifly, and B. Bose. Deletions and insertions of the symbol ′′0′′ and asymmetric/unidirectional error control codes for the L metric. IEEE Transactions on Information Theory, 69(1):86–106, 2023. [7] A. Razaq, G. Alhamzi, S. Abbas, M. Ahmad, and A. Razzaque. Secure communication through reliable S-box design: A proposed approach using coset graphs and matrix operations. Heliyon, 9(5):e15902, 2023. [8] A. Razzaque, A. Razaq, S.M. Farooq, I. Masmali, and M.I. Faraz. An efficient s-box design scheme for image encryption based on the combination of a coset graph and a matrix transformer. Electronic Research Archive, 31(5):2708–2732, 2023. [9] V. Levenshtein. Binary codes with correction for deletions and insertions of the symbol 1. Problems of Information Transmission, 1(1):8–17, 1965. [10] L.G. Tallini and B. Bose. On l1 metric asymmetric/unidirectional error control codes. In 2013 International Symposium on Information Theory, Istanbul, Turke., pages 694–698. 2013. N. A. Alqwaifly / Eur. J. Pure Appl. Math, 18 (2) (2025), 5873 16 of 16 [11] L.G. Tallini and B. Bose. On l1-distance error control codes. In 2011 IEEE Interna- tional Symposium on Information Theory Proceedings, St. Petersburg, Russia., pages 1026–1030. 2011. [12] B. Bose, N. Elarief, and L.G. Tallini. On codes achieving zero error capacities in limited magnitude error channels. IEEE Trans. on Inform. Theory, 64:257–273, 2018. [13] B. Bose and T.R.N. Rao. Theory of unidirectional error correcting/detecting codes. IEEE Trans. on Comput., 31:521–530, 1982. [14] J.H. Weber and D.E. Boekee C. de Vroedt. Necessary and sufficient conditions on block codes correcting/detecting errors of various types. IEEE Transactions on Com- puters, 41(9):1189–1193, 1992. [15] L.G. Tallini and B. Bose. On a new class of error control codes and symmetric functions. In 2008 IEEE International Symposium on Information Theory, Toronto, ON, Canada., pages 980–984. 2008. [16] L.G. Tallini and B. Bose. On decoding some error control codes using the elementary symmetric functions. In N. Melone F. Mazzocca and D. Olanda, editors, Trends in Incidence and Galois Geometries: a Tribute to Giuseppe Tallini - Quaderni di Matematica, Vol 19., pages 265–297. Caserta, Dipartimento di Matematica, Seconda Università di Napoli, 2010. [17] L.G. Tallini, N. Elarief, and B. Bose. On efficient repetition error correcting codes. In 2010 IEEE International Symposium on Information Theory, Austin, TX, USA., pages 1012–1016. 2010. [18] L.G. Tallini and B. Bose. On symmetric l1 distance error control codes and elementary symmetric functions. In 2012 IEEE International Symposium on Information Theory Proceedings, Cambridge, MA, USA., pages 741–745. 2012. [19] L.G. Tallini and B. Bose. On some new ∫∫ m linear codes based on elementary sym- metric functions. In 2018 IEEE International Symposium on Information Theory (ISIT), Vail, CO, USA., pages 1665–1669,. 2018. [20] F. Palunc̆ić, K.A.S. Abdel-Ghaffar, H. C. Ferreira, and W. A. Clarke. A multiple in- sertion/deletion correcting code for run-length limited sequences. IEEE Transactions on Information Theory, 58(3):1809–1824, 2012.