摘要

Recently, linear codes constructed from defining sets have been studied extensively. They may have excellent parameters if the defining set is chosen properly. Let m > 2 be a positive integer. For an odd prime p, let r = p(m) and Tr be the absolute trace function from F-r onto F-p. In this paper, we give a construction of linear codes by defining the code CD = {(Tr(ax))(x is an element of D) : a is an element of F-r}, where D = {x is an element of F-r : Tr(x) = 1,Tr(x(2)) = 0}. Its complete weight enumerator and weight enumerator are determined explicitly by employing cyclotomic numbers and Gauss sums. However, we find that the code is optimal with respect to the Griesmer bound provided that m = 3. In fact, it is MDS when m = 3. Moreover, the codes presented have higher rate compared with other codes, which enables them to have essential applications in areas such as association schemes and secret sharing schemes.