# 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
#### 3.3.2 Number of Cycles of Length 8  
In this case, \(i=4\), and we first assume \(\kappa\geq 4\). The \(t\) parameter takes two values: 3 and 4. Therefore, cases of \(P_{2}\) can be partitioned into two distinct categories: (a) all four points in the same block (\(t=4\)) and (b) three points in the same block and one point in a different block (\(t=3\)). The first class of cases of \(P_{2}\) is that all four points are in the same block (\(t=4\)). This corresponds to the scenario where any four points of \(\mathbf{X}\) lie in the same block. The number of such cases, denoted by \(P_{21}\), is calculated as follows:  
(1) For each block, the number of ways to choose four points is expressed as  
\[C_{\kappa}^{4}=\frac{\kappa(\kappa-1)(\kappa-2)(\kappa-3)}{4!}.\]  
(2) The total number of blocks in the BIBD is expressed as  
\[\frac{v(v-1)}{\kappa(\kappa-1)}.\]Thus, the total number of cases where four points lie in the same block is expressed as  
\[P_{21} =\frac{v(v-1)}{\kappa(\kappa-1)}\times\frac{\kappa(\kappa-1)(\kappa -2)(\kappa-3)}{4!}\] \[=\frac{v(v-1)(\kappa-2)(\kappa-3)}{4!}.\]  
The second class of cases of \(P_{2}\) is occurs when three points lie in the same block and one point is in a different block (\(t=3\)). This corresponds to the scenario where any three of the four points lie in the same block and the fourth point lies in a different block. The number of such cases, denoted by \(P_{22}\), is calculated as follows:  
1. For each block, the number of ways to choose three points is expressed as \[C_{\kappa}^{3}=\frac{\kappa(\kappa-1)(\kappa-2)}{3!}.\]
2. The fourth point must be chosen from the remaining \((v-\kappa)\) points (since it cannot be in the same block as the first three points). 3. The total number of blocks in the BIBD is \[\frac{v(v-1)}{\kappa(\kappa-1)}.\]
4. Thus, the total number of cases where three points lie in the same block and the fourth point lies in a different block is expressed as \[P_{22} =\frac{v(v-1)}{\kappa(\kappa-1)}\times\frac{\kappa(\kappa-1)( \kappa-2)}{3!}\times(v-\kappa)\] \[=\frac{v(v-1)(\kappa-2)(v-\kappa)}{3!}.\] Combining these two cases, the total number of invalid cases (\(P_{2}\)) is \[P_{2} =P_{21}+P_{22}\] \[=\frac{v(v-1)(\kappa-2)(\kappa-3)}{24}+\frac{v(v-1)(\kappa-2)(v- \kappa)}{6}.\] Since \[\frac{v(v-1)}{\kappa(\kappa-1)}.\]0 \[\frac{v(v-1)}{\kappa(\kappa-1)}.\]1 and \[\frac{v(v-1)}{\kappa(\kappa-1)}.\]2 the number of cycles of length \(8\) (\(N_{8}\)) is expressed as \[\frac{v(v-1)}{\kappa(\kappa-1)}.\]3 \[\frac{v(v-1)}{\kappa(\kappa-1)}.\]4 (4) where \(\kappa\geq 4\). When \(\kappa=3\), it is evident that the cases of \(P_{2}\) (where all four points lie in the same block) cannot occur, since each block contains only three points. Therefore, \(P_{21}=0\). For \(\kappa=3\), the number of cycles of length \((N_{8})\) is determined solely by the second cases of \(P_{2}\), where three points lie in the same block and the fourth point lies in a different block. Substituting \(\kappa=3\) into the expression for \(P_{22}\), we have  
\[\frac{v(v-1)}{\kappa(\kappa-1)}.\]5 \[\frac{v(v-1)}{\kappa(\kappa-1)}.\]6  
Since \(P_{21}=0\), the total number of invalid cases (\(P_{2}\)) is  
\[\frac{v(v-1)}{\kappa(\kappa-1)}.\]7 \[\frac{v(v-1)}{\kappa(\kappa-1)}.\]8  
Hence, the number of cycles of length \(8\) (\((N_{8})\)) for \(\kappa=3\) is  
\[\frac{v(v-1)}{\kappa(\kappa-1)}.\]9 \[P_{21} =\frac{v(v-1)}{\kappa(\kappa-1)}\times\frac{\kappa(\kappa-1)(\kappa -2)(\kappa-3)}{4!}\]0  
When \(\kappa=2\), the block size is too small to accommodate the conditions required for two classes of cases of \(P_{2}\). Specifically, the first class of cases requires four points to lie in the same block, which is impossible, since \(\kappa=2\), and the second class of cases requires three points to lie in the same block, which is also impossible, since \(\kappa=2\).