Skip to article frontmatterSkip to article content

Performance Analysis of Linear Block Codes

Weight and Distance for Linear Block Codes

The weight of a codeword c\vec{c} in a code C\mathcal{C}, denoted w(c)w(\vec{c}), is the count of its nonzero components, a measure of its active elements.

Since the all-zero vector 0\vec{0} is a codeword in every linear block code (due to linearity), each such code includes exactly one codeword with weight zero.

The Hamming distance between two codewords c1,c2C\vec{c}_1, \vec{c}_2 \in \mathcal{C}, denoted d(c1,c2)d(\vec{c}_1, \vec{c}_2), is the number of positions where they differ, quantifying their separation.

Notably, a codeword’s weight is its Hamming distance from 0\vec{0}, linking these concepts directly in the context of linear structures.

Relationship between Weight and Distance

In linear block codes, the distance between codewords c1\vec{c}_1 and c2\vec{c}_2 equals the weight of their difference: d(c1,c2)=w(c1c2)d(\vec{c}_1, \vec{c}_2) = w(\vec{c}_1 - \vec{c}_2).

Since c1c2\vec{c}_1 - \vec{c}_2 is itself a codeword (due to closure under addition), this establishes a one-to-one correspondence between weights and distances.

Consequently, the set of distances from any codeword c\vec{c} to all others matches the set of weights of all codewords, a property independent of the chosen c\vec{c}.

This uniformity simplifies analysis, as the distance profile remains consistent across perspectives.

In binary codes, subtraction and addition are equivalent modulo-2, so c1c2=c1+c2\vec{c}_1 - \vec{c}_2 = \vec{c}_1 + \vec{c}_2, reinforcing this relationship.

Minimum Distance and Minimum Weight

The minimum distance of a code, dmind_{\min}, is the smallest Hamming distance between any two distinct codewords Proakis (2007, Eq. (7.2-11)):

dminminc1,c2Cc1c2d(c1,c2)d_{\min} \triangleq \min_{\substack{\vec{c}_1,\vec{c}_2 \in \mathcal{C} \\ \vec{c}_1 \neq \vec{c}_2}} d(\vec{c}_1, \vec{c}_2)

It determines the code’s error-correcting capability.

The minimum weight, wminw_{\min}, is the smallest weight among nonzero codewords Proakis (2007, Eq. (7.2-11)):

wminmincCc0w(c)w_{\min} \triangleq \min_{\substack{\vec{c} \in \mathcal{C} \\ \vec{c} \neq \vec{0}}} w(\vec{c})

For linear block codes, dmin=wmind_{\min} = w_{\min}, as the distance between any two codewords corresponds to the weight of a nonzero codeword, a key property simplifying code evaluation.

Relationship between Minimum Weight and Parity Check Matrix H\mathbf{H}

The minimum weight wminw_{\min} (or equivalently dmind_{\min}) of a linear block code is intricately tied to the parity check matrix H\mathbf{H}.

A vector c{0,1}n\vec{c} \in \{0, 1\}^n is a codeword if cHT=0\vec{c} \, \mathbf{H}^{\sf T} = \vec{0}.

For a codeword of minimum weight, this implies that wminw_{\min} columns of H\mathbf{H} are linearly dependent, as their combination yields the zero vector.

Conversely, no fewer than dmind_{\min} columns can be linearly dependent, since no nonzero codeword has a weight less than dmind_{\min}.

Thus, dmind_{\min} is the smallest number of linearly dependent columns in H\mathbf{H}, and the dimension of H\mathbf{H}’s column space is dmin1d_{\min} - 1, offering a structural insight into the code’s strength.

Relationship Between Hamming Distance and Euclidean Distance of the Codewords

In binary antipodal signaling, such as BPSK modulation, the binary components (0 and 1) of a codeword cC\vec{c} \in \mathcal{C} are mapped to Ec-\sqrt{\mathcal{E}_c} and +Ec+\sqrt{\mathcal{E}_c}, respectively, where Ec\mathcal{E}_c is the energy per codeword component.

