Show that every (q+1,M,3 ) code ternary has $M\leq q^{q-1}$ where
q+1 is the lenght of the wordcorde
M is the number of elementes in the Code
3 is the minimum distance of the code
My work up to now. It's clear that $M\leq q^{q+1}$ beacuse of the permutation of q simbols in q+1 vectors. But if the min distance is 3 it's clear that I can chose from q possibilities for the first q-2 positions.
Then I have 3 empty positions in the vector so I can choose from q possiblities and just repeating it 3 times (my decision scheme is going to consider them equal). So it is
$q^{q-2}*q$
Do you think it's correct?