# Binary symmetric channel

Template:More footnotes A binary symmetric channel (or BSC) is a common communications channel model used in coding theory and information theory. In this model, a transmitter wishes to send a bit (a zero or a one), and the receiver receives a bit. It is assumed that the bit is usually transmitted correctly, but that it will be "flipped" with a small probability (the "crossover probability"). This channel is used frequently in information theory because it is one of the simplest channels to analyze.

## Description

The BSC is a binary channel; that is, it can transmit only one of two symbols (usually called 0 and 1). (A non-binary channel would be capable of transmitting more than 2 symbols, possibly even an infinite number of choices.) The transmission is not perfect, and occasionally the receiver gets the wrong bit.

This channel is often used by theorists because it is one of the simplest noisy channels to analyze. Many problems in communication theory can be reduced to a BSC. Conversely, being able to transmit effectively over the BSC can give rise to solutions for more complicated channels.

## Definition

A binary symmetric channel with crossover probability p denoted by ${\displaystyle BSC_{p}}$, is a channel with binary input and binary output and probability of error p; that is, if X is the transmitted random variable and Y the received variable, then the channel is characterized by the conditional probabilities

Pr( Y = 0 | X = 0 ) = 1 − p
Pr( Y = 0 | X = 1) = p
Pr( Y = 1 | X = 0 ) = p
Pr( Y = 1 | X = 1 ) = 1 − p

It is assumed that 0 ≤ p ≤ 1/2. If p > 1/2, then the receiver can swap the output (interpret 1 when it sees 0, and vice versa) and obtain an equivalent channel with crossover probability 1 − p ≤ 1/2.

### Capacity of BSCp

The capacity of the channel is 1 − H(p), where H(p) is the binary entropy function.

The converse can be shown by a sphere packing argument. Given a codeword, there are roughly 2n H(p) typical output sequences. There are 2n total possible outputs, and the input chooses from a codebook of size 2nR. Therefore, the receiver would choose to partition the space into "spheres" with 2n / 2nR = 2n(1 − R) potential outputs each. If R > 1 − H(p), then the spheres will be packed too tightly asymptotically and the receiver will not be able to identify the correct codeword with vanishing probability.Template:What

## Shannon's channel capacity theorem for BSCp

Shannon's noisy coding theorem is general for all kinds of channels. We consider a special case of this theorem for a binary symmetric channel with an error probability p.

### Noisy coding theorem for BSCp

The noise ${\displaystyle e}$ that characterizes ${\displaystyle BSC_{p}}$ is a random variable consisting of n independent random bits (n is defined below) where each random bit is a ${\displaystyle 1}$ with probability ${\displaystyle p}$ and a ${\displaystyle 0}$ with probability ${\displaystyle 1-p}$. We indicate this by writing "${\displaystyle e\in BSC_{p}}$".

What this theorem actually implies is, a message when picked from ${\displaystyle \{0,1\}^{k}}$, encoded with a random encoding function ${\displaystyle E}$, and send across a noisy ${\displaystyle BSC_{p}}$, there is a very high probability of recovering the original message by decoding, if ${\displaystyle k}$ or in effect the rate of the channel is bounded by the quantity stated in the theorem. The decoding error probability is exponentially small.

We shall now prove Theorem 1 .

Proof We shall first describe the encoding function ${\displaystyle E}$ and the decoding function ${\displaystyle D}$ used in the theorem. We will use the probabilistic method to prove this theorem. Shannon's theorem was one of the earliest applications of this method.

Encoding function ${\displaystyle E}$: Considering an encoding function ${\displaystyle E}$: ${\displaystyle \{0,1\}^{k}\rightarrow \{0,1\}^{n}}$ that is selected at random. This means that for each message ${\displaystyle m\in \{0,1\}^{k}}$, the value ${\displaystyle E(m)\in \{0,1\}^{n}}$ is selected at random (with equal probabilities).

Decoding function ${\displaystyle D}$: For a given encoding function ${\displaystyle E}$, the decoding function ${\displaystyle D}$: ${\displaystyle \{0,1\}^{n}\rightarrow \{0,1\}^{k}}$ is specified as follows: given any received codeword ${\displaystyle y}$ ${\displaystyle \in }$ ${\displaystyle \{0,1\}^{n}}$, we find the message ${\displaystyle m\in \{0,1\}^{k}}$ such that the Hamming distance ${\displaystyle \Delta (y,E(m))}$ is as small as possible (with ties broken arbitrarily). This kind of a decoding function is called a maximum likelihood decoding (MLD) function.

