## Matching

The matching process for gift exchanges runs in two stages:

Potential Matching
  All the sign-ups are compared and for each person we generate a list of potential givers (people who can give them a gift), and potential recipients (people they can give a gift to). This is the slowest part of the process and can take as much as a day for a very large challenge or one where almost all the participants match each other.
Assignments
  We try to give everyone a single assignment, starting with the people who have the fewest potential givers or recipients and working up until no one else can be assigned. This process is relatively fast; it generally completes within an hour.

You may have to decide how to fix several issues that can come up during matching.

### No Potential Recipients/No Potential Givers

If someone has no potential recipients, that means no one wants what they are offering. There is no way to fix this unless the person agrees to offer something else that someone has requested. If they do, you can edit their sign-up and then regenerate their potential matches.

If someone has no potential givers, no one has offered what they want. You can try to find a pinch hitter for them if you prefer. Otherwise, just as above, ask them to request something else, edit their sign-up, and then regenerate their potential matches.

#### Regenerating Potential Matches

Because regenerating ALL potential matches for everyone in your challenge is very slow, it is better to regenerate potential matches just for each individual person who has no potential matches, which will most likely only take a few minutes. Just do them one at a time, please!

If you have several people with no potential matches, once you have regenerated potential matches for them, you may want to regenerate assignments to have the archive try to assign them along with everyone else. Note that this will very likely change the assignments for EVERYONE.

### Assignment Issues

Once you have potential matches for everyone, the remaining problems will be with getting everyone assigned.

#### No Giver

These people could not be assigned a giver. You can shuffle the main assignments to free someone up, or you can write-in a volunteer. If you click in the Giver field, you'll see a list of the people who could write for each person. Note: the form will allow you to double-assign people, but remember to make sure they can write two assignments first! (See "Duplicate Givers" below.)

#### No Recipient

These people haven't been assigned a recipient. If you click in the Recipient field, you'll see a list of the people that each one could write for. You can try shuffling the completed assignments to free up one of them, or you can double-assign a recipient. (See "Duplicate Recipients" below.) The newly matched people will disappear from this section after you update.

#### Duplicate Recipients

You will see the duplicate recipients listing appear if you assign a person as recipient to more than one person. This is not necessarily a problem, they will just get more than one gift.

You might deliberately want to keep duplicate recipients. Sometimes in a gift exchange, it may not be possible to get everyone assigned one on one. Instead of shuffling to try and match everybody, you can instead recruit a few pinch hitters for the people who don't have an assigned writer, and double-assign recipients for the people who don't have a request of their own.

As far as the people getting the assignment are concerned, there is nothing different about getting a double-assigned recipient. The recipient will just have two givers, and assuming neither one defaults, will get two gifts instead of one.

#### Duplicate Givers

You will see the duplicate givers listing appear if you assign a person as giver to more than one person. This is not a problem as long as the assigned givers are in fact willing to get more than one assignment. However, for housekeeping purposes, you might only want one of these listings to be their "official" assignment. If so, you can delete their name from the "Giver" column and move their name into the "Write-In" field (in which case they will be listed on those other assignment as a pinch hitter).

#### Shuffling Assignments

Finally, even if everyone has a recipient and a giver, you may still want to shuffle assignments around in order to give people better matches. You can do so as much as you want.

Please note that circular matches (where A is assigned to B and B is assigned to A) will happen sometimes randomly. You can try and reshuffle by hand if you want to avoid these.