KGS math club/solution 11 2

Revision as of 07:31, 14 February 2011 by Maproomad (talk | contribs) (added solution)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Given n, k, and a a k-member subset K of the n-member set N, we form the (n-k)-member subset it is paired with as follows.

Assign integers modulo n to the members of N. Sort its members using these. Remove from N a member of K with a non-member of K that immediately follows it; and repeat until there are no members of K left. Append what we have left to K.