*2.2. Coset Decoding*

**Definition 5.** *Let C be an* [*n*, *k*]*-code over* F*<sup>q</sup> and u be any vector in* (F*q*)*n. The coset of C is defined as follows.*

$$
\mu + \mathbb{C} = \{\mu + \mathfrak{x} | \mathfrak{x} \in \mathbb{C}\}.\tag{1}
$$

**Theorem 1** (Lagrange)**.** *Suppose C is an* [*n*, *k*]*-code over* F*q. Then,*


**Definition 6** (Coset Leader)**.** *The coset leader is the vector having a minimum weight in a coset. If a coset contains more than one vector which has the minimum weight, then it is chosen at random as the coset leader.*

**Definition 7** (Syndrome Decoding)**.** *Consider H is a parity-check matrix of an* [*n*, *k*]*-code C. In this case,*

$$S(y) = yH^T\tag{2}$$

*is called the syndrome of y, where y is any vector of* (F*q*)*n, the* <sup>1</sup> <sup>×</sup> (*<sup>n</sup>* <sup>−</sup> *<sup>k</sup>*) *row vector. Moreover,*

$$S(y) = 0 \Longrightarrow y \in \mathbb{C}.\tag{3}$$

**Lemma 1.** *Two vectors u and v are in the same coset of C if and only if they have the same syndrome.*

**Corollary 1.** *There is a one-to-one correspondence between cosets and syndromes.*