For a modulated sequence s\vec{s} corresponding to codeword c\vec{c}, the components are:

smj=(2cmj1)Ec,1jn,1mMs_{mj} = (2c_{mj} - 1)\sqrt{\mathcal{E}_c}, \quad 1 \leq j \leq n, \quad 1 \leq m \leq M

This mapping transforms binary differences into signal amplitudes.

The squared Euclidean distance between two modulated sequences sm\vec{s}_m and sm\vec{s}_{m'} relates to the Hamming distance d(cm,cm)d(\vec{c}_m, \vec{c}_{m'}) as Proakis (2007, Eq. (7.2-14)):

dsm,sm2=4Ecd(cm,cm)d_{\vec{s}_m,\vec{s}_{m'}}^2 = 4\mathcal{E}_c d(\vec{c}_m, \vec{c}_{m'})

Each differing bit contributes a distance of 2Ec2\sqrt{\mathcal{E}_c}, squared to 4Ec4\mathcal{E}_c.

Consequently, the minimum Euclidean distance dEmind_{\mathcal{E}_{\min}} of the modulated sequences is Proakis (2007, Eq. (7.2-15)):

dEmin2=4Ecdmin=4RcEbdmind_{\mathcal{E}_{\min}}^2 = 4\mathcal{E}_c d_{\min} = 4 R_c \mathcal{E}_b d_{\min}

where dmind_{\min} is the minimum Hamming distance, Rc=k/nR_c = k/n is the code rate, and Eb\mathcal{E}_b is the energy per bit, linking physical signal separation to code structure.

The Weight Distribution Polynomial

An (n,k)(n, k) linear block code comprises 2k2^k codewords with weights ranging from 0 to nn.

The presence of the all-zero codeword ensures one codeword of weight 0, while nonzero codewords have weights from dmind_{\min} (the minimum distance) to nn.

The weight distribution polynomial (WEP), or weight enumeration function (WEF), denoted A(Z)A(Z), quantifies this distribution Proakis (2007, Eq. (7.2-16)):

A(Z)i=0nAiZi=1+i=dminnAiZi\begin{split} A(Z) &\triangleq \sum_{i=0}^{n} A_i Z^i \\ &= 1 + \sum_{i=d_{\min}}^{n} A_i Z^i \end{split}

Here, AiA_i is the number of codewords with weight ii.

The polynomial encodes the code’s weight profile, starting with A0=1A_0 = 1 (for 0\vec{0}) and detailing the frequency of each nonzero weight, a critical tool for analyzing error-correcting performance.

Input-Output Weight Enumeration Function

The input-output weight enumeration function (IOWEF), denoted B(Y,Z)B(Y, Z), extends the WEP by incorporating both codeword weights and the weights of their corresponding information sequences Proakis (2007, Eq. (7.2-25)):

B(Y,Z)i=0nj=0kBijYjZiB(Y, Z) \triangleq \sum_{i=0}^{n} \sum_{j=0}^{k} B_{ij} Y^j Z^i

where BijB_{ij} represents the number of codewords of weight ii generated by information sequences of weight jj.

This bivariate polynomial relates input and output weights, with:

Ai=j=0kBijA_i = \sum_{j=0}^{k} B_{ij}

summing contributions across all input weights to yield the WEP’s coefficients.

For linear block codes, B(0,0)=B00=1B(0, 0) = B_{00} = 1 (the zero input maps to the zero codeword), and:

A(Z)=B(Y,Z)Y=1A(Z) = B(Y, Z) \Big|_{Y=1}

collapsing B(Y,Z)B(Y, Z) to A(Z)A(Z) by summing over all input weights, providing a comprehensive view of code behavior.

Conditional Weight Enumeration Function

The conditional weight enumeration function (CWEF), denoted Bj(Z)B_j(Z), focuses on codewords tied to information sequences of a specific weight jj Proakis (2007, Eq. (7.2-28)):

Bj(Z)i=0nBijZiB_j(Z) \triangleq \sum_{i=0}^{n} B_{ij} Z^i

