For an additional answer, you might be interested in "permutation codes".

This is a warm/hot topic in coding theory with strong mathematical roots.