(In Digital design), when I’ve a state diagram which has $5$ states I want to encode it using a $3$ bit number,( a binary number which has $n = 3$ bits and $S = 5$ states). What is the Math formula which tells me the total number of the different encoding arrangements? How do i find the numbers $140$, $420$, $840$ etc?
encoding samples: (edited: fixed erroneous number of states. i fixed it so as to be 5 states)
case 1: 000, 001, 010, 011, 100 (5 states, each number is 3 bits)
case 2: 111, 010, 011, 101, 001 (5 states, each number is 3 bits)
case 3: 010, 011, 101, 111, 110 (5 states, each number is 3 bits)
case N: ...
(since here we have 5 states we can get 140 unique different encoding
schemes).
Some additional information i found in the book introduction to logic design:
For three or four states, there are only three such assignments, and it is fairly easy to do that. For five states, however, that number goes up to $140$, and this method is not practical. (It rises to $420$ for six states, to $840$ for seven or eight states, and to over 10 million for nine states)
Three bits give you $2^3=8$ numbers to choose from. To choose $5$ of these there are $\frac {8!}{5!3!}=56$ combinations. I don't understand where your numbers $140,840$ come from.