http://www.perlmonks.org?node_id=899984


in reply to Algorithm problem: Order matches by difference between players

Just realized, the problem is trivial in all cases if you allow N rounds for N players. Just skip the round where "your number" comes up.
For 6 Players in 6 rounds..

1: 6-5-4-3-2-B
2: 5-4-3-B-1-6
3: 4-B-2-1-6-5
4: 3-2-1-6-5-B
5: 2-1-6-B-4-3
6: 1-B-5-4-3-2

For 5 rounds, 5 players..

1: 5-4-3-2-B
2: 4-3-B-1-5
3: B-2-1-5-4
4: 2-1-5-B-3
5: 1-B-4-3-2
Don't know if this is exactly what the OP is looking for, but it reduces the tournament calculation to a count and lookup problem.

David.