Mapping(States) numbers with my own vectorization algorithm.
12 states based on vector 3:
NumberDistributionStates(3,12)
%*1 *2 *3
3 0 3
2 5 0
2 2 2
1 4 1
1 1 3
0 6 0
0 3 2
0 0 4
sum(Output .* [1:3],2)
12
12
12
12
12
12
12
12