Syndrome Decoding
Syndrome Decoding
Syndrome Decoding
Proposition (1) (# of errors a code can detect) Let C be an [n, k, d]-code. Then C can
detect ≤ s errors if d ≥ s + 1.
Proof: Assume d ≥ s + 1. If a codeword c ∈ C is sent and s or fewer errors occur
then the received message r cannot be a codeword because if r ∈ C then we must have
dH (c, r) ≥ s + 1.
Proposition (2) (# of errors a code can correct) Let C be an [n, k, d]-code. Then C
can correct ≤ t errors if d ≥ 2t + 1.
Proof: Suppose that d ≥ 2t + 1. Assume that the codeword c is sent and the received word
r has ≤ t errors, i,e., dH (c, r) ≤ t. We will show that if c1 ∈ C is any other codeword then
dH (c1 , r) ≥ t + 1. Assume that dH (c1 , r) ≤ t. It follows from the definition of d (the minimal
Hamming distance between distinct codewords in C) and the triangle inequality for Hamming
distance that
2t + 1 ≤ d ≤ dH (c, c1 ) ≤ dH (c, r) + dH (r, c1 ) ≤ 2t.
This is a contradiction, so we must have d(c1 , r) ≤ t. It follows that c is the unique codeword
x ∈ C which satisfies dH (x, r) ≤ t, and we can correct the error by replacing r with the
codeword with closest Hamming distance to r.
SYNDROMES
Let G = Ik , P be a generator for an [n, k]-bilinear code (which we denote by C) where Ik is
the k × k identity matrix and and P is a k × (n − k) matrix with entries in F2 . Let
H = −P T , In−k
be the check matrix for C where P T denotes the transpose of the matrix P .
Definition (Syndrome) Let u ∈ Fn2 . Then the syndrome of u (denoted S(u)) is defined to be
S(u) := u · H T .
Remark: The most important property of syndromes is that S(u) = 0 if and only if u ∈ C.
Examples of Syndromes: Let
1 0 0 1 0
1 1 0 1 0
G = 0 1 0 1 1 , H= ,
0 1 0 0 1
0 0 1 0 0
be the generator and check matrix for a [5,3]-code.
Consider the following vectors in F52 .
u1 = 01010, u2 = 10011, u3 = 11100.
To compute the syndromes
! of u1 , u2 , u3 we first write down the transpose of the matrix H
0 1
T 1 1
given by H = 0 0 . Then
1 0
0 1
2
Theorem: Let C be an [n, k]-code. Let u 6= u0 be vectors in Fn2 . Then either u + C = u0 + C
or the two cosets u + C, u0 + C have no elements in common.
Proof: Assume some vector u + c in the coset u + C equals some vector u0 + c0 in the coset
u0 +C 0 . This implies that u+c+C = u0 +c0 +C. But u+c+C = u+C and u0 +c0 +C = u0 +C.
So the two cosets are the same.
Remark: The above theorem guarantees that the method to construct all the cosets on the
previous page has to work.
An immediate corollary of the above theorem is the following.
Corollary: Two vectors u, v ∈ Fn2 belong to the same coset if and only if they have the same
syndrome, i.e., S(u) = S(v).
Proof: It follows from the above theorem that two vectors u, v ∈ Fn2 belong to the same
coset if and only if u − v ∈ C. This implies that
Assume the sender transmits the codeword c= 1100011 and it is received as r = 0100011.
1 1 0
1 0 1
0 1 1
Step (2) We compute S(r) = r · H T = (0, 1, 0, 0, 0, 1, 1) · 1 1 1 = (1, 1, 0). We see that
1 0 0
0 1 0
0 0 1
the coset leader u = 1000000 has the same syndrome 110.
Step (3) We decode r as r − u = 0100011 − 1000000 = 1100011.
Assume the sender transmits the codeword c= 0100101 and it is received as r = 0110101.
0 1 1
1 0 1
0 1 1
Step (2) We compute S(r) = r · H T = (0, 1, 1, 0, 1, 0, 1) · 1 1 1 = (0, 1, 1). We see that
1 0 0
0 1 0
0 0 1
the coset leader u = 0010000 has the same syndrome 011.
Step (3) We decode r as r − u = 0110101 − 0010000 = 0100101.
DUAL CODES
Definition (Dot Product) The dot product of two vectors u = (u1 , u2 , . . . , un ), v = (v1 , v2 , . . . , vn )
which are in Fn2 is defined to be: u · v = u1 v1 + u2 v2 + · · · + un vn .
Definition (Dual Code) Let C be an [n, k] bilinear code. The dual code (denoted C ⊥ ) is
defined as the set of all vectors u ∈ FN
2 satisfying u · c = 0 for all c ∈ C.
Proposition Let C be an [n, k] bilinear code with generating matrix G = (Ik , P ) and check
matrix H = −P T , In−k . Then the dual code C ⊥ has generating matrix H and check matrix
G.
Proof: See page 415 in Introduction to Cryptography with Coding Theory.