sdr.bec_capacity(p: ArrayLike) NDArray[float_]

Calculates the capacity of a binary erasure channel (BEC).

Parameters:
p: ArrayLike

The erasure probability p of the BEC channel.

Returns:

The capacity C of the channel in bits/channel use.

Notes

The inputs to the BEC are xi{0,1} and the outputs are yi{0,1,e}. Erasures e are represented by -1. The capacity of the BEC is

C=1p  bits/channel use.

Examples

When the probability p of erasure is 0, the capacity of the channel is 1 bit/channel use. However, as the probability of erasure approaches 1, the capacity of the channel approaches 0.

In [1]: p = np.linspace(0, 1, 100); \
   ...: C = sdr.bec_capacity(p)
   ...: 

In [2]: plt.figure(); \
   ...: plt.plot(p, C); \
   ...: plt.xlabel("Erasure probability, $p$"); \
   ...: plt.ylabel("Capacity (bits/channel use), $C$"); \
   ...: plt.title("Capacity of the Binary Erasure Channel");
   ...: 
../../_images/sdr_bec_capacity_1.png