An even sequence
Hey there.
I have a set of data i have to bring to an as evenly as possible sequence.
Example
A = 4 times
B = 2 times
C =1 time
So, ACABABA ACABABA etc. (This is not a political commentary!)
Problem is, i have a lot of data. I don't want to to it by hand. If i know the name of the mathematical and/or statistical concept of what i want i might find an excel solution online. As of right now i haven't found the right phrasing for google to find what i am looking for.
Thank you!
Posted Jun 22, 2020, 11:44 AM UTC
Sounds like a combinatorial optimization problem. You want to find a permutation that minimizes some quantity. You just need to formulate what that quantity is. "Evenness" doesn't quite do it. For example, why is 'ABACABA' not a solution? Or is it?
It is. The problem is the amount of data.
A 32
B 24
C 20
D 16
E 16
F 16
G 16
H 12
I 12
J 12
K 8
L 8
M 8
N 8
O 8
That is too much for me to sort by hand.