title: Generate vectors and each element in the vector has K possibilities
body: <p>I want to generate a set of vectors with length N. Each of the element in the vector has K possibilities (choosing from integers 1 to K).
  For example, if N=2 and K=2, the set of vectors are <code>[0 0], [0 1], [1 0]</code> and . <code>[1 1]</code>. Basically, the number of vectors I want to generate equals to  K^N.</p>