It enumerates the weight distribution of all codewords generated by inputs of weight jj, offering a detailed breakdown by input weight.

The relationship to the IOWEF is derived as:

Bj(Z)=1j!jYjB(Y,Z)Y=0B_j(Z) = \frac{1}{j!} \left. \frac{\partial^j}{\partial Y^j} B(Y, Z) \right|_{Y=0}

This partial derivative extracts the jj-th term’s coefficient from B(Y,Z)B(Y, Z), isolating the contribution of inputs with weight jj.

Together, these functions provide a layered analysis of the code’s structure, connecting input patterns to output characteristics.

EXAMPLE: (7, 4) Linear Block Code Weight Distribution

For the (7, 4) linear block code from a prior example, there are 24=162^4 = 16 codewords, with weights ranging from 0 to 7.

By generating all codewords from information sequences w=(w1,w2,w3,w4)\vec{w} = (w_1, w_2, w_3, w_4), the minimum distance is verified as dmin=3d_{\min} = 3.

The weight distribution reveals one codeword of weight 0 (the all-zero codeword), one of weight 7, seven of weight 3, and seven of weight 4.

Thus, the weight distribution polynomial A(Z)A(Z) is:

A(Z)=1+7Z3+7Z4+Z7A(Z) = 1 + 7Z^3 + 7Z^4 + Z^7

This polynomial encapsulates the frequency of each weight, providing a concise summary of the code’s structure and its error-correcting potential based on weight diversity.

Input-Output Weight Enumeration Function

For the same code, the input-output weight enumeration function (IOWEF) B(Y,Z)B(Y, Z) details both input and output weights.

Coefficients are: B00=1B_{00} = 1, B31=3B_{31} = 3, B32=3B_{32} = 3, B33=1B_{33} = 1, B41=1B_{41} = 1, B42=3B_{42} = 3, B43=3B_{43} = 3, B74=1B_{74} = 1, yielding:

B(Y,Z)=1+3YZ3+3Y2Z3+Y3Z3+YZ4+3Y2Z4+3Y3Z4+Y4Z7\begin{split} B(Y, Z) = 1 &+ 3YZ^3 + 3Y^2Z^3 + Y^3Z^3 \\ &+ YZ^4 + 3Y^2Z^4 + 3Y^3Z^4 + Y^4Z^7 \end{split}

The conditional weight enumeration functions (CWEF) are:

B0(Z)=1,B1(Z)=3Z3+Z4,B2(Z)=3Z3+3Z4,B3(Z)=Z3+3Z4,B4(Z)=Z7\begin{split} B_0(Z) &= 1, \\ B_1(Z) &= 3Z^3 + Z^4, \\ B_2(Z) &= 3Z^3 + 3Z^4, \\ B_3(Z) &= Z^3 + 3Z^4, \\ B_4(Z) &= Z^7 \end{split}

These functions map input weights (0 to 4) to output weight distributions, offering a detailed view of how information sequence weights influence codeword weights.

Error Probability of Linear Block Codes

Linear block codes involve two key error probabilities.

