MathLabs

Problem 4

The National Marriage Council wishes to invite nn couples to form 1717 discussion groups. Each group contains members of only one sex; the sizes of any two groups differ by 00 or 11; every group is nonempty; and every person belongs to exactly one group. Find all n≤1996n\le1996 for which this is possible.
Step 5 of 5: Construct groups for every listed value
rm=n−xq,rf=n−yq,0≤rm≤x,0≤rf≤yr_m=n-xq,\quad r_f=n-yq,\quad 0\le r_m\le x,\quad0\le r_f\le y
Detailed analysis

For each listed nn, the inequalities provide an xx and yy. Make rm=n−xqr_m=n-xq male groups of size q+1q+1 and x−rmx-r_m of size qq; make rf=n−yqr_f=n-yq female groups of size q+1q+1 and y−rfy-r_f of size qq. The bounds ensure the remainders lie in the displayed ranges, so all conditions hold. This proves sufficiency.