The problem of classifying constacyclic codes over a finite field, both the Hamming distance and the algebraic structure, is an interesting problem in algebraic coding theory. For the repeated-root constacyclic codes of length [Formula: see text] over [Formula: see text], where [Formula: see text] is a prime number and [Formula: see text] does not divide [Formula: see text], the problem has been solved completely for all [Formula: see text] and partially for [Formula: see text]. In this paper, we solve the problem for [Formula: see text] and all primes [Formula: see text] different from [Formula: see text] and [Formula: see text]. In particular, we characterize the Hamming distance of all repeated-root constacyclic codes of length [Formula: see text] over [Formula: see text]. As an application, we identify all optimal and near-optimal codes with respect to the Singleton bound of these types, namely, MDS, almost-MDS, and near-MDS codes.
Read full abstract