def faro(list):
cut = len(list) / 2
for i in range(0, cut):
list.insert(i * 2, list.pop(cut + i))
start = range(10)
for i in range(10):
print start
faro(start)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
[5, 0, 6, 1, 7, 2, 8, 3, 9, 4]
[2, 5, 8, 0, 3, 6, 9, 1, 4, 7]
[6, 2, 9, 5, 1, 8, 4, 0, 7, 3]
[8, 6, 4, 2, 0, 9, 7, 5, 3, 1]
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
[4, 9, 3, 8, 2, 7, 1, 6, 0, 5]
[7, 4, 1, 9, 6, 3, 0, 8, 5, 2]
[3, 7, 0, 4, 8, 1, 5, 9, 2, 6]
[1, 3, 5, 7, 9, 0, 2, 4, 6, 8]
import random
def faro(list):
cut = len(list) / 2
for i in range(0, cut):
list.insert(i * 2, list.pop(cut + i))
start = range(10)
random.shuffle(start)
for i in range(10):
print start
faro(start)
[2, 5, 8, 0, 1, 9, 6, 4, 3, 7]
[9, 2, 6, 5, 4, 8, 3, 0, 7, 1]
[8, 9, 3, 2, 0, 6, 7, 5, 1, 4]
[6, 8, 7, 9, 5, 3, 1, 2, 4, 0]
[3, 6, 1, 8, 2, 7, 4, 9, 0, 5]
[7, 3, 4, 6, 9, 1, 0, 8, 5, 2]
[1, 7, 0, 3, 8, 4, 5, 6, 2, 9]
[4, 1, 5, 7, 6, 0, 2, 3, 9, 8]
[0, 4, 2, 1, 3, 5, 9, 7, 8, 6]
[5, 0, 9, 4, 7, 2, 8, 1, 6, 3]
import random
def faro(list):
cut = len(list) / 2
for i in range(0, cut):
list.insert(i * 2, list.pop(cut + i))
start = range(10)
random.shuffle(start)
starts = []
for i in range(10):
starts.append(start[:])
faro(start)
random.shuffle(starts)
for start in starts:
print start
[9, 8, 6, 4, 7, 3, 5, 1, 0, 2]
[4, 1, 9, 7, 0, 8, 3, 2, 6, 5]
[2, 0, 1, 5, 3, 7, 4, 6, 8, 9]
[1, 7, 8, 2, 5, 4, 9, 0, 3, 6]
[6, 3, 0, 9, 4, 5, 2, 8, 7, 1]
[5, 6, 2, 3, 8, 0, 7, 9, 1, 4]
[0, 5, 7, 6, 9, 2, 1, 3, 4, 8]
[8, 4, 3, 1, 2, 9, 6, 7, 5, 0]
[3, 9, 5, 8, 1, 6, 0, 4, 2, 7]
[7, 2, 4, 0, 6, 1, 8, 5, 9, 3]
You are not logged in, either login or create an account to post comments
For 10 positions and events, you won't do better than round-robin position allocation, where you run the first event with starting order 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; second event with 1, 2, 3, 4, 5, 6, 7, 8, 9, 0; third with 2, 3, 4, 5, 6, 7, 8, 9, 0, 1 and so on until 9, 0, 1, 2, 3, 4, 5, 6, 7, 8. That gives everybody a chance at starting first, but it does mean that people with a number ending in N will start before people with a number ending in N+1 in nine out of ten events. Whether that's adequately counterbalanced by the fact that in the one out of ten events where that start order is reversed it's way reversed will, I'm sure, cause loads of debate.
You can probably improve the perceived fairness of round-robin by using all ten cyclic permutations of a random draw, rather than those of a sequential numbering. So your first event could go 4, 0, 3, 5, 1, 8, 7, 9, 6, 2; your second 0, 3, 5, 1, 8, 7, 9, 6, 2, 4 and so on until 2, 4, 0, 3, 5, 1, 8, 7, 9, 6. Base the next season on a different initial draw, and hopefully your participants will never catch on :-)
posted by flabdablet at 12:47 AM on October 26