# Minimum Distance Optimization with Chord Edge Growth for High Girth Non-Binary LDPC Codes
## 2 Non-Binary LDPC Codes Based on High Girth Hamiltonian Graphs
### Parity-Check Matrix and Hamiltonian Graph  
The NB-LDPC code that is defined on the high-order Galois field with a sparse parity-check matrix is generally described by a Tanner graph. Furthermore, an NB-LDPC code with a variable node degree of two can be represented using a simple graph obtained by omitting the variable nodes in its Tanner graph. Consider a graph \(G(V,E)\) with neither loops nor multiple edges, where \(V\) represents a non-empty set of vertices and \(E\) represents a set of edges. The Hamiltonian cycle in graph \(G\) is a cycle that passes once through all of the vertices in graph \(G\), and the Hamiltonian graph denotes a graph with at least one Hamiltonian cycle. The Hamiltonian graph forms of an NB-LDPC code are presented in Figure 1a. For a three-regular graph with eight vertices, the original vertex is taken as a check node, a vertex is inserted as a variable node on each edge of the graph, and the non-zero elements of the Galois field GF(\(q\)), where \(q\) is the order of the field, are added to the edges connecting these two types of nodes. Subsequently, the parity-check matrix and Tanner graph of the NB-LDPC code that is shown in Figure 1b,c, respectively, can be obtained. If the Hamiltonian graph has the regular vertex degree of \(d_{c}\), then a \((2,d_{c})\)-regular LDPC code can be constructed with the variable node degree of 2 and check node degree of \(d_{c}\) in the associated Tanner graph. Figure 1: (**a**) The mapping from an eight-vertex Hamiltonian graph to an non-binary low-density parity-check (NB-LDPC) code, where \(v_{1},v_{2},\cdots,v_{8}\) correspond to the check node, and \(\alpha_{11},\alpha_{12},\cdots,\alpha_{83}\) are non-zero elements over the Galois field. (**b**) The parity-check matrix of the code associated with the Hamiltonian graph. (**c**) The Tanner graph of the code associated with the Hamiltonian graph. In Figure 1, the representation of the cycle is given. In the Tanner graph, a cycle represents a closed-loop that consists of different vertices and edges, and the cycle length is the number of edges or vertices that it contains. The girth \(g\) denotes the length of the shortest cycle in the entire graph. The vertices in the Hamiltonian graph correspond to check nodes, and the actual length of the cycle is twice the number of passed vertices. The shortest cycle length in the Hamiltonian graph that is shown in Figure 1 is four, and the corresponding Tanner graph has a girth of eight. Section 2.2 describes the influence of girth and cycles on the performance of the code in detail. The NB-LDPC code that is constructed based on the Hamiltonian graph can not only obtain good girth characteristics, but also be implemented with the linear encoding. Many efficient encoding structures have been developed while using the recursive encoding methods that are suitable for particular graphs [22; 23; 24]. In these methods, the matrix mapped from the Hamiltonian cycle can be modified, as shown in Equation (1). \[\mathbf{H}_{P}=\left[ \begin{array}{ccccc}\alpha^{0}&0&\cdots&\cdots&0\\ \alpha^{k_{1,0}}&\alpha^{0}&&&\vdots\\ 0&\alpha^{k_{2,0}}&\ddots&&\vdots\\ \vdots&&\ddots&\ddots&0\\ 0&\cdots&0&\alpha^{k_{m-1,0}}&\alpha^{0}\end{array} \right]. \tag{1}\]  
Let \([\mathbf{s},\mathbf{p}]\) be a legal codeword, where \(\mathbf{s}=[s_{0},s_{1},\cdots,s_{n-m-1}]\) and \(\mathbf{p}=[p_{0},p_{1},\cdots,p_{m-1}]\) are the information symbol vector and check symbol vector, respectively. The NB-LDPC code with \([\mathbf{H}_{I},\mathbf{H}_{P}]\) as the parity-check matrix can be encoded by the recursive method that includes the following steps:  
_Step1_: \(w_{i}=\alpha^{k_{i0}},1\leq i\leq m-1\);  
_Step2_: \(p_{0}=u_{0},p_{i}=u_{i}-w_{i}\cdot p_{i-1},1\leq i\leq m-1\). In the above steps, \(\mathbf{u}=[u_{0},u_{1},\cdots,u_{m-1}]\) is the intermediate result, and \(\mathbf{u}=\mathbf{H}_{P}\cdot\mathbf{p}^{T}=\mathbf{H}_{I}\cdot\mathbf{s}^{T}\). The vector \(\mathbf{u}\) can be calculated according to the matrix \(\mathbf{H}_{I}\) and the information symbol vector \(\mathbf{s}\).