The Shannon second coding theorem states that the operational channel capacity of a finite discrete memoryless channel is : rates below this maximum admit block codes with error tending to zero, and rates above it cannot have vanishing error. For this channel the preceding calculation gives
using maximum entropy on a finite alphabet. The transition matrix is a doubly stochastic matrix. Therefore the uniform input has uniform output: . It achieves the entropy upper bound, and hence
Equivalently this is the weakly symmetric channel capacity theorem: permutations of a common row and equal column sums make the uniform input optimal. If is uniform, the output contains no information about the input and the formula gives zero.
For a discrete random variable with probabilities , its Shannon entropy in bits is , with . Gibbs inequality states that
with equality exactly when . If , the left side is infinite. Otherwise apply to for :
Equality requires on the support and no remaining mass outside it. In particular, comparison with the uniform probability distribution on two outcomes gives binary Shannon entropy at most .
Write . For , grouping the last two outcomes gives
Equality holds if ; if it also holds, and then both are zero. Thus equality holds exactly when .
For the discrete memoryless channel, assume and , and set . Both conditional output probability distributions have Shannon entropy . The third output has probability regardless of the input; the first two have total probability . Their Shannon entropy is maximized by making them equal, which a uniform input achieves. Hence the channel capacity is
and therefore
The usual zero-times-log convention includes , when . If , the rows coincide and every input achieves zero mutual information; otherwise the uniform input is the unique maximizing input.
For a discrete memoryless channel with input and output , its information capacity is
where is the mutual information and the maximum is over all input distributions. Capacity is measured in bits when logarithms have base two.
A discrete memoryless channel has finite input alphabet , finite output alphabet , and transition probabilities ; successive outputs are conditionally independent given the corresponding inputs. The Shannon second coding theorem states that rates below
admit block codes with error probability tending to zero, whereas rates above cannot have vanishing error.
For any joint input law of , conditional independence of the product channel gives
Choose and independently with capacity-achieving input laws for their respective channels. Then the inequality becomes equality, so the product-channel capacity is