jeudi 3 août 2017

Jumbled, but not random

I'm writing in Javascript I have an array of 10 items

From these 10 items I want to permutate 14 arrays of 5 items each that obey the following rules:

  1. The items "look jumbled" but
  2. Each of the 10 items is represented exactly 7 times across the 14 arrays
  3. No item in the same position in any of 3 consecutive arrays
  4. No more than two common items between 2 consecutive arrays

Now I can do this once by hand, but it's a lot of work to do it 100 times. Can it be done programmatically?

thanks




Aucun commentaire:

Enregistrer un commentaire