# Secret Santa

## December 12, 2022

Every year I'm tasked with organizing a Secret Santa for the family. There is a very simple, manual technique for doing this by hand, with no need for a computer program and no need for a third party. The technique allows for the organizer to be a participant. However I can never remember what the technique is. Then I google it, and there are million hits for web sites that will do it, and a million techniques that require a trusted third party, or simple draw from a hat where you have to repeat if you draw your own name. If you toss a fancy word in the search like "algorithm", you will also get a bunch of technical articles on graph theory. Interesting, but not what I want.

Here, then, is the easy way to do it, for Christmases future.

First, take a sheet of paper and a pair of scissors and make up cards for each participant, where n is the number of people:

```
n←6
c←'You are ' 'You get '∘.,⍕¨1+⍳n
]disp ↑¨↓⍉c
┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│You are 1│You are 2│You are 3│You are 4│You are 5│You are 6│
│You get 1│You get 2│You get 3│You get 4│You get 5│You get 6│
└─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
```

Then, shuffle the cards, keeping them face down, so you can't see them, and place them face down in a row on the table:

```
s←c[;n?n]
]disp ↑¨↓⍉s
┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│You are 6│You are 2│You are 5│You are 3│You are 1│You are 4│
│You get 6│You get 2│You get 5│You get 3│You get 1│You get 4│
└─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
```

Next, cut each card in half, shift the bottom halfs each to the right or left one position, and then tape the newly formed cards back together:

```
]disp ↑¨↓⍉0 1⌽s
┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│You are 6│You are 2│You are 5│You are 3│You are 1│You are 4│
│You get 2│You get 5│You get 3│You get 1│You get 4│You get 6│
└─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
```

Finally, throw the cards in a hat and have the participants each pick one. On a sheet of of paper with lines numbered 1 to n, have the participants write their names next to their numbers. Now the participants can see who they get.

The only downside to this technique is that there is no possiblity of reciprocal giving; if you are giving to person #1, you know that person #1 is not giving to you. However, we may add back in one or more reciprocal pairs by simply removing two (or four, or six) cards and swapping the top and bottom parts of each pair. The remaining cards are then constructed using the above technique.