Ultimately, we will show (by integrating the probabilities) that at least one such choice ${\displaystyle (E,D)}$ satisfies the conclusion of theorem; that is what is meant by the probabilistic method.

The proof runs as follows. Suppose ${\displaystyle p}$ and ${\displaystyle \epsilon }$ are fixed. First we show, for a fixed ${\displaystyle m\in \{0,1\}^{k}}$ and ${\displaystyle E}$ chosen randomly, the probability of failure over ${\displaystyle BSC_{p}}$ noise is exponentially small in n. At this point, the proof works for a fixed message ${\displaystyle m}$. Next we extend this result to work for all ${\displaystyle m}$. We achieve this by eliminating half of the codewords from the code with the argument that the proof for the decoding error probability holds for at least half of the codewords. The latter method is called expurgation. This gives the total process the name random coding with expurgation.

A high level proof: Fix ${\displaystyle p}$ and ${\displaystyle \epsilon }$. Given a fixed message ${\displaystyle m\in \{0,1\}^{k}}$, we need to estimate the expected value of the probability of the received codeword along with the noise does not give back ${\displaystyle m}$ on decoding. That is to say, we need to estimate: ${\displaystyle \mathbb {E} _{E}[\Pr _{e\in BSC_{p}}[D(E(m)+e)\neq m]]}$.

Let ${\displaystyle y}$ be the received codeword. In order for the decoded codeword ${\displaystyle D(y)}$ not to be equal to the message ${\displaystyle m}$, one of the following events must occur:

We can apply Chernoff bound to ensure the non occurrence of the first event. By applying Chernoff bound we have, ${\displaystyle Pr_{e\in BSC_{p}}}$ ${\displaystyle [\Delta (y,E(m))>(p+\epsilon )n]\leq 2^{-{\epsilon ^{2}}n}}$. This is exponentially small for large ${\displaystyle n}$ (recall that ${\displaystyle \epsilon }$ is fixed).

