I have to fill in values at 8 places in a sequence such that the resulting sequences have high variance among them. The values are from the sets $A=${$255, 250, 220, 160$} and $P =${$0, 45, 90, 135, 180$}. First four values have to be filled in from $A$ and the remaining from $P$.
I am trying to find a programmable solution in order to generate data from these values with maximum variance.
An extension to this question is that the last 4 values taken from $P$ result in the same subsequence when difference between subsequent places is the same. For example __ __ __ __ 0 45 0 45 is the same as __ __ __ __ 45 90 45 90. If this can be accounted for, it would help a lot.
Here is the programmable (or, better to say, already programmed) solution to your problem. This Python program accepts the sizes of samples, that need to be taken from $A$ and $P$ and $A$ and $P$ themselves. It returns an example of the sequence with maximum variance and its variance: