# Sum of the Magnitude for Hard Decision Decoding Algorithm Based on Loop Update Detection
## 4 Complexity Analysis  
In this section, the conditions used to analyze the complexity of the decoding algorithm are: (1) Ignoring a small number of binary calculation and multiplication operations in the algorithm, with the assumption that the comparison operation is equivalent to the addition operation; and (2) taking the regular non-binary LDPC codes as an example to compare the average number of real addition operations in each algorithm. In the past, the computational complexity of the initial stage before the first iteration is often neglected when analyzing the computational complexity [31]. However, the simulation analysis of the decoding algorithm in the next section shows that the highest signal-to-noise ratio (SNR) in the frame occurs through iterative decoding less frequently after convergence. Thus, there is strong complexity of the initialization phase in the decoding process of the high proportion, if the neglect leads to a significant error. Therefore, the computational complexity involved in the initialization stage before the first iteration is taken into account. At the same time, the principle of second sections shows that all WSF algorithms perform symbol flipping in the final stage of each iteration, which is a serial decoding algorithm. After the symbol flipping is completed, the check equation is updated and the flip function is updated. In each iteration, there are three steps involved: (1) Calculating the adjoining vector \(\mathbf{s}_{h}^{(k)}\); (2) updating the flip function \(E_{n}^{k+1}\); and (3) searching the flipped bit. Taking the standard WSF algorithm as an example, if the variable node n is flipped during the previous iteration, the adjoining vectors \(\mathbf{s}_{h}^{(k)}\) corresponding to the \(d_{v}\) check nodes connected to them need to be updated. After the update of the vector \(s_{h}^{(k)}\) is completed, the flip function \(E_{n}^{k+1}\) of \(d_{c}\) variable nodes connected to the  
Figure 1: Flow chart of LUDMSMWSF algorithm. check node m is calculated. Therefore, for both steps, the total number of operations required is \(d_{c}\cdot d_{v}\). In Step (3), it is assumed that the node position of the variable corresponding to the maximum flip function \(E_{n}^{k+1}\) is found in n variable nodes, while further comparison operations are performed for \(N-1\) times. Therefore, the calculation amount of an iterative process in a standard WSF algorithm is \(N-1+d_{c}\cdot d_{v}\). The specific update process is as follows. First, we calculate \(s_{h,m}^{k+1}=1-s_{h,m}^{k},m\in M(\theta)\) and update it according to the updated formula of flip function, which is \(E_{n}^{k+1}=E_{n}^{k}+2\sum\limits_{m\in M(\theta)}w_{n,m,\mathcal{A}}\left( 2s_{h,m}^{k+1}-1\right)\), \(n\in N(m),m\in M(\theta)\). The average number of iterations of the five decoding algorithms is \(A{I_{1}}-A{I_{6}}\), while \(d_{c}\) represents line weight and \(d_{v}\) represents column weight. Table 1 gives the calculation methods of the total number of real operations of each decoding algorithm. From Table 1, it can be concluded that the complexity of the LUDWSF, LUDSMWSF and LUDMSMWSF algorithms is lower than the WSF, SMWSF and MSMWSF algorithms. Taking one algorithm as an example, the computation amount of WSF algorithm and LUDWSF algorithm is the same for each iteration with the difference of the average iteration times. However, the average iterations of LUDWSF algorithm are much less than that of WSF algorithm. From Table 1, the LUDMSMWSF algorithm only requires real additions, complexity is \(Mq(2d_{c}-1)+Nqd_{v}+(N-1)+(N-1+d_{c}d_{v})(A{I_{5}}-1)\). However, complexity of the Fast Fourier Transform-based belief propagation decoding algorithm (FFT-BP) [32; 33] includes real additions, multiplications and divisions, the complexities of which are \(AI_{6}[2 Nd_{v}q\log_{2}q+2 Nd_{v}(q-1)+M(d_{c}-1)]\), \(AI_{6}[Nd_{v}q(d_{c}+2d_{v}-1)+Md_{c}]\) and \(AI_{6}[Nd_{v}(q+2)]\), respectively. Real multiplications and divisions are more consumable units than real additions.