As for the second event, we note that the probability that ${\displaystyle E(m^{\prime })\in B(y,(p+\epsilon )n)}$ is ${\displaystyle Vol(B(y,(p+\epsilon )n)/2^{n}}$ where ${\displaystyle B(x,r)}$ is the Hamming ball of radius ${\displaystyle r}$ centered at vector ${\displaystyle x}$ and ${\displaystyle Vol(B(x,r))}$ is its volume. Using approximation to estimate the number of codewords in the Hamming ball, we have ${\displaystyle Vol(B(y,(p+\epsilon )n))\approx 2^{H(p)n}}$. Hence the above probability amounts to ${\displaystyle 2^{H(p)n}/2^{n}=2^{H(p)n-n}}$. Now using union bound, we can upper bound the existence of such an ${\displaystyle m^{\prime }\in \{0,1\}^{k}}$ by ${\displaystyle \leq 2^{k+H(p)n-n}}$ which is ${\displaystyle 2^{-\Omega (n)}}$, as desired by the choice of ${\displaystyle k}$.

A detailed proof: From the above analysis, we calculate the probability of the event that the decoded codeword plus the channel noise is not the same as the original message sent. We shall introduce some symbols here. Let ${\displaystyle p(y|E(m))}$ denote the probability of receiving codeword ${\displaystyle y}$ given that codeword ${\displaystyle E(m)}$ was sent. Denote ${\displaystyle B(E(m),(p+\epsilon )n)}$ by ${\displaystyle {\text{Ball}}}$. ${\displaystyle \Pr _{e\in BSC_{p}}[D(E(m)+e)\neq m]=\sum _{y\in \{0,1\}^{n}}p(y|E(m))\cdot 1_{D(y)\neq m}\leq \sum _{y\notin {\text{Ball}}}p(y|E(m))\cdot 1_{D(y)\neq m}+\sum _{y\in {\text{Ball}}}p(y|E(m))\cdot 1_{D(y)\neq m}\leq 2^{-{\epsilon ^{2}}n}+\sum _{y\in {\text{Ball}}}p(y|E(m))\cdot 1_{D(y)\neq m}.}$

Now we have ${\displaystyle \sum _{y\in {\text{Ball}}}p(y|E(m))\leq 1}$. This just says, that the quantity ${\displaystyle \mathbb {E} [1_{D(y)\neq m}]\leq 2^{k+H(p+\epsilon )n-n}}$, again from the analysis in the higher level proof above. Hence, taking everything together we have ${\displaystyle \mathbb {E} _{E}[\Pr _{e\in BSC_{p}}[D(E(m)+e)\neq m]]\leq 2^{-{\epsilon ^{2}}n}+2^{k+H(p+\epsilon )n-n}\leq 2^{-\delta n}}$, by appropriately choosing the value of ${\displaystyle \delta }$. Since the above bound holds for each message, we have ${\displaystyle \mathbb {E} _{m}[\mathbb {E} _{E}[\Pr _{e\in BSC_{p}}[D(E(m)+e)]\neq m]]\leq 2^{-\delta n}}$. Now we can change the order of summation in the expectation with respect to the message and the choice of the encoding function ${\displaystyle E}$, without loss of generality. Hence we have ${\displaystyle \mathbb {E} _{E}[\mathbb {E} _{m}[\Pr _{e\in BSC_{p}}[D(E(m)+e)]\neq m]]\leq 2^{-\delta n}}$. Hence in conclusion, by probabilistic method, we have some encoding function ${\displaystyle E^{*}}$ and a corresponding decoding function ${\displaystyle D^{*}}$ such that ${\displaystyle \mathbb {E} _{m}[\Pr _{e\in BSC_{p}}[D^{*}(E^{*}(m)+e)\neq m]]\leq 2^{-\delta n}}$.

At this point, the proof works for a fixed message ${\displaystyle m}$. But we need to make sure that the above bound holds for all the messages ${\displaystyle m}$ simultaneously. For that, let us sort the ${\displaystyle 2^{k}}$ messages by their decoding error probabilities. Now by applying Markov's inequality, we can show the decoding error probability for the first ${\displaystyle 2^{k-1}}$ messages to be at most ${\displaystyle 2.2^{-\delta n}}$. Thus in order to confirm that the above bound to hold for every message ${\displaystyle m}$, we could just trim off the last ${\displaystyle 2^{k-1}}$ messages from the sorted order. This essentially gives us another encoding function ${\displaystyle E^{\prime }}$ with a corresponding decoding function ${\displaystyle D^{\prime }}$ with a decoding error probability of at most ${\displaystyle 2^{-\delta n+1}}$ with the same rate. Taking ${\displaystyle \delta ^{\prime }}$ to be equal to ${\displaystyle \delta -{\frac {1}{n}}}$ we bound the decoding error probability to ${\displaystyle 2^{-\delta ^{\prime }n}}$. This expurgation process completes the proof of Theorem 1.

## Converse of Shannon's capacity theorem

The converse of the capacity theorem essentially states that ${\displaystyle 1-H(p)}$ is the best rate one can achieve over a binary symmetric channel. Formally the theorem states:

For a detailed proof of this theorem, the reader is asked to refer to the bibliography. The intuition behind the proof is however showing the number of errors to grow rapidly as the rate grows beyond the channel capacity. The idea is the sender generates messages of dimension ${\displaystyle k}$, while the channel ${\displaystyle BSC_{p}}$ introduces transmission errors. When the capacity of the channel is ${\displaystyle H(p)}$, the number of errors is typically ${\displaystyle 2^{H(p+\epsilon )n}}$ for a code of block length ${\displaystyle n}$. The maximum number of messages is ${\displaystyle 2^{k}}$. The output of the channel on the other hand has ${\displaystyle 2^{n}}$ possible values. If there is any confusion between any two messages, it is likely that ${\displaystyle 2^{k}2^{H(p+\epsilon )n}\geq 2^{n}}$. Hence we would have ${\displaystyle k\geq \lceil (1-H(p+\epsilon )n)\rceil }$, a case we would like to avoid to keep the decoding error probability exponentially small.

## Codes for BSCp

Very recently, a lot of work has been done and is also being done to design explicit error-correcting codes to achieve the capacities of several standard communication channels. The motivation behind designing such codes is to relate the rate of the code with the fraction of errors which it can correct.

The approach behind the design of codes which meet the channel capacities of ${\displaystyle BSC}$, ${\displaystyle BEC}$ have been to correct a lesser number of errors with a high probability, and to achieve the highest possible rate. Shannon’s theorem gives us the best rate which could be achieved over a ${\displaystyle BSC_{p}}$, but it does not give us an idea of any explicit codes which achieve that rate. In fact such codes are typically constructed to correct only a small fraction of errors with a high probability, but achieve a very good rate. The first such code was due to George D. Forney in 1966. The code is a concatenated code by concatenating two different kinds of codes. We shall discuss the construction Forney's code for the Binary Symmetric Channel and analyze its rate and decoding error probability briefly here. Various explicit codes for achieving the capacity of the binary erasure channel have also come up recently.

## Forney's code for BSCp

Forney constructed a concatenated code ${\displaystyle C^{*}}$ ${\displaystyle =}$ ${\displaystyle C_{\text{out}}\circ C_{\text{in}}}$ to achieve the capacity of Theorem 1 for ${\displaystyle BSC_{p}}$. In his code,

For the outer code ${\displaystyle C_{\text{out}}}$, a Reed-Solomon code would have been the first code to have come in mind. However, we would see that the construction of such a code cannot be done in polynomial time. This is why a binary linear code is used for ${\displaystyle C_{\text{out}}}$.

For the inner code ${\displaystyle C_{\text{in}}}$ we find a linear code by exhaustively searching from the linear code of block length ${\displaystyle n}$ and dimension ${\displaystyle k}$, whose rate meets the capacity of ${\displaystyle BSC_{p}}$, by Theorem 1.

The rate ${\displaystyle R(C^{*})=R(C_{\text{in}})\times R(C_{\text{out}})=(1-{\frac {\epsilon }{2}})(1-H(p)-{\frac {\epsilon }{2}})\geq 1}$ ${\displaystyle -}$ ${\displaystyle H(p)}$ ${\displaystyle -}$ ${\displaystyle \epsilon }$ which almost meets the ${\displaystyle BSC_{p}}$ capacity. We further note that the encoding and decoding of ${\displaystyle C^{*}}$ can be done in polynomial time with respect to ${\displaystyle N}$. As a matter of fact, encoding ${\displaystyle C^{*}}$ takes time ${\displaystyle O(N^{2})+O(Nk^{2})=O(N^{2})}$. Further, the decoding algorithm described takes time ${\displaystyle Nt_{\text{in}}(k)+t_{\text{out}}(N)=N^{O(1)}}$ as long as ${\displaystyle t_{\text{out}}(N)=N^{O(1)}}$; and ${\displaystyle t_{\text{in}}(k)=2^{O(k)}}$.

### Decoding error probability for C*

A natural decoding algorithm for ${\displaystyle C^{*}}$ is to:

Note that each block of code for ${\displaystyle C_{\text{in}}}$ is considered a symbol for ${\displaystyle C_{\text{out}}}$. Now since the probability of error at any index ${\displaystyle i}$ for ${\displaystyle D_{\text{in}}}$ is at most ${\displaystyle {\frac {\gamma }{2}}}$ and the errors in ${\displaystyle BSC_{p}}$ are independent, the expected number of errors for ${\displaystyle D_{\text{in}}}$ is at most ${\displaystyle {\frac {\gamma N}{2}}}$ by linearity of expectation. Now applying Chernoff bound, we have bound error probability of more than ${\displaystyle \gamma N}$ errors occurring to be ${\displaystyle e^{\frac {-\gamma N}{6}}}$. Since the outer code ${\displaystyle C_{\text{out}}}$ can correct at most ${\displaystyle \gamma N}$ errors, this is the decoding error probability of ${\displaystyle C^{*}}$. This when expressed in asymptotic terms, gives us an error probability of ${\displaystyle 2^{-\Omega (\gamma N)}}$. Thus the achieved decoding error probability of ${\displaystyle C^{*}}$ is exponentially small as Theorem 1.

We have given a general technique to construct ${\displaystyle C^{*}}$. For more detailed descriptions on ${\displaystyle C_{\text{in}}}$ and ${\displaystyle C{out}}$ please read the following references. Recently a few other codes have also been constructed for achieving the capacities. LDPC codes have been considered for this purpose for their faster decoding time.[1]