ThisIn article[[communication discussestheory]] common methods inand [[communicationcoding theory]], for '''decoding''' is the process of translating received messages into [[code|codewords]] of a given [[code]]. This article discusses common methods of mapping messages to codewords. These methods are often used to recover messages sent over a [[noisy channel]], (such as a [[binary symmetric channel]]).
==Notation==
Henceforth <math>C \subset \mathbb{F}_2^n</math> shall be a (not necessarily [[linear code|linear]]) [[code]] of length <math>n</math>; <math>x,y</math> shall be elements of <math>\mathbb{F}_2^n</math>; and <math>d(x,y)</math> shall represent the [[Hamming distance]] between <math>x,y</math>. Note that <math>C</math> is not necessarily [[linear code|linear]].
==Ideal observer decoding==
Given a received [[codeword]]message <math>x \in \mathbb{F}_2^n</math>, '''ideal observer decoding''' picks a codeword <math>y \in C</math> to maximise:
:<math>\mathbb{P}(y \mbox{ sent} \mid x \mbox{ received})</math>
-thei.e. codewordchoose (or athe codeword) <math>y \in C</math> that is most likely to be received as the message <math>x</math> after transmission.
Where this decoding result is non-unique a convention must be agreed. Popular such conventions are: