Permutations algorithm maximum difference/contrast
I was wondering what would be the algorithm for permutations with 5 numbers and 4 possible kinds of numbers used and order being important.
To make each iteration as different as possible from all the previous ones with the priority it being more different to the latest iteration. And taking in account of patterns of pairs, threes, fours... at certain indexes. eg. 1st (10001) --- > (21112) ---> (32223) ... (still two identical numbers at the sides and three in the middle. Aswell as only two kinds of numbers used overall )
When I tried to figure it out myself, I came to a conclusion that I need to set what kind of trade-offs to prioritize and what makes a bigger difference. One restriction on top of this would be that there cannot be only zeroes present.
I would greatly appreciate any thoughts on this. thank you !