Generate Christmas gift assignments for a family.
Requires input data in JSON format. Required keys are:
people
: a list of strings for the names. The names should be uniquespouses
: a list of lists. Each inner list has the names of a single couple.last_year
: a map of who gave to whom last year. An empty list is ok.
See the input data template.
- Do not repeat last year's assignments
- Do not assign someone to himself/herself or his/her spouse
- Two spouses should not give to two other spouses
- The santa list should be a cyclic permutation.