# Adaptive Rate-Compatible Non-Binary LDPC Coding Scheme for the B5G Mobile System
## 2 The Construction of RC-NB-LDPC Codes
### The Construction of RC-NB-LDPC Codes
Using the puncturing technique to change the degree distribution of the masking matrix, an adaptive-rate LDPC code can be obtained. Since the dimension of the masking matrix is much smaller than the check matrix of the QC-LDPC code, it can greatly reduce the hardware complexity of the rate-adaptive communication system. The NB-LDPC code defined on the finite field \(GF(q)\) has \(q=2^{m}\) elements; the mapping relationship is as follows:  
\[{\bf{F}}_{q}\rightarrow{\bf{F}}_{2}^{m} \tag{5}\]  
We refer to \((x_{0},\ldots,x_{m-1})\in{\bf{F}}_{2}^{m}\) as a binary mapping of the symbol \(X\in{\bf{F}}_{q}\). The NB-LDPC code can be mapped into binary code for transmission in a channel. Therefore, the NB-LDPC code can be punctured at both the symbol level and bit level. For example, for 8-ary LDPC codes, the degree distribution function is \(\lambda(x)=1/3x+2/3x^{3}\), \(\rho(x)=x^{5}\). The bit-level puncturing algorithm is intuitively represented by Figure 2.  
Figure 2: The bit-level puncturing pattern of the NB-LDPC code. The circulation coefficient-matrix of size \(m\times n\) is designed using an algebraic-based method, assuming that \(GF(q)\) is a finite field containing \(q\) elements, \(\alpha\) is a primitive of \(GF(q)\), and all elements in \(GF(q)\) can be represented as a form of \(\alpha\) power, i.e., \(\alpha^{-\infty},\alpha^{0},\alpha^{1},\ldots,\alpha^{q-2}\), where \(0=\alpha^{-\infty},\alpha^{0}=1\). \(S_{1}=\left\{\alpha^{i_{0}},\alpha^{i_{1}},\ldots,\alpha^{i_{m-1}}\right\}\) and \(S_{2}=\left\{\alpha^{i_{0}},\alpha^{i_{1}},\ldots,\alpha^{i_{m-1}}\right\}\) are two subsets of \(GF(q)\), where \(i_{k},j_{l}\in\{0,1,\ldots,q-2\},0\leq k<m,0\leq l<n\). Based on the closeness of the computation of the finite field, a finite field matrix on \(GF(q)\) can be constructed from \(S_{1}\) and \(S_{2}\).The specific construction method is given by  
\[P=\left[ \begin{array}{cccccc}\alpha^{i_{0}}-\alpha^{i_{0}}&\alpha^{i_{0}}- \alpha^{i_{1}}&\cdot&\cdot&\cdot&\alpha^{i_{0}}-\alpha^{i_{m-1}}\\ \alpha^{i_{1}}-\alpha^{i_{0}}&\alpha^{i_{1}}-\alpha^{i_{1}}&\cdot&\cdot&\cdot &\alpha^{i_{1}}-\alpha^{i_{m-1}}\\ \cdot&\cdot&\cdot&\cdot&\cdot\\ \cdot&\cdot&\cdot&\cdot&\cdot\\ \cdot&\cdot&\cdot&\cdot&\cdot\\ \alpha^{i_{m-1}}-\alpha^{i_{0}}&\alpha^{i_{m-1}}-\alpha^{i_{1}}&\cdot&\cdot& \cdot&\alpha^{i_{m-1}}-\alpha^{i_{m-1}}\end{array} \right]=\left[ \begin{array} []{cccccc}\alpha^{\alpha_{00}}&\alpha^{\alpha_{01}}&\cdot&\cdot&\cdot&\cdot& \alpha^{\alpha_{0n-1}}\\ \alpha^{\alpha_{10}}&\alpha^{\alpha_{1,1}}&\cdot&\cdot&\cdot&\alpha^{\alpha_{ 1,1-1}}\\ \cdot&\cdot&\cdot&\cdot&\cdot\\ \cdot&\cdot&\cdot&\cdot&\cdot\\ \cdot&\cdot&\cdot&\cdot&\cdot\\ \alpha^{\alpha_{m-1}}&\alpha^{\alpha_{m-1}}&\cdot&\cdot&\cdot&\alpha^{\alpha_ {m-1}}\end{array} \right] \tag{6}\]  
where \(\alpha^{\alpha_{k,l}}=\alpha^{i_{k}}-\alpha^{j_{l}},0\leq k<m,0\leq l<n\). Matrix \(P\) is a circulation coefficient-matrix. In summary, the steps of constructing the RC-NB-LDPC codes are as follows:  
1. Construct a matrix \(H_{b}\) of size \(m\times n\) based on the PEG algorithm as the base matrix. 2. Construct a matrix \(H_{m}\) of size \(m\times n\) based on the random construction as the mask matrix. 3. Mask and puncture the base matrix \(H_{b}\). 4. Calculate a circulation coefficient-matrix \(P\) of size \(m\times n\) using an algebraic-based method and generate the circulant permutation matrices. 5. Superposition operation. Replacing the entries in \(H_{b}\) by the circulant permutation matrices and/or zero matrices expands the matrix \(H_{b}\) into a \(mb\times nb\) sparse matrix \(H\).