# LDPC Codes on Balanced Incomplete Block Designs: Construction, Girth, and Cycle Structure Analysis
## 3 Girth and Cycle Structure Analysis of BIBD-LDPC Codes
### A Method for Counting Short Cycles of BIBD-LDPC Codes  
Since the girth of BIBD-LDPC codes is 6, we focus on analyzing cycles of length \(2i\) in the Tanner graph of a BIBD-LDPC code for \(i\geq 3\). Based on the cycle analysis in the preceding subsections, it is clear that the existence of cycles of length \(2i\) is closely tied to the point-and-block sequence described in (1) or, equivalently, the point sequence in (2). These sequences provide a systematic way to identify and characterize cycles in the Tanner graph, enabling a deeper understanding of the cycle structure and its impact on the performance of BIBD-LDPC codes.  
According to the theory of quasi-cyclic LDPC (QC-LDPC) codes with a girth of \(g\), Equation (4) in [11] provides the necessary and sufficient condition for the existence of cycles of length \(2i\) for \(g\leq 2i<2g\)[35]. Therefore, for the constructed BIBD-LDPC codes, the sequence (2) precisely represents cycles of length \(2i\) for \(6\leq 2i\leq 10\). From (2), it follows that identifying cycles of length \(2i\) is equivalent to finding \(i\) points in \(\mathbf{X}\) such that any \(t\) adjacent points in these \(i\) points do not lie in the same block for \(3\leq t\leq i\). Consequently, determining the number of cycles of length \(2i\) can be formulated as a combinatorial problem. It is important to note that for \(2i\geq 12\), the existence of cycles of length \(2i\) depends on the presence of cycles of length \(j\) for \(j\leq i\), such as cycles of length 6. The analysis of theselonger cycles involves more complex sequences derived from (2). In the following, we focus on cycles of length \(2i\) in the Tanner graph of BIBD-LDPC codes, which can be divided into three parts:  
1. Selection of \(i\) points from \(\mathbf{X}\): The number of ways to choose \(i\) distinct points from the \(v\) points in \(\mathbf{X}\) is given by the combination formula expressed as \[C_{v}^{i}=\frac{v!}{i!(v-i)!}.\] This quantity is denoted by \(P_{1}\).
2. Exclusion of invalid cases: Among the chosen \(i\) points, some cases must be excluded where any \(t\) adjacent points (for \(3\leq t\leq i\)) lie in the same block. These cases require a detailed combinatorial analysis, and the number of such invalid cases is denoted by \(P_{2}\).
3. Counting valid cycles of length \(2i\): For the remaining valid selections of \(i\) points, the number of cycles of length \(2i\) that can be formed is denoted by \(P_{3}\). This involves determining how many distinct cycles of length \(2i\) exist for each valid set of \(i\) points. This is analogous to the circle permutation problem but without considering the order of permutation. A simple counting argument shows that \[P_{3}=\frac{(i-1)!}{2}.\] This formula accounts for the number of distinct cycles that can be formed from \(i\) points, treating rotations and reflections as identical.  
Based on the above analysis, the total number of cycles of length \(2i\) in the Tanner graph of a BIBD-LDPC code is given by  
\[(P_{1}-P_{2})\times P_{3}.\]  
Since \(P_{1}\) and \(P_{3}\) can be directly calculated using the corresponding formulas based on the parameters of the BIBD, our focus shifts to determining \(P_{2}\), which represents the number of invalid cases where \(t\) adjacent points (for \(3\leq t\leq i\)) lie in the same block. Once \(P_{2}\) is computed, the number of cycles of length \(2i\) can be determined for specific values of \(i\). In the following, we apply the proposed cycle-counting method to calculate the number of cycles of lengths \(6\) and \(8\) in the Tanner graph of the BIBD-LDPC code constructed from \(\text{BIBD}(\kappa,1;v)\). It is noted that parameters \(i,t,P_{1},P_{2},P_{3},\kappa\), and \(v\) are consistently used in the following two subsections to maintain a unified framework for counting cycles of different lengths in the Tanner graphs of BIBD-LDPC codes.