We present an extension of the pairwise Hamming distance, the r-wise Hamming distance, and show that it can be used to fully characterize the maximum-likelihood decoding (MLD) error of an arbitrary code used over the binary erasure channel (BEC). Based on these insights, we present a new design criterion for a code: the minimum r-wise Hamming distance. We prove that, for every r ≥ 2, the class ...