I don't understand, you gave condition 2...
You just sort numbers from your initial list...
Am I missing something?
Sorry, my fault. x1 to x8 can be any number in the list '(1 2 3 4 5 6 7 8 ). For example, since x1≥x2≥..≥x8, x1 can be 8, x2 can be 7, x3 can be 6, ...., etc. Also, x1 can be 8, x2 can be 6, x3 can be 6, x4 can be 5, x5 can be 5, x6 can be 4, x7 can be 4, x8 can be 4. In other words, x1 to x8 are in descending order and can be Repeatable.