We give a new upper bound on the maximum size $A_q(n,d)$ of a code of word length $n$ and minimum Hamming distance at least $d$ over the alphabet of $q\geq 3$ letters. By block-diagonalizing the Terwilliger algebra of the nonbinary Hamming scheme, the bound can be calculated in time polynomial in $n$ using semidefinite programming. For $q=3,4,5$ this gives several improved upper bounds for concrete values of $n$ and $d$. This work builds upon previous results of A. Schrijver [IEEE Trans. Inform. Theory 51 (2005), no. 8, 2859--2866] on the Terwilliger algebra of the binary Hamming scheme
Academic Press
Journal of Combinatorial Theory - Series A
Networks and Optimization

Gijswijt, D., Schrijver, L., & Tanaka, H. (2006). New upper bounds for nonbinary codes based on the Terwilliger algebra and semidefinite programming. Journal of Combinatorial Theory - Series A, 113(8), 1719–1731.