An -code over the alphabet is perfect if the following holds:

The trivial solution to this is called the “easy” code .

In other words, a type of q-ary code whose parameters satisfy the Hamming bound with equality.