>>7
Do your own computer science homework. Anyways without any differentiation between the swimmers, all times are rated equally, so it doesn't matter in which order the swimmers are chosen, and so choosing swimmer number 1 arbitrarily, and leg 1 arbitrarily:
N1 = {1, 2, 3, 4}
N2 = {5, 6, 7, 8}
Or in general
Set N (defining a set w/ 4 elements)
Nn = {An, An-1, An-2, An-3}
Where A is a set of all swimmers, with n defining the nth element of the set.
maybe.