The block error probability (or word error probability) is the likelihood of transmitting a codeword cm\vec{c}_m and decoding it as a different codeword cm\vec{c}_{m'}, reflecting whole-codeword errors.

The bit error probability is the probability that an individual information bit is received incorrectly, focusing on per-bit accuracy.

These metrics assess different aspects of code performance, with block errors impacting entire messages and bit errors affecting data integrity at a finer level.

Block Error Probability

Due to the linearity of the code, the distances from any codeword cm\vec{c}_m to all others are consistent across all choices of cm\vec{c}_m.

Thus, analysis can assume the all-zero codeword 0\vec{0} is transmitted without loss of generality.

The block error probability PeP_e occurs when the receiver decodes any nonzero codeword cm0\vec{c}_m \neq \vec{0}.

This is bounded by the sum of pairwise error probabilities P0cmP_{\vec{0} \rightarrow \vec{c}_m}, the probability of mistaking 0\vec{0} for cm\vec{c}_m:

PecmCcm0P0cmP_e \leq \sum_{\vec{c}_m \in \mathcal{C} \atop \vec{c}_m \neq \vec{0}} P_{\vec{0} \rightarrow \vec{c}_m}

This union bound accounts for all possible error events, providing an upper limit on the likelihood of decoding errors.

Upper Bound of PeP_e

The pairwise error probability P0cmP_{\vec{0} \rightarrow \vec{c}_m} depends on the Hamming distance from 0\vec{0} to cm\vec{c}_m, which is w(cm)w(\vec{c}_m), and varies with modulation.

For codewords of equal weight, P0cmP_{\vec{0} \rightarrow \vec{c}_m} is identical, leading to Proakis (2007, Eq. (7.2-34)):

Pei=dminnAiP2(i)\boxed{ P_e \leq \sum_{i=d_{\min}}^{n} A_i P_2(i) }

where P2(i)P_2(i) is the pairwise error probability for distance ii, and AiA_i is the number of codewords of weight ii.

Using the Bhattacharyya bound for a memoryless channel:

P0cmi=1nyiYp(yi0)p(yicmi)P_{\vec{0} \to \vec{c}_m} \leq \prod_{i=1}^{n} \sum_{y_i \in \mathcal{Y}} \sqrt{p(y_i|0)p(y_i|c_{mi})}

Defining Δ=yYp(y0)p(y1)\Delta = \sum_{y \in \mathcal{Y}} \sqrt{p(y|0)p(y|1)}, this simplifies to:

P0cm=P2(w(cm))Δw(cm)P_{\vec{0} \to \vec{c}_m} = P_2(w(\vec{c}_m)) \leq \Delta^{w(\vec{c}_m)}

Thus:

Pei=dminnAiΔi=A(Δ)1P_e \leq \sum_{i=d_{\min}}^{n} A_i \Delta^i = A(\Delta) - 1

Since Δ1\Delta \leq 1 (from y(p(y0)p(y1))20\sum_{y} (\sqrt{p(y|0)} - \sqrt{p(y|1)})^2 \geq 0), and ΔiΔdmin\Delta^i \leq \Delta^{d_{\min}}, a looser bound is Proakis (2007, Eq. (7.2-43)):

Pe(2k1)Δdmin\boxed{ P_e \leq (2^k - 1)\Delta^{d_{\min}} }

Bit Error Probability

Bit error probabilities vary across the kk positions in an information sequence.

The average bit error probability PbP_b is defined as the mean error rate per bit.

Assuming 0\vec{0} is transmitted, the probability of decoding a codeword of weight ii is P2(i)P_2(i), with BijB_{ij} codewords of weight ii from input weight jj.

The expected number of bit errors is Proakis (2007, Eq. (7.2-44)):

bˉj=0kji=dminnBijP2(i)\bar{b} \leq \sum_{j=0}^{k} j \sum_{i=d_{\min}}^{n} B_{ij} P_2(i)

This counts erroneous bits weighted by input weight jj.

Since Bij=0B_{ij} = 0 for i<dmini < d_{\min}, the bound extends over all ii:

bˉj=0kji=0nBijP2(i)\bar{b} \leq \sum_{j=0}^{k} j \sum_{i=0}^{n} B_{ij} P_2(i)

The average bit error probability is Proakis (2007, Eq. (7.2-46)):

Pb=bˉk1kj=0kji=0nBijP2(i)1kj=0kji=0nBijΔi\begin{split} P_b &= \frac{\bar{b}}{k} \\ &\leq \frac{1}{k} \sum_{j=0}^{k} j \sum_{i=0}^{n} B_{ij} P_2(i) \\ &\leq \frac{1}{k} \sum_{j=0}^{k} j \sum_{i=0}^{n} B_{ij} \Delta^i \end{split}

This normalizes the expected errors by kk, using P2(i)ΔiP_2(i) \leq \Delta^i to bound the error rate, reflecting the code’s per-bit reliability.

References
  1. Proakis, J. (2007). Digital Communications (5th ed.). McGraw-Hill Professional.