Professional Documents
Culture Documents
Abstract—We propose an efficient encoding algorithm for matrix and a known vector, the computation complexity is
the binary and non-binary low-density parity-check codes. This linear in the code length. Hence, in encoding for LDPC codes,
arXiv:2103.01560v1 [cs.IT] 2 Mar 2021
algorithm transforms the parity part of the parity-check matrix we should consider (i) an algorithm to construct suitable
into a block triangular matrix with low weight diagonal sub-
matrices by row and column permutations in the preprocessing HP and (ii) an algorithm to solve HP pT = bT efficiently.
stage. This algorithm determines the parity part of a codeword We transform H only by row and column permutations to
by block back-substitution to reduce the encoding complexity keep the sum-product decoding performance. Hence, by using
in the encoding stage. Numerical experiments show that this two permutation matrices P ∈ Fqm×m and Q ∈ Fn×n q , we
algorithm has a lower encoding complexity than existing encoding transform H into PHQ = (HP HI ).
algorithms. Moreover, we show that this algorithm encodes the
non-binary cycle codes in linear time. The existing works of the EA are itemized as follows and
summarized in Table I.
I. I NTRODUCTION 1) Richardson and Urbanke [5] proposed an efficient EA by
Low-density parity-check (LDPC) codes [1] are defined by transforming HP into an approximate triangular matrix
sparse parity-check matrices H ∈ Fm×nq , where Fq stands for (ATM). The complexity of this EA is O(n + δ 2 ), where
Galois field of order q. The LDPC codes are decoded by the n is a code length and δ is a gap that satisfies δ n and
sum-product decoding algorithm in linear time and come close is proportional to n. Hence, the complexity of this EA
to the Shannon capacity on many channels [2]. It is known is O(n2 ) but is lower than that of the EA by a generator
that irregular LDPC codes have lower block-error rates than matrix.
regular LDPC codes [3], [4]. 2) Kaji [6] proposed an EA by the LU-factorization. This
Let G ∈ Fq
(n−m)×n
be a generator matrix corresponding EA has lower complexity for codes with small gaps than
to the parity-check matrix H. In general, encoding for linear Richardson and Urbanke’s EA (RU-EA).
codes maps a message u ∈ Fn−m into a codeword x ∈ Fnq 3) Shibuya and Kobayashi [7] proposed an EA by block-
q
by xT = uT G. Even if H is a sparse matrix, G is not triangulation. This EA is more efficient than the RU-
always a sparse matrix. Hence, the complexity of an encoding EA. However, this EA has a possibility of abend [8],
algorithm (EA) by a generator matrix is quadratic in the code More precisely, there is a possibility that some diagonal
length. In other words, an EA by a generator matrix has a submatrices become vertical, i.e., singular.
larger complexity than the sum-product decoding algorithm 4) Nozaki [9] proposed a parallel EA by block-
for long code length. The encoding can be a bottleneck in a diagonalization. This EA has a lower encoding time than
communication system with an LDPC code. Therefore, it is the RU-EA by parallel computation. However, this EA
important to develop a low complexity EA for LDPC codes. has a slightly larger total computation complexity than
In this paper, we assume that the parity-check matrix H has the RU-EA.
full rank, i.e., rank(H) = m. By performing suitable column 5) Huang and Zhu [10] proposed a linear time EA for
permutations into H, we get (HP HI ), where HP is non- non-binary cycle codes, i.e., codes defined by parity-
singular. Then the codeword x ∈ Fnq is split into two parts, check matrices of which all the column weights are two.
namely the parity part p ∈ Fm This EA transforms HP into an upper block-bidiagonal
q and the message part u ∈
Fqn−m
, as x = (p u). Since HxT = 0T , we get HP pT = matrix whose diagonal submatrices are cycle or diagonal
−HI uT . matrices.
In general, the encoding for LDPC codes is accomplished in The goal of this work is to reduce the encoding complexity
two stages: the preprocessing stage and the encoding stage. In for binary and non-binary irregular LDPC codes. The main
the preprocessing stage, we split H into HI corresponding idea of this work is the block triangularization of a given parity
to u, and HP corresponding to p. In the encoding stage, check matrix. In detail, our proposed EA transforms each of
we determine p by solving HP pT = −HI uT . Since the the diagonal submatrices into a cycle or a diagonal matrix as
computation of bT := −HI uT is the product of a sparse much as possible. For the non-binary cycle codes, the resulting
TABLE I
C OMPARISON WITH EXISTING WORKS
Field of code
Work Type of code Technique Note
binary non-binary
Richardson and Urbanke [5] yes yes Irregular Approximate triangulation
Kaji [6] yes yes Irregular LU factorization
Shibuya and Kobayashi [7] yes yes Irregular Block triangulation Possibility of abend
Nozaki [9] yes yes Irregular Block diagonalization Encodable at parallel
Huang and Zhu [10] no yes Cycle Block bidiagonalization Encodable in linear
This work yes yes Irregular Block triangulation
matrix by the proposed EA coincides with one by Huang This preprocessing stage is regarded as an algorithm
and Zhu’s EA (HZ-EA). In other words, the proposed EA whose input is a matrix H and output is a tuple of matri-
is a generalization of the HZ-EA. Therefore, the complexity ces HRU , P, Q . Therefore, we denote this algorithm by
of the proposed EA is O(n) for the non-binary cycle codes. ATM(H) → HRU , P, Q [9]. This notation will be used
Numerical experiments show that the proposed EA has lower in Sect. III-B.
complexity than the RU-EA and Kaji’s EA (K-EA). We split the parity part p into (p1 , p2 ), where p1 ∈ Fqm−δ
We organize the rest of the paper as follows. Section II and p2 ∈ Fδq . Then, the encoding stage executes the following
introduces LDPC codes and existing EAs. Section III presents procedure;
the proposed EA. Numerical examples in Sect. IV compare 1) Compute bT1 = HRU T T RU T
I,1 u and b2 = HI,2 u
the complexity of the proposed EA and existing EAs. −1 −1 T
2) Derive p2 from p2 = Φ (VT b1 − bT2 )
T
µK = wt HRU
where T is an (m − δ) × (m − δ) triangular matrix, S, V, I + wt(L) + wt(U),
N, HRU RU
I,1 , and HI,2 are δ × (m − δ), (m − δ) × δ, δ × δ,
RU
αK = S HI + S(L) + S(U).
(m − δ) × (n − m), and δ × (n − m) matrices, respectively.
We define Φ := N − VT−1 S. We compute its inverse matrix It is known that the K-EA has lower complexity than the RU-
Φ−1 before the encoding stage. EA for the codes with small gaps [6].
D. Singly Bordered Block-Diagonalization TABLE II
A LGORITHM TO SOLVE Cω T = bT
By the singly bordered block-diagonalization [14], a given
H is transformed into HSBBD : Operation µ α
z1 ← b1 0 0
SBBD B1 O Z1 zi ← bi + i−1 zi−1 (i = 2, ..., k) k−1 k−1
H = PHQ = , yk ← zk ι−1
O B2 Z2 1 0
ωk ← γk−1 yk 1 0
where B1 , B2 , Z1 , and Z2 are m1 × n1 , (m − m1 ) × n2 , ωi ← γi−1 (zi − yk ηi ) (i = 1, ..., k − 1) 2k − 2 k−1
m1 × (n − n1 − n2 ), and (m − m1 ) × (n − n1 − n2 ) matrices,
respectively. In the singly bordered block-diagonalization, we
can predetermine the numbers of rows m1 , m2 . However, the 2) Solving Algorithm Cω T = bT and Its Complexity: We
numbers of columns n1 , n2 depend on the input matrix H. present an algorithm to solve Cω T = bT , where b ∈ Fkq is
Hence, if m1 is small, the submatrix B1 becomes vertical, known. Note that this algorithm has a smaller complexity than
i.e., m1 > n1 . Thus, to get a square or horizontal submatrix the algorithm in [10], which requires 4k − 3 multiplications
B1 , we need to adjust the size of m1 . and 3k − 5 additions (k ≥ 3).
The singly bordered block-diagonalization is regarded as To reduce the complexity, predetermine
an algorithm whose inputs are a matrix H and m1 and output
is a tuple of matrices HSBBD , P, Q . Therefore, we denote i := βi γi−1 (i = 1, 2, . . . , k), ι := 1 + 1 2 · · · k ,
this algorithm by SBBD(H, m1 ) → HSBBD , P, Q [9]. This ηi := k 1 2 · · · i−1 (i = 1, 2, . . . , k − 1).
notation will be used in Sect. III-B.
We denote substituting j into i by i ← j. Table II shows
E. Huang and Zhu’s Encoding Algorithm the algorithm to solve Cω T = bT . The total number of
multiplications µc and additions αc are
This section shows the HZ-EA [10] and complexity to solve
the equation with a cycle matrix. µc = 3k − 1, αc = 2(k − 1). (3)
1) Preprocessing Stage of HZ-EA: The associated graph
[10] gives a graph representation of a matrix, each of whose III. P ROPOSED E NCODING A LGORITHM
columns of weight two. An m × n matrix is described by an In this section, we propose an EA by block triangularization.
associated graph of m vertices and n edges. The vertices vi Section III-A gives an overview of the proposed EA. Sections
and vj are connected by the edge ek iff the (i, k)-entry and III-B and III-C present the preprocessing and encoding stages
the (j, k)-entry of the matrix are non-zero. of this EA, respectively. Section III-D evaluates the encoding
The cycle matrix1 C ∈ Fk×kq has the following form: complexity. Section III-E shows that this EA is a generaliza-
tion of the HZ-EA.
γ 1 0 0 · · · βk
β1 γ 2 0 · · · 0 A. Overview
C = 0 β2 γ 3 · · · 0 , The preprocessing stage of the proposed EA transforms a
.. . . . . .. ..
. . . . . given parity check matrix H into a block-triangular matrix H0
0 ··· 0 βk−1 γk by row and column permutations, where
F1 K1,2 · · · K1,`−1 K1,` H0I,1
where βi and γi is a non-zero element over Fq .
O F2 · · · K2,`−1 K2,` H0I,2
Remark 1. Consider a k × k cycle matrix C over F2 . Then,
H0 = ... .. .. .. .. .. . (4)
the rank of C is k − 1. In other words, all cycle matrices over . . . . .
0
F2 are always singular.
O O · · · F`−1 K`−1,` HI,`−1
O O ··· O F` H0I,`
The preprocessing stage of the HZ-EA [10] transforms H
into HHZ : Here, Fi is a non-singular mi × mi matrix, Ki,j and H0I,i are
of size mi × mj and mi × (n − m), respectively. Note that
C1 E1 P`
.. O i=1 mi = m. To reduce the encoding complexity, diagonal
D2 . block Fi forms a diagonal matrix as far as possible.
HHZ =
HHZ ,
.. I Suppose that the parity part p is split into ` parts pi ∈ Fm q
i
. Er−1
O
(i = 1, 2, . . . , `) as p = (p1 , p2 , . . . , p` ). Then, the encoding
Dr stage decides the parity part by solving H0P p = −H0I u for
where C1 is an m1 × m1 cycle matrix, Di is an mi × mi a given u. This equation is efficiently solved by the block
diagonal matrix (i = 2, 3, . . . , r), and Ei is mi × mi+1 matrix backward-substitution (Sect. III-C).
and HHZ
(i = 1, 2, . . . , r − 1), P I is m × (n − m) matrix, In the following sections, we explain block backward-
r substitution can reduce the encoding complexity by an ex-
respectively. Note that i=1 mi = m.
ample (Sect. III-A1) and briefly explain how to construct a
1 Since its associated graph is cycle, we call it cycle matrix. block-triangular matrix (Sect. III-A2 and III-A3).
1) Reason to Make Block Triangular Matrix : Assume HP wt(D) + wt(K) multiplications by the block backward-
is decomposed in the following block matrix substitution.
Summarizing above, if we obtain a block-triangular matrix
D K Su
whose several diagonal-blocks are diagonal matrices, we can
HP = O T Sl ,
reduce the encoding complexity. In the following section, we
O V N
briefly explain how to make such a matrix.
where D is an m1 × m1 diagonal matrix, T is an (m2 − δ) × 2) Extraction of Diagonal Matrices : Consider the case
(m2 −δ) triangular
matrix, and N is a δ × δ matrix. Since that H does not contain columns of weight 1. By a method
D K explained in Sect. III-A3, we extract a non-singular matrix F1
T1 = is a triangular matrix, HP is regarded as a
O T from H and get
large ATM, i.e.,
F1 M1
H1 = ,
D K Su
O W1
O T Sl = T1 S ,
V1 N by performing row and column permutation to H.
O V N
Since M1 6= O in general, there is a possibility that W1
Su
contains columns of weight 1. In such case, by rearranging
where =: S and O V =: V1 . In another interpreta-
Sl the rows and columns of H1 , we extract diagonal matrix D2
T Sl from W1 as
tion, since A2 = is a small ATM, HP is regarded
V N
as a block triangular matrix, i.e., F1 K1,1 M1
H2 = O D2 M2 .
D K Su
O O W2
O T Sl = D K2 ,
O A2 If W1 does not contain columns of weight 1, we extract a
O V N
non-singular matrix F2 from W2 by a similar way to F1 :
where K Su =: K2 .
Now, we compare the complexity to solve HP pT = bT F1 K1,1 M1
in the two interpretations above. To simplify the discussion, H02 = O F2 M2 .
we evaluate the complexity by the number of multiplications. O O W2
If we regard HP as a large ATM, then the number of By repeating the above process, finally we obtain the block-
multiplications µ1 to solve HP pT = bT is derived from triangular matrix.
Eq. (1) as When H contains columns of weight 1, firstly we extract
µ1 = 2(wt(D) + wt(K) + wt(T)) + wt(V) a diagonal matrix D1 and repeat the same process. Then we
get a block-triangular matrix.
+ wt(Su ) + wt(Sl ) + wt Φ−1
1 , (5)
3) Extraction of Non-Singular Diagonal Blocks : Consider
where Φ1 := N − V1 T−1 1 S.
the case that matrix W does not contain columns of weight
If we regard HP as a block-triangular matrix, then we split 1. If we choose appropriate m1 , singly bordered block-
p into p1 ∈ Fm q
1
and p2 ∈ Fm q
2
and obtain the following diagonalization (Sect. II-D) to W gives
system of linear equations:
B1 O Z1
0
W = PWQ = ,
A2 pT2 = bT2 , (6) O B2 Z2
DpT1 = bT1 − K2 pT2 , (7) where B1 is m1 × n1 full-rank horizontal submatrix. Since
rank(B1 ) = m1 , we extract a non-singular m1 × m1 matrix
where b1 (resp. b2 ) stands the first m1 (resp. last m2 ) elements
F1 by rearranging the rows of B1 as follows:
of vector b. We solve Eq. (6) by the RU-EA’s encoding stage
and get p2 . Substituting p2 into Eq. (7), we have p1 . This 0 0 F1 R 1 O Z 1 F1 M1
WQ = = .
calculation is called block backward-substitution. The total O O B2 Z2 O W1
number of multiplications µ2 to derive p2 and p1 is
Summarizing above, singly bordered block-diagonalization
µ2 = 2wt(T) + wt(V) + wt(Sl ) + wt Φ1−2
allows us to extract a non-singular matrix for binary and non-
+ wt(K) + wt(Su ) + wt(D), (8) binary codes.
In the case of non-binary codes, we can also extract a non-
−1
where Φ2 := N − VT Sl . singular matrix by cycle detection in the associate graph. For
By subtracting Eq. (8) from Eq. (5), we get a given matrix W, construct a submatrix C e which consists
of all the columns of weight 2 in W. We detect one of the
µ1 − µ2 = wt(D) + wt(K) + wt(Φ−1 −1
1 ) − wt(Φ2 ).
smallest cycles (e.g., see [15]) in the associated graph for C.
e
Since both Φ1 and Φ2 are δ × δ matrices, we assume Since cycles in an associated graph correspond to the cycle
wt(Φ−1 −1
1 ) ≈ wt(Φ2 ). From this, we can reduce about matrices, we get the following matrix by moving the rows and
Step 1
Step 2
yes
no
yes
no
Fig. 1. A matrix H(3)
yes
columns corresponding to the smallest cycle in the associated no
graph:
C1 M1
,
O W1
(t+1)
Ct+1 Mt+1
P(t) W(t) Q(t) = , (11) (ii)
O W(t+1)
where Ct+1 is the mt+1 × mt+1 cycle matrix. Set ft+1 ←
ft + mt+1 and gt+1 ← gt .
sample
(t) P4 O (t) Q4 O
W =
f W
c
O Im−ft −mt+1 O In−ft −gt −nt+1 (iv)
At+1 Rt+1,t+1 O Z
e1
= , (12)
O O B2 Z2 sample
10000
5000 5000
0 0 0
0 5000 10000 15000 0 5000 10000 15000 0 10000 20000
Number of additions (RU) Number of multiplications (RU) Number of additions (RU)
(a) Additions for E8 (b) Multiplications for E8 (c) Additions for E2
10000
5000 5000
0 0 0
0 5000 10000 15000 0 5000 10000 15000 0 10000 20000
Number of additions (Kaji) Number of multiplications (Kaji) Number of additions (Kaji)
(a) Additions for E8 (b) Multiplications for E8 (c) Additions for E2
[6] Y. Kaji, “Encoding LDPC codes using the triangular factorization,” Likoping University, 1996.
IEICE Trans. Fundamentals, vol. 89, no. 10, pp. 2510–2518, 2006. [13] T. Richardson and R. Urbanke, Modern coding theory. Cambridge
[7] T. Shibuya and K. Kobayashi, “Efficient linear time encoding for LDPC university press, 2008.
codes,” IEICE Trans. Fundamentals, vol. 97, no. 7, pp. 1556–1567, [14] C. Aykanat, A. Pinar, and Ü. V. Çatalyürek, “Permuting sparse rectan-
2014. gular matrices into block-diagonal form,” SIAM Journal on Scientific
[8] T. Nozaki, “Encoding of LDPC codes via block-diagonalization (in Computing, vol. 25, no. 6, pp. 1860–1879, 2004.
Japanese),” IEICE technical report, vol. 114, no. 224, pp. 43–48, 2014. [15] A. Itai and M. Rodeh, “Finding a minimum circuit in a graph,” SIAM
[9] ——, “Parallel encoding algorithm for LDPC codes based on block- Journal on Computing, vol. 7, no. 4, pp. 413–423, 1978.
diagonalization,” in 2015 IEEE International Symposium on Information
Theory (ISIT). IEEE, 2015, pp. 1911–1915.
[10] J. Huang and J. Zhu, “Linear time encoding of cycle GF (2p ) codes
through graph analysis,” IEEE Commun. Lett., vol. 10, no. 5, pp. 369–
371, 2006.
[11] N. Wiberg, H.-A. Loeliger, and R. Kotter, “Codes and iterative decoding
on general graphs,” European Transactions on telecommunications,
vol. 6, no. 5, pp. 513–525, 1995.
[12] N. Wiberg, “Codes and decoding on general graphs,” Ph.D. dissertation,
Number of additions (Proposed)
n=1000(Modified)
n=1000(Original)
y=x
3500
3000
2500
2500 3000 3500
Number of additions (Kaji)
Fig. 6. The number of additions to the K-EA and the proposed EA for codes
in E2 with n = 1000