Difference between revisions of "KGS math club/solution 11 2"
(added solution) |
m |
||
Line 1: | Line 1: | ||
− | Given n, k, and | + | Given n, k, and 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 | + | Assign integers modulo n to the members of N, and cyclically order its members using them. 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. |
Revision as of 07:34, 14 February 2011
Given n, k, and 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, and cyclically order its members using them. 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.