Efficient Decoding Algorithm for Binary Quadratic Residue Codes Using Reduced Permutation Sets

: The Quadratic Residue (QR) codes have a rich mathematic structure. Unfortunately, their Algebraic Decoding (AD) is not generalizable for all QR codes. In this study, an efficient hard decoding algorithm is proposed to generalize the decoding of the binary systematic Quadratic Residue (QR) codes. The proposed decoder corrects t erroneous bits or less, in the received word, based on a reduced set of permutations derived from the large automorphism group of QR codes. This set of permutations is applied to the received word to move the error positions and trap all of them in redundancy. Then, to evaluate the proposed method, we applied it to many binary QR codes of moderate code length starting with 17 until 113 with reducible and irreducible generator polynomials. The proposed decoder was validated by inserting all possible error patterns, that have t or less erroneous positions, as input of the proposed decoder and the output is always a correct codeword. The complexity study, in terms of the number of operations used, reveals that the light permutation decoding LPD algorithm significantly decreases decoding complexity without performance loss. So, it is qualified to be a good competitor to decode QR codes with lower lengths but is the best for QR codes with higher lengths.


Introduction
The digitization of several sectors of activity is increasing every day and the need for more secure communication systems is also increasing.These later are manifested generally in the storage and transmitting data, with the greatest reliability, from one user to another that are mainly distant.This transmission is carried out through a noisy physical communication channel (Shannon, 1948).The basic model of digital communication is presented in Fig. 1 and is known as the Shannon paradigm.This fundamental model improves the reliability and efficiency of communication systems under varying conditions.It provides the ability to understand and analyze the behavior of communication systems in the presence of various types of impairments, such as noise, interference, and fading.It helps the researchers to determine the best encoding and decoding techniques and the most efficient error correction algorithms to implement.
In more cases the received message certainly includes errors.The processing of data at the reception is limited to restore the integrality of the transmitted information.This concept is based on the detection and correction of errors by using channel coding techniques.The integration of this module at the transmitter and the receiver improves the quality of the transmission and guarantees the reliability of the communication system.It enables the introduction of controlled redundancy bits into the binary message which is then exploited at the receiver to remove the errors introduced by the channel and to find the most likely transmitted message related to the received one.This process is mainly done by using algebraic structures of the Errors Correcting Codes (ECC).In communication systems, linear block codes are widely used and cyclic codes are the most important and attractive class of block codes.
In 1958, Prange introduces a new powerful subclass of codes that possess a half code rate and a good minimum distance (Prange, 1957).This subclass of codes is called the Quadratic Residue QR codes which belong to the family of cyclic codes and has rich mathematic structure.They have the best error performances among binary codes and offer the information a high resistance against channel perturbations.They can be an excellent candidate to be adopted for a very noisy channel (MacWilliams and Sloane, 1977) and the next generations of mobile communication systems.For this reason, the researchers consider these codes that are the best codes known in the theory of ECC due to their algebraic structure.So, QR codes with lengths less than 100 may have greater application potential for short packet transmission with low latency (Dong et al., 2022).Why not extend the areas of the use of the longer QR codes?practically, the (24,12,8) extended QR code has been used in imaging systems for space exploration (Wicker, 1994) and high frequency radio systems (Honary et al., 1994).
The decoding of QR codes seems very hard.Because the algorithms mainly used to decode other subclasses of cyclic codes, namely BCH and Reed Solomon codes, could not decode all the QR codes.This decoding hardness is manifested in the way that the algebraic structure of QR codes presents some restrictions to adopting a universal decoder.It means that the decoding system followed, to determine the erroneous positions for a code length, must, necessarily, be modified or at least adapted for each QR code.
On the other hand, real works began in the eighties (Elia, 1987) and continue today.They have produced several techniques for decoding QR codes which can be classified into three broad categories: Algebraic decoding techniques, quasi algebraic decoding techniques, and nonalgebraic methods that consider the QR codes as linear block codes.The former has some points of similarities in the decoding procedure which are based on a set of syndromes basically known to find the error locator polynomial L(z).This polynomial be able to establish if we can solve a nonlinear equation system (i.e., the Newton identities related with the syndrome components of the code) by using Sylvester's resultant (Reed et al., 1990;1992) or Gröbner basis (Chen et al., 1994).Then, to find the erroneous positions a substitution process of L(z) is carried out by using the roots of the generator polynomial of the code.This is usually done by using the Chien search (Chien et al., 1969).For the QR codes, some of the syndrome components are missing due to the algebraic properties and the required eliminations using successive substitutions will be difficult to obtain.So, when the number of errors occurs in the transmitted codeword is quite high, the set of unknown syndromes increases as well as the number of nonlinear equations.Hence, the decoding procedure definitely is not trivial as we do not have enough syndrome components.
However, the authors (He et al., 2001(He et al., ) arrived, 2001, to determine the value of the unknown syndromes.They proposed a new technic that serves to make a correspondence between the unknown syndromes and the known ones which define the best (v + 1) (v + 1) matrix S(I, J) with strict conditions.Thereafter, this method makes the decoding procedure somehow less complex and has still opened the door for the researchers to decode the next lengths of QR codes.The benefit of using this method consists of the possibility to apply the efficient Inverse Free Berlekamp Massey (IFBM) algorithm to decode the QR codes (Chang et al., 2003;Wang et al., 2013).The IFBM method is an iterative approach that requires 2t consecutive known syndromes as the input for determining L(z).It has been considered a useful decoding procedure for different binary QR codes.On top of that, there is another commonly used technique to decode a cyclic code but is seldom used to decode the binary QR code.This technique is known as the Euclidean algorithm (Shih et al., 2008;2009).It is based on the division of the syndrome polynomial S(x) and x n -1.It allows us to determine L(z) by computing the gcd (S(x); x n -1), but also all the n consecutive syndromes must be established.
Through the above, it is relatively apparent and straightforward to decode the binary QR code with the required consecutive syndromes and apply the abovementioned algebraic decoding algorithms.Despite that, these decoding algorithms are very complex and need highly complicated computations by utilizing an enormous number of operations over a Galois field.They present a difficult hardware implementation.
Since the Lookup Table Decoding (LTD) is used as a quasi-algebraic decoding technique.In 2009 the authors (Chen et al., 2009) propose a new decoding scheme for the binary systematic QR (47,24,11) code based on a lookup table decoding approach.Then, a Reduced Size Lookup Table (RSLT) was proposed (Lin et al., 2010).They made some improvements to the decoding parameter by reducing the number of syndromes stored and consequently the size of the decoding table.

Fig. 1: Simplified model of a digital communication system
After that, new decoding algorithms (Lin et al., 2012;Lee et al., 2013;Li et al., 2018;Huang et al., 2018;Gholami and Roostaie, 2021) based on these two previous works have been proposed to improve the decoding.These methods retain the employment of the mathematical properties of this family of codes to determine the erroneous positions.They have been proposed due to the limitation of the AD algorithms.The LTD and their improved versions are slightly less complex and practically provide another way to decode the QR code.It achieves the same goal by looking up a pre-calculated table.These algorithms need to store the lookup tables for all error patterns which requires a real storage capacity in the DSP system and a tangible CPU time when the code length is quite high.
In 1962, Prange introduced the permutation decoding PD algorithm based on the principle of error trapping decoding scheme (Prange, 1962).This category of algorithms is dedicated to decoding systematic cyclic codes.After that, MacWilliams developed (Macwilliams, 1964) a serial decoder for cyclic code.She is interested in finding a large group of automorphisms of the systematic cyclic codes that operate in a particular manner to correct the highest number of errors that do not exceed the error correction capability of code.The PD applies a set of code preserving permutations to the received codeword in order to move, towards the redundancy, of errors appearing in the received word.The algorithm based on this approach is less expensive and simpler to implement than other decoding methods.It is best suited to codes that are invariant under a large group of automorphisms (MacWilliams and Sloane, 1977) and is most useful for alphabets with high error correcting capabilities.
Prange and MacWilliams introduced an (S, V) permutation group, in which (S) is a group of cyclic shifts and (V) is a sequence of squares.After that, two general research areas have been getting started: • First, to study the application domain of this technique and to verify analytically the capability of decoding several codes.Based on the algebraic properties of the code, they investigate (Benyamin-Seeyar et al., 1986;Jia et al., 1992) an exact lower bound on the code length.They show that the size of the permutation group is proportional to the code dimension or to the error correction capability of the code.Then, they extend the study of the capability of the large (S, V) permutation decodable cyclic codes (Jia et al., 1994;Jia and Le-Ngoc, 1995).They use a maximum number of squaring permutations, called steps, required to move all errors.They have established equations that represent the exact relations between the parameters of the code n, k, t and the number of the steps • Second, to optimize and minimize the number of permutations used in the decoding.This process was done algebraically (Wolfmann, 1983) or by genetic algorithms (Nouh et al., 2013) In 2010 the authors (Key et al., 2010) decode Reed Muller codes by using permutation decoding.They applied the decoding algorithm to the first and second order Reed Muller codes.They show that they have a large automorphism group containing the translation group, making them good candidates for permutation decoding.In 2017 the authors (Pace and Sonnino, 2017) construct linear codes that present large automorphism groups and they are suitable for permutation decoding.Propose a new permutation decoding method for RM codes (Kamenev et al., 2019).After that, the permutation decoding is applied to polar codes.The authors (Pillet et al., 2021) deal with polar code automorphisms that kept the code invariant under permutation.They propose a low latency Automorphism Ensemble (AE) decoding and they prove that polar codes under AE decoding are more efficient than classical polar codes decoders.In 2022 the authors (Bioglio et al., 2023) propose some improvements by introducing the notion of redundant automorphism permutations.They list all the permutations that can give a different codeword candidate under successive cancellation-based AE decoding to further reduce the automorphism set size.
For QR codes, the situation is somewhat easier.The decoding of this family of codes is even more efficient because they present a large group of automorphism.In this study, a universal hard decoder based on a subset of permutations, derived from the automorphism group of QR codes, is the subject of this study's interest.The light permutation decoding LPD algorithm corrects t erroneous bits or less in the received word.It applies a reduced set of permutations to move the error positions and trap all of them in redundancy.That means that there is at least one permutation that can perform this.We have applied two kinds of decoding algorithms based on two permutation sets.The first is the (S, V) permutation set and the second is the (S, V, T) permutation set which the permutation (T) is the modular multiplicative inverse of the position of the symbols.
As we mentioned before, the algebraic decoding algorithms are very complex and need highly complicated computations by utilizing an enormous number of operations over a Galois field.So, the proposed decoder performs without the necessity for both the unknown syndrome computation and the error locator polynomial on the one hand, and on the other hand, it avoids constructing and stocking a sizeable pre-calculated table that needs real storage capacity like the LTD algorithms and DS algorithm.However, the LPD uses two essential operations: The application of the permutation and the calculation of syndrome weights.
Then, to evaluate the proposed method, we applied it to many binary QR codes of moderate code length starting 529 with 17 until 113 with reducible and irreducible generator polynomials.We have tried ( ) n i error patterns in which 0 < i ≤ t is the input of the proposed decoder and the saucerful rate is 100%.In addition, we compare the computational complexity, in the worst case, of the LPD algorithm with the best existing decoding techniques, namely, the cyclic weight decoding algorithms, the difference of syndromes decoding algorithm, and the modified reduced lookup table decoding algorithm.The complexity study reveals that the proposed decoder significantly decreases decoding complexity without performance loss.So, it is qualified to be a good competitor to decode QR codes with lower lengths but is the best for QR codes with higher lengths.

Preliminary and Background of the QR Codes Cyclic Codes
Definition 1 Let GF(2) denote a Galois finite field of order 2. A binary linear code over GF( 2 When studying binary cyclic codes over GF(2), we will most often represent the codewords in polynomial form.There is a bijective correspondence between the ntuple vectors c = (c0, c1,..., cn−1) in GF(2) and the polynomial c(x) Definition 2 Let a nonzero binary cyclic code C be ideal in a polynomial ring Rn = GF(2)[x]/(x n -1) over a Galois finite field.Then, there exists a unique monic polynomial g(x) of minimal degree such divides Therefore, the binary cyclic code C(n, k, d) over GF(2) where the positive integers n and k denote, respectively, the code length and the code dimension.The positive integer d represents the minimum distance.Code C consists of 2 k multiples of g(x) of degree n-k.In other words, the 2 k information words are extended by (n-k) redundant parity bits that are algebraically attached.Let b = (b0, b1,..., bk−1) be k-dimensional binary information bits corresponding to the information polynomial b Such that, ( ) , where, ci ∈{0,1} and ( ) the information polynomial, where bi ∈ {0,1} and ( ) , where gi ∈ {0,1}.

The Cyclic Codes in Systematic Form
In general, to facilitate the decoding of cyclic codes, we use a systematic encoding procedure.So, if g(x) divide b(x)x n−k , then we get the following equality: (3) Then, by (1) the code polynomial c(x) is equal to: where the associated vector d = (d0, d1,..., dk−1) of d( x) is the remainder obtained from the division operation.Then, by multiplying both sides of (1) by x k mod (x n -1), i.e.: By definition 1, the term (d(x)x k + b(x)), which is a multiple of g(x), can be given by: where the b(x) is in the lower k-bit of c(x): , ,..., , , ,..., , , ,..., The information symbols are embedded in the obtained codeword.Then, the polynomial c(x) is a systematic code.

The Quadratic Residue Codes
The C(n, k, d) binary quadratic residue codes over , are a subclass of the cyclic codes of odd prime length n = 8u ± 1 where u is some integer, is the set of information symbols and d represents the minimal distance.Let's define the error correcting capability of C to be denoted by t = ⌊(d-1)/2⌋, where ⌊x⌋ indicate the first integer less than or equal to x.
Then, to construct a C, we must specify the smallest positive integer m which is required to comply with the following condition: n|2 m -1.For a given length, we will define the set Qn to be as being a series of non-zero squares modulo n: The set Qn contains 1 2 n − elements and is called the defining set of cover a finite field GF(2 m ) of order 2 m .530 Let p(x) be the primitive polynomial of degree m which accepts α as the root.This α is the generator of the field GF(2 m ), knowing that each element in the field can be expressed as a function of α.Finally, to construct the generator polynomial g(x) of the QR codes, we will not need all the elements of the field GF(2 m ), but the construction requires a set Tn extracted from GF(2 m ).
Indeed, we can define the set Tn for a given QR code as Tn = {β i ∈ GF(2 m )|i ∈ Qn} which is called the variety of g and is the set of all roots of g(x) over GF(2 m ) i.e., g(β) = 0, then (x-β)|g(x).Where, β = α (2m−1)/n is the primitive n th root of unity in GF(2 m ) and the generator polynomial given as: ) For a code length up to 113, Table 1 lists all the necessary parameters that we need to construct the generator polynomial g(x) for a given QR (n, k, d).Namely, the Galois finite field GF(2 m ), the primitive polynomial p(x), and the value of the first element in Tn.

The Light Permutation Decoding Algorithm for the QR Codes
Let's assume that, over GF( 2 is transmitted via a noisy channel.This transfer of information is carried out with error and has at least a direct effect on the polarity of one symbol. Then, let's define, respectively, the received word and the error by ( ) and ( ) where r(x), e(x) ∈ GF(2)[x] and ri, ei ∈ {0,1}.Thus, r(x) is mathematically represented by the following identity: ( ) ( ) ( ) which the addition is done in GF(2).This later has a nonzero term in erroneous positions, bearing in mind that it represents the deformation undergone by the channel.So, if we suppose that this deformation produces v errors in r(x).Then, e(x) will include, therefore, v non-zero terms as: where, p1, p2,...pv ∈ n indicates the erroneous positions for 0 ≤ p1 < p2 < ... < pv < n.
Obviously, we can algebraically decode the received word r(x) once we determine e(x), which amounts to finding the error positions {p1, p2,...,pv} for v ≤ t.Let's divide r(x) by g(x), we obtain: The remainder s(x) is zero as long as there are no errors in r(x).It means that r(x) is a factor of g(x) and the received word is exactly a codeword.Then, if deg(s(x))  0, s(x) is a polynomial of degree ≤ n-k-1 and is the syndrome of the received word r(x).
By (1), c(x) is a multiple of g(x).Then, combining (10) and ( 12), we have the following relationship between the error pattern and the syndrome: ( ) ( ) ( ) ( ) The syndrome s(x) is also the remainder after we divide e(x) by g(x).
The principal mission of a decoder is manifested by two great acts, in particular, to detect and correct the errors produced by the channel during the transfer of information.This must be done without forgetting the complexity, reliability, and efficiency which are the ultimate objectives of such a decoding scheme.The ancient decoders proposed to decode the QR code have unfortunately been unsuccessful to find a universal decoding scheme.It means that the technique used to correct the erroneous positions for a code, must necessarily, be modified or at least adapted for each QR code.The Automorphism Group of the QR Codes Usually, we are interested in the positive characteristics of QR codes.It makes them at the heart of the concerns of several authors.The cyclic character of this family of codes gives a flexible behavior against errors.It provides the ability to pass from one vector to another that is the same.From a mathematics point of view, two binary linear codes are the same if they are isomorphic as vector spaces with the same length and over the same field.This concept led us to introduce the term "code equivalence".
Definition 3 two codewords c1 ⊆ GF(2) and c2 ⊆ GF(2) are said to be equivalent if c1 can be obtained from c2 by permuting the coordinate places of c1 and multiplying each coordinate position by a non-zero field element.
With generator matrix, G in systematic form, an automorphism group of code C is an isomorphism from C to C.Then, the permutation of the position of the symbols in a code c ⊆ GF(2) forms the automorphism group of C. Let Aut(C) = {π ∈ Sn |π(C) = C} be an automorphism group.It is the set of permutations that map C to itself without changing their weight distribution and translocating errors from one location to another.A typical permutation π of the position of the symbols is a bijective function between i into π(i) means that the vector c = (c1, c2,..., cn) goes into π(c) = (π(c1), π(c2)..., π(cn)).
Definition 4 a group P of permutations of code C is transitive if, for a given n distinct symbols c1, c2,...,cn and another n distinct symbols c′1, c′2,..., c′n, there is a π ∈ G such that ( ) ( ) ( ) If ρ is another permutation of the position of the symbols, the product of the two permutations π and ρ means that we apply π first then ρ.Thus, the following identity is correct ρ(π(c)) = π(ρ(c)).
For binary cyclic codes, Prange proposed a method for producing a series of distinct data sets that may be applied to any cyclic code (Prange, 1962).This method is based on the observation that all cyclic codes are invariant under the symbol position permutations.By definition, a group of permutations (S, V) includes all the cyclic permutations (cyclic shift) and all their powers denoted respectively by (S) and (V).Hence, MacWilliams announced, by the following theorem, the automorphism group of the QR codes (MacWilliams and Sloane, 1977).
Theorem 1 the automorphism group of QR codes is generated by three permutations: where, i represents a symbol position of the code and ρ is an integer prime to n.
In fact, the automorphism group of QR codes consists of the n(n 2 −1) permutations.For detailed proof, see (MacWilliams and Sloane, 1977).
If we want to apply, on the codeword, the permutation (S) for the finite number ω < n and the permutation (V) for the finite number µ < m− 1, in which m is the smallest positive integer who is required to comply with the following condition: n|2 m −1.Then ( 15) and ( 16) become: ( )

Example
Suppose that: ( ) is a cyclic codeword of length 7 over GF(2).Let ω = 4, µ = 2, and only for more simplicity do we take ρ 2 = 2.Then, by applying S 4 to f(x) we obtain: x 6 and by applying V 3 to f(x) we obtain: ( ) and by applying T to fS(x) we obtain: ( ) Hence the polynomial fS(x), fV(x), and fT(x) are also a codeword and every power of the permutation V leaves the zero-position unchanged.

The Decoding of the Binary QR Codes by Using Reduced Permutation Sets
Now, the large enough permutation automorphism group of code is established.We can officially discuss the decoding techniques that will exploit the aforementioned properties.In his research, MacWilliams principally introduces, in (MacWilliams and Sloane, 1977), a category of decoding algorithms for short cyclic codes, with a very small number of errors, known as "permutation decoding" and it is completely explained in (MacWilliams and Sloane, 1977).They assumed that the PD algorithm is best suited to codes that are invariant under a large group of permutations and they conjectured that the PD algorithm fit for cyclic codes.For this study, the concept of PD-sets was extended to correct a larger number of errors by using reduced permutation sets.
For a determined b(x) of a given code, this method employs a particular set of permutations called light PD-set derived from the automorphism group of QR codes.Its makes use of both the group (S) of cyclic shift and group (V) of a sequence of squares.Since these two subsets of permutations transform c ∈ C into an equivalent c′ ∈ C with the same length and the same properties.It means that the syndrome of the obtained codeword is zero and c ′ always is a factor of g(x).Then, the error position {p1, p2,..., pv}, for v ≤ t, associated with this erroneous version of the transmitted code word will, however, be moved into {p′1, p′2,..., p′v}.So, the idea behind this method is to apply the particular elements of the PD-set to the received word until all the errors are included in redundancy.
Definition 5 if C is a t-error correcting code, then a PD-set for C is a subset of the automorphism group of C which is such that every error pattern of t coordinate positions is moved by at least one permutation into the redundancy.
Finding adequate PD-sets for a code is not trivial.If such a set can be determined, then the LPD algorithm can be used to move the errors of which the code is capable into the check positions.In the case of systematic QR codes, any selection of successive positions represents a data set.Let C (n, k, 2t+1) be a QR code and c ∈ C, with: where, ci ∈ {0,1}.Clearly, the permutation group given by ( 15) and ( 16) can be applied separately to c(x) as follows: ( ) ( ) ( ) Since every binary systematic QR code is preserved by the (S) PD-set and the (V) PD-set the new polynomials cS(x) and cV(x) are simply included in C with the coordinate position permuted (definition 1).Let's now, apply a couple of permutations at the same time to c(x).We obtain the following equations, respectively, for the (S, V) PD-set and (S, V, T) PD-set: where, and is the modular multiplicative inverse of n.Then, if n is odd and ρ is the primitive root of n, the code is invariant under the (V) permutation group and Let's assume that at most v ≤ t errors occur in the transmitted codeword.So, the error vector will include, therefore, v non-zero terms, i.e., e(x) = xp1 +xp2 +...+xpv.If |pi −pj| ⩾ k such that i and j are two distinct positions.Then, the (S) PD-set can alone move the error into the check positions.If the maximum number of consecutive zero terms in e(x), however, is less than k, then the use only of the shift permutation set will be very restrained.It will be valid only for a single error correction.The same problem arises when we apply only the (V) PD set because every power of the permutation (V) leaves the zero-position unchanged.
On the decoder side and based on ( 12) and ( 14), we have shown that the syndrome determined by the process of dividing r(x) by g(x) is also the same after dividing e(x) by g(x).Then, it can be shown that the syndrome of the permuted received words V µ S ω [r(x)] is relatively the same as that obtained from the divisions of (V µ S ω [e(x)] modulo (x n −1)): is the syndrome of the permuted e(x).

Description of Algorithm
Let's C(n, k, 2t + 1) be a binary systematic QR code, and H of size (n-k)× n is the systematic parity check matrix given by: where, A T denotes the transpose of A and in k is the identity matrix of size n-k.Let's assume that at most t errors occur in the transmitted codeword.Then, the syndrome can be determined by the following equation: Based on the abovementioned theoretical definitions, equations, and theorem 1, the procedure of the proposed decoding algorithm performs as follows.Once we have found, by Theorem 1, a PD set for the given QR code.Suppose that the Hamming weight of the error vector satisfies that wt(e) ≤ t and has the syndrome wt(s) > t.We consider the first algorithm which presents the decoding protocol of the systematic QR codes by operating the product of two permutations.So, the idea behind this is to apply first the (S) PD-set, for ω < n, to the received word.Then we apply the (V) PD-set for µ < m−1.
The (S, V) PD algorithm of the QR codes is chiefly based on two major nested loops.The initial loop, in line 4, requires n circular permutations by shifting the received word.The second loop, in line 6, is a power permutation of the shifted received word and is require m-2 permutations.The following theorem illustrates a break condition of the decoding process.
Theorem 2 supposes an error vector e = e0e1•••en−1 of weight t occurs, where 2t+1 ⩽ d.Let y be the received vector, with syndrome s = Hy T .If the syndrome weight wt(s) ⩽ t, then the information symbols yr •••yn−1 are correct and s = (e0•••er−1) T gives the errors.If wt(s) > t, then at least one information symbol is incorrect.For detailed proof, MacWilliams and Sloane (1977).
Based on theorem 2 the decoder can decide correctly in the first k coordinate positions corresponding to the information symbols and correct the errors in n-k coordinate positions corresponding to the parity check symbols.So, we compute the syndromes sµω = r (µω) H T , until ω and µ are found such that wt(sµω) ≤ t.The non-zero symbols in the syndrome sµω correspond to the erroneous position in the parity check symbols of the permuted received word ( ) p r  .Then we can construct a decided codeword D (µω) ∈ C. Finally, we decode by inverting the permutation S −ω (T −1 (V −µ (D (µω) ))).The flowchart of the (S, V) PD algorithm is illustrated in Fig. 2.
In order to aid efficient and effective understanding of the decoding process.Fig. 3 represents an example of the decoding process of the QR (23, 12, 3) code using the (S, V) PD-set.The nodes colored in green represent the correct symbols and the others colored in red, blue, and purple are considered erroneous.Each row represents the result of a symbol permutation of the previous row and their syndrome weight is displayed to the right.Then, for ω = 1 and µ = 3, the decoder was able to move the three errors toward redundancy.
Let's consider the second algorithm which presents the decoding protocol of the QR codes by using the product of three permutations (S, V, T).In addition to the permutations (S, V) applied in the first algorithm, it uses the permutation (T) which is based on the modular multiplicative inverse of the position of the symbol.So, if the (S, V) PD failed to move out the errors of the information set to redundancy, we apply, in line 5 of algorithm 2, this permutation only once for each shifted received word and the rest looks like the protocol shown in the decoding scheme of the first algorithm.

Results and Discussion
This section is dedicated to the performance evaluation of the proposed decoding algorithm.We have made a habit of evaluating decoders by measuring the Bit Error Rate (BER) for each Signal Noise Ration's (SNR) value by carrying out the Monte Carlo method, using a given modulation and passing the codeword over a fixed channel.But in this case, we were mainly interested in the output of the decoder according to a conditional input.In other words, we need to evaluate the efficiency of our decoder through the success and failure rate of a set of erroneous inputs such that wt(e) < t.Then, Table 2 the simulation parameters.It presents the value of the integer ρ 2 , then nopt represent the number of cyclic shifts (S) and m is the permutation order (V).Normally, the decoder must use n cyclic shifts, but by simulation, we have ended up with a number, called nopt less than the one theoretically proposed.In the last column of the table, we present the necessary number of error combinations to be tested for each code as a function of its capacity t.
So, we want to underline that this algorithm is written in C language.It is used to test, separately, all codes included in Table 2 and to see the behavior of the decoder for each code.Therefore, it is necessary to check all the error combinations according to each code length to validate the decoding algorithm.Let's take, as an example, the QR (23,12,7) code which we need to check When the decoder tests all possible error combinations.The results of the evaluation of the decoding algorithms (S, V) and (S, V, T) are presented respectively in Tables 3-4.Let's take Table 3, it can be divided into two parts.The first contains the QR codes which are completely decoded without any problem.We refer to the codes of length n that are equal to 17, 23, 31, 41, 47, and 71.In the second part, the failure of the (S, V) PD-set is manifested only when wt(e) = t.We notice that the number of uncorrectable combinations remains very small in comparison with the number of tested combinations.We speak of very small proportions.
To face this limitation, we have widened the permutation set from the (S, V) permutation set to the (S, V, T) permutation set only for the codes with length n equal to 73, 79, 97, and 113 when wt(e) = t.We obtained good results since the proposed decoder manages to correct all shown in Table 4.

Complexity Analysis
We would like to point out that the success rate of our decoder is 100% which guarantees decoding efficiency.This preliminary conclusion brings us to achieve the main objective of this study which manifests itself in the proposal of a method that generalizes the decoding of binary QR codes.In fact, this result has repeatedly been made plain that our proposed method is practically powerful and capable to decode a set of QR codes in the same way.
Before considering this conclusion, it is necessary to mention that proving the generalization of decoding on a set of QR codes is not sufficient.We must prove the robustness of this method in terms of complexity.It is not easy to directly compare the permutation decoding method to previously known AD algorithms in terms of decoding complexity since there is no universal algebraic for this category that can always decode every QR code.
The basic concept of permutation decoding consists of the determination of a set of code preserving permutations.For such code, the original PD algorithm proposed by MacWilliams exploits all the automorphism group permutations.According to theorem 1, this set of permutations contains ( ) 2 1 1 2 nn − permutations.Indeed, the LPD is based on a reduced set of permutations to decode the QR.Then, Fig. 4 presents the cardinal number of the permutation set comparison between the light PD and the original PD proposed.The LPD significantly decreases the number of permutations without performance loss.
On the other hand, we compare the computational complexity of the LPD algorithm with the best existing decoding techniques.Initially, this comparison study will be based on the decoding of the systematic QR code (47,24,11).Then, it can therefore be directly generalized to other QR codes.We provide the computational complexity analysis when correcting 1 to t errors, for the Cyclic Weight (CW) decoding algorithms in (Lin et al., 2012), the Difference of Syndromes (DS) decoding algorithm in (Li et al., 2018), and the Modified Reduced Lookup Table Decoding (MRLTD) algorithm (Gholami and Roostaie, 2021).These three algorithms are based on storing error patterns and their corresponding syndromes in a table such that each one uses a different size.They are based on the same decoding principle of which they examine the realization of all possible cases based on the distribution of t non-zero positions on the error vector.These errors can appear on t distinct positions among the n positions of the received word.Then, they can distinguish three possible cases: First, the information part contains all the erroneous positions.Second, all the t errors appear in the parity check section.Third, each section contains a number of errors strictly less than t, such that the sum of the errors of each section equals t.In order to investigate an appropriate comparison between these algorithms.We consider the worst case, for t = 5, with the highest computational complexity.Let GF(+), GF(<<), and R(+) denote, respectively, the addition, the shift operation in a finite field, and the real addition.Table 5 displays in detail the amount of calculation performed by the CW, DS, MRLTD, and the LPD algorithm.In the worst case, the CW decoding process is applied twice in order to decode the received message.
Consequently, it performs 13344 GF(+), 106950 R(+), 46 GF(<<), 9296 times search and its memory requirements amount to 20.43 Kbytes.Then, the DS algorithm stores 24 syndromes in the look up table corresponding to the single error patterns.The MRLTD algorithm needs 300 syndromes with their corresponding error patterns.Hence, the memory requirement for storing is quite 2, 6 Kbytes.We noticed that DS and MRLTD decoders follow a different decoding scheme but they require the same amount of calculation.They require 1800 GF(+), 20769 R(+) and 900 times search.
Similarly, let's look at Algorithm 1 is chiefly based on two major nested loops.The initial loop, in line 4, requires not circular permutations and is in charge of the cyclic shift of the received word.The second loop is a power permutation of the shifted received word and is require m -2 permutations.So, for a given ω and µ the LPD algorithm permutes the received word by (27).Then, computes a syndrome s and its weight wt(s).It means that require 24 GF(+), 23 R(+) and 1 GF(<<) for second iteration.It requires nopt ×(m-2) iterations in the worst case.Then, the amount of calculation of the LPD algorithm is 17136 GF(+), 16422 R(+), and 714 GF(<<).
Now we want to study the general case.It means that we will extend the complexity study for DS and LPD to decode systematic QR codes of greater length.
The choice to compare only with DS is not arbitrary, but because it is better than CW and MRLTD as Table 5 shows.Let's analyze Fig. 5, we can extract two important remarks: • From length n = 41 the number of operations R(+) used by DS is higher than the one proposed (graph (a)).In fact, the same thing happens for longer quadratic code lengths, where the number of R(+) operations used by DS is 10 8 higher than the one LPD algorithm (graph (c)) • For code lengths less than 100, the DS decoder requires a lower number of GF(+) operations than the LPD algorithm with a small difference (graph (a) and (b)).But for code lengths greater than 100, the DS decoder requires a very large number of GF(+) operations compared to the LPD algorithm 537  Through these two remarks, we can say that the LPD is a good competitor to decoding QR codes of lower length but is the best for QR codes of higher length.In addition to the above mentioned, there are other factors such as storage capacity and table lookup process which must be considered.Hence, these two factors increase exponentially with the increase in the length of the code.The light permutation decoding algorithm avoids constructing and stocking a sizeable pre-calculated table that needs real storage capacity.

Conclusion
In this study, we propose an efficient hard decoding algorithm for binary QR codes.This decoding algorithm corrects t erroneous bits or less, in the received word, based on a reduced set of permutations derived from the large automorphism group of QR codes.This set of permutations is applied to the received word to move the error positions and trap all of them in redundancy.We showed that the binary QR codes are suitable for light permutation decoding and we have confirmed MacWilliams's conjecture.Then, the proposed method was assessed by applying it to the aforementioned binary QR codes with reducible and irreducible generator polynomials.The proposed decoder output behavior was examined by computing the success rate of the decoder for all the QR codes tested.We have inserted ni error patterns with 0 < i ≤ t as input and the decoder success rate is 100%.Then we could go so far as to affirm that the proposed decoder is a t-bounded decoder of the aforementioned QR codes.Furthermore, comparing this new decoding scheme with the previously known decoding algorithms, the LPD algorithm has a similar error correction performance to that of the QR hard decoding algorithms in the theory.So, it can be utilized to decode any binary QR code in the theory.In addition, we compare the computational complexity, in the worst case, of the LPD algorithm with the best existing decoding techniques.The results are attractive in practice because the LPD algorithm significantly decreases the number of operations in the decoding process and avoids constructing and stocking a sizeable pre-calculated table.It is more feasible for hardware implementation.
The main limitation of the present study is that the proposed method is valid only for binary QR codes below 200 and not for non-binary QR codes.So, in the near future, the authors of this study will devote their efforts to decoding QR codes beyond 200 efficiently and to make them more useful in practical systems as a short error correcting code. 534

Fig. 2 :
Fig. 2: Flowchart of the (S, V) PD algorithm for decoding a QR code three errors to validate the decoding.

Fig. 4 :
Fig. 4: The comparison between the light PD and the original PD proposed by MacWilliams in terms of the cardinal number permutation set

Fig. 5 :
Fig. 5: The computational complexity comparison between the DS algorithm and the LPD algorithm for higher systematic QR code length

Table 1 :
The needed parameters to construct the generator polynomial g(x) of QR codes In this study, we propose an efficient decoding technique for the QR codes by using a subset of permutations derived from the automorphism group of QR codes.We show and prove that this method can rise to the challenge of being an efficient model to decode QR codes.The proposal decoding algorithm retains the employment of the mathematical properties of the QR code to determine the erroneous positions.It performs without the necessity for both the unknown syndrome computation and the error locator polynomial L(z).It avoids constructing and stocking a sizeable pre-calculated table that needs real storage capacity like the LTD decoding method.

Table 2 :
The simulation parameters

Table 4 :
Decoding results by using the (S, V, T) permutation

Table 5 :
The computational amount of each step in the CW algorithm, the DS algorithm, the MRLTD algorithm, and the LPD algorithm when we're used to decode QR(47, 24, 11)