We had “assigned” secret santas that our boss (not playing secret Santa) pulled for everyone, to avoid this. Beforehand, we were given sheets to fill out about what we like/bad gift ideas. Worked pretty well!
The worst one I've have the misfortune of partaking in in school we didn't even know who we're buying presents for. Needless to say the result was a lot of crying girls and a lot of boys who got a lot of awkwardly girlish presents. I think we just ended up solving it with some simple barter after the crying ceased.
@@KucheKlizma Yeah, we had that, too. Our teacher then sort of just dumped all the presents on the table and everyone picked one by one. It wasn't fair at all, especially because somebody bought gift cards, others bought a pair of crisps from the cafeteria.
Or, what happened to me is everyone else was told who their secret santa was after getting their presents from them except for me, still don't know who had me
If you pull your own name, keep it and dont tell anyone. That way you buy yourself the best present, the thing you always wanted and you dont even have to waste your money on some random person. Best case scenario.
And if you have to show other people what you got. Just buy the costliest gift like a car. So everybody can be jealous that you are so popular that people in office will even buy car to please you
If it's a Secret Santa in the office or something, with people you don't know well and maybe even don't particularly like, yes it defeats the purpose of getting people you don't like gifts that they don't want, but that purpose is essentially empty consumerism. Pulling yourself and keeping yourself means you can spend that money on something that will actually be used. That said, gift exchanges that are anonymous are usually done all at once. So you have to be sure to keep anyone from seeing the fact that the gift you're adding to the pile is the same one you're taking out of the pile.
For when my friend group did this a week or two ago, i spent 3 hours making an app so that it was completely fair I was very close to making it give everyone my name
You'd be doing everyone a favor by soaking up what would otherwise have been a failure, that would've wasted everyone's time. So really, it's a very altruistic thing to do... Especially if you're rubbish at giving presents.
+Simon N. Simonsen "So really, it's a very altruistic thing to do." - I don't think so. Consider all your colleagues looking at your very nice present (which you bought yourself for yourself) thinking "why did I get a crappy present?!?" and getting envious! :-p
A nice thing about Dr. Fry's method is that it makes sure that the entire group has a single complete circle of gift giving. With a sufficiently large group, I tend to find that Secret Santa results in isolated groups of gift givers.
Exactly, and that weakens the claim that the system is entirely secret--once you learn the identity of your recipient anyway. You have also learned that you are not their recipient.
Secret Santa appears to work differently in Britain. In the US, you don’t know who is going to buy you a present, but when you give/get the present it’s revealed
I've done it both ways in the US. I even had a secret santa where it went over a few weeks, and each week was a gift, and we got revealed on the last gift
For me it's always been, pick names, don't tell anyone who has who, give presents, awkwardly laugh at the reveal of the person who got you after you open. I'm in the UK
And if the app maker was smart, they'd use this algorithm to ensure a constant run time, especially for large groups. With the number of retries possible, a group of 20 people could take an hour to run (if it was unlucky enough to need redraws multiple times)
@@xander.deanna yeah...by using the algorithm described in this video. If it used the first algorithm described in this video, it could get to the last person's turn to draw and have no options because only their name is left, thus forcing a redraw.
I actually ran a Secret Santa in an office once, and I came up with a solution involving an elaborate Excel spreadsheet and the random() formula function, plus a bit of careful printing involving keeping two as-yet-unseen sheets of paper stapled together while cutting and folding tickets. The tickets in this case actually had names on them, and were folded so that the gift recipient was not visible. It was a lot of work, but fun to design. Most people in the office thought I was bonkers, but I did manage to run a fair event by going to all that effort. Of course, there's the other problem - how to get your wrapped gift to the designated distribution point without anyone knowing that one was bought by you (e.g. by looking at the wrapping). That's actually a very hard problem to solve in an open plan office :-|
So in the excel sheet when playing around with random() and such, how did you ensure a derangement? That is, how did you ensure that no one was assigned to themselves?
I was just writing a macro for this earlier today... Not an elegant solution, but it basically has two columns. Givers in one, receivers in the other. At each step the macro goes down the second column and picks a random person from the first. And then I've got checks to make sure the giver doesn't match the receiver, and an extra loop to make sure nobody gets picked as receiver more than once. The trick though, is having a friend in another department, who can run the macro, mail each giver the name of their partner anonymously, and keep the resulting list for potential tracking purposes. Just in case someone fails to deliver a gift or delivers something seriously inappropriate.
+Shadowstray Off the top of my head, why not sort the people randomly then have the person they buy for be the person below them (or the person at the top for the bottom-most name, of course you can still do this part in a 2nd column with a simple formula). While it's not as random as it could be as it won't make small subsets of the total list buying presents for each other, my intuition is that that is not necessarily desireable; and besides this would be quick to implement and probably easier to confirm that it is working relatively bug free ;) EDIT: damn it; it's the algorithm suggested in the video... I just got to that part. Oddly it doesn't mention the lack of randomness of the method, that's a bit disappointing for a Numberphile video.
@@mathygamba Let's say that A is giving a gift to B. C cannot give a gift to B because A is already doing that. C obviously cannot give a gift to him/herself so C can only give a gift to A. B can then only give a gift to C.
9:37 While picking the pair of cards you can still choose who is buying for you or who you're buying for by choosing the right or left of what that particular person chose
@human721 They are mixing the number cards but when they cut the card, you know the top number is moved to the right so you will know that the right pair of card will have your number as the top card. Similarly for the bottom card
@@jaingandharv01 Oh I get it. I saw another comment that made a suggestion to cut the cards, move them, staple them together and mix them again, so you won't know who is getting the gifts for you. This still has the issue that two people can't gift to each other.
@@JonathanSharman Actually Ben is correct on this one (i was looking through the comments to see if anyone had beaten me to that remark) The process as explained: - shuffle the numbers (you are/ you are buying for are the same on each card) - cut the cards in half and shift 'you are buying for' 1 position to the left or right (the fact that this guarantees on-one is buying for themselves, is actually the stated goal of doing it this way). - pick up a bundle. (end up exactly in the situation Ben described, if you see who picks up which bundle) You get a gift from 1 neighbour and give to the other (same direction for all involved), the only thing that actually got shuffled is which number is assigned to each person (the extra variable introduced to make the rest work) With an extra step, you can get this to work though. If after shuffling and shifting 1, you staple the new sets back together (keeping the 'no-one picks themselves' fix intact), then shuffle again.
I remember doing a gift exchange where you bought a present, then everyone was handed a random present. Then, a story was read, and with a certain keyword, the gifts would move left or right with one keyword for each direction. Once the story was over, everyone opened the present they had. It’s not really a secret santa, but how random is it? Would it not just depend entirely on the amount of keywords?
It's not really random at all, it's actually predetermined, assuming the story was already written and not being made up on the spot by the exchangers.
Actually it is random since the distribution of the gifts was random. The story just doesn't affect the randomness, it only realigns the order of the gifts and the order of the receivers, but the randomness is the same.
I think you missed a step. If things go as you described, then you know for sure that the person who drew a pair of half cards before you is buying for you, and the person after if the one you're buying for (Or the other way around depending on which way you shifted the cards). To remedy this, you need to basically tape the cards back together after shifting them, and shuffle them again, so that the order they're picked in doesn't matter anymore, because no one knows what order the cards are in.
cbernier3 But even then you can know by tracking the cards that people pick and then picking the cards before or after them. There's no way to prevent that unless you shuffle them again.
Gamesaucer It's true, if the point of all this process is to make completely anonymous any pick, then this is definitely a flaw. It could work in some way, but in my opinion it's not rigorous.
Seth Bembeneck So this is how the proposed solution works. Say you shuffle the cards, and they end up in the order "1 6 3 7 4 5 2". Now they're cut into halves, and we end up with "1:1, 6:6, 3:3, 7:7, 4:4, 5:5, 2:2". How we shift them, and we end up with "1:6, 6:3, 3:7, 7:4, 4:5, 5:2, 2:1". You can easily see here that for whatever pair you pick, that you will be involved with the people picking the cards left and right of yours, so it's not anonymous.
5:30 Another problem here is that B can pretty easily suss out who is their secret santa, since they saw their own name and put it back, pulled out A, and then the only name left is B for C.
@@MorB173 Yes, that's a problem with a 3 person group. But the general idea remains the same no matter how large the group is. If the second last person pulls their own name and puts it back in to pick someone else, they will immediately always know who has drawn their name: the last person. If anyone ever pulls their own name, that reveals information to the whole group by narrowing down the possible gift givers for that person. In such a case it is definitely someone who picks after they do.
Love the cheerful energy of Prof Hannah to the extent that I only hear laugh , secret santa , laugh, Hannah's nice voice and no maths . That's fine with me !
8 ปีที่แล้ว +95
Isn't anonymity violated in any case with three people anyways? Everyone knows that the person that bought their present is the one they didn't buy the present for.
If I am A and I picked B name, A still could have been picked by B or C. My pick has no bearing on that, right?
8 ปีที่แล้ว +12
Jason C You are A, you picked B. B could pick A or C, but if they pick A, C will have to pick C, which will force redoing everything. Therefore, any successful run of picks will result in A picks B, B picks C, C picks A (for some values of A, B, C).
The companies I've been with that did Secret Santa, including this year, had you fill out a list of tenish categories of likes and dislikes (brands, things in the price range you'd like, themes and interests for gifts). It was also secret until the gift exchange where you reveal who you got when you give them their gift. I'm still hype for this video but I'm 45 seconds in and none of the top comments seem to mention this even though I thought it was common practice. An eternally-secret gift for a rando in your office seems like a recipe for failure and I'm not sure math will help
@@NathanTAK I always thought the secret was who was the gift giver, not the present itself lol 😆 in my workplace we did something similar too. We just wrote down 2-3 options we wanted and kept it at about 50 bucks. If someone put 2 things that, when added, gave to around 50 bucks people would buy the two things. It was awesome tbh
yes every time I have done it, you find out at the end who gave you a present. I used to organize one for a group of online friends ( who lives all over the world) and you had to know who gave you a gift because of the return address on the package.
To get rid off the problem of everyone getting a crappy gift, just make everyone submit their Amazon wish list for their Santa to be able to look at. That way it removes the stress from the buyer of buying something bad, and the receiver gets something they wanted :)
Just keep a short public list even if your secret santa group doesn't want to do that. Then if your person wants to sneak a peek (or any relatives that barely know you), they have the chance to.
@@erinpac Or write a list of things you like and don't like. I find Secret Santas to be funnier when there is a part of guessing what someone might like and being surprised by what your santa have chosen for you, rather than just it being a question of paying for an item in a list.
Take all the stress away, everyone just buys themselves something and say it's from Secret Santa. Guaranteed success, everyone gets something they want.
My friends and I did this a few weeks ago... there were five of us. It was a nightmare, it took us probably 20 times, not exaggerating, for someone to not get themselves. I repeatedly insisted that we should just have a computer decide for us, but they insisted we needed to do it the “traditional” way. It borderline made me mad lol
Oh wow :O I did this with my band, 5 people as well. First try, and no one got themselves. When the day came to give the gifts, it ended up being a circle. It wasn't my idea but I told em its supposed to be a secret, but people forgot to put names on their gifts, so we just handed it to each other 😂
this isn't the point of the video, but I LOVE Secret Santa at my work! :) We fill in information sheets (favorite candies, hobbies, favorite restaurant, snacks, shirt sizes, colors, etc) -- and everyone winds up with things they like. Plus we do Secret Santa for a whole week, wherein we have a gift limit amount and most of us give something small every day of the week. It's really fun and it works out super well! Plus it's fun to reveal yourself at the end of it (which is how we play).
The proposed procedure gives a uniformly random cyclic permutation, but not a uniformly random derangement. This is unelegant, since then everyone knows one person, that they are definitely not receiving a present from (namely the person they buy a present for). Also: The example with three people is misleading, since everyone involved will learn which of the two derangements is chosen, just by considering who they have to buy a present for.
Well the first time I heard the cards solution to this sort of problem was with matt parker talking about their hitman game which needed a cyclic permutation to work
Correct, this method will never select some of the possible derangements. You would need to be able to split participants up into a random number of cycles of varying sizes in order to do that, but I'm not sure of a physical way of accomplishing that. It's simple with code.
On your improved secret Santa you are missing a step to make it actually work. You need to make it anonymous the order that the cards are picked up in. Otherwise, by just paying attention to who came before or after them, depending on the shift, they know who is giving to them. You need to then tape the new cards together and shuffle them again before drawing.
That's why the cards are shuffled before being cut in two. If you're particularly paranoid, you could tape the two halves together (facing each other) and get people to pull it out of a hat.
@@nipuniperera9918 - Shuffling before the cut does nothing. Once you cut the card, the top says "You are 5" and the bottom says "You buy for 5". Now you shift the top row over 1 to the right to get the derangement like in the video. That means whoever picks left of you buys for you. And whoever picks right of you is who you buy for. And that means everyone knows who everyone is buying for, as long as they pay attention. You need to shuffle AFTER the cut and derangement. And the only way to do that (without making a mess) is by fixing the deranged pieces together again.
Green Vein "Half the office" meaning all the people in one office split in two at random, obiously, why would they be two distinct groups based on this one-time split?
Because one of the rules laid out in the beginning is that "everybody has an equal chance of being picked up by anybody else". You have no chance to be picked by half of the office.
My only criticism of the last method is that it’s impossible to have subgroups. My secret Santa can’t have me. For some people that’s desirable but I like the idea of having two people by random chance get each other, or even a three person group. Further, you obtain a little more information in this method, because you know your recipient can’t give you a gift, and if you obtain any more information due to carelessness or one/two people telling you (for instance to ask what gift they should get person C), you can deduce even more information about the exchanges
Worst secret santa present I ever saw was a raw (!) pork chop wrapped in a pro-wrestling magazine. P.S. It was an anonymous secret santa where people bought presents for a set amount of money and left them at a big table.
When I organized a Secret Santa for a group of people, we engineered it so that we (the execs) knew who nearly everyone else was getting something for. Two of us made the lists, so we also wouldn't be able to cheat and figure out who was getting us presents. It worked out pretty well. I'd say the majority of the gifts were earnest and well-thought-out. Of course, this was not an office situation, but a board of directors made up of people who were often friends, classmates, and who had been planning/hosting events together for at least one semester, if not much more.
That's true. I think you would need more people in your secret santa pool to make deductions impossible. I wonder what the minimum number of people is then?
+Rpodnee There is no minimum number that will guarantee that deductions are impossible under the "draw from a hat" system. They touched on this briefly in the video. Regardless of how many people you started with, if the 2nd to last person draws their own name they will know for sure that the last person is going to buy for them, since they will put back their name and draw the other one.
+Nathan L if they drew their own name they would restart the entire drawing process for everyone. I'm sure there is a minimum number that would make deductions impossible.
Last year, I spent an entire day figuring this one out but I wasn't smart enough to actually solve it. Ended up not going thru the secret Santa. When I saw this video I knew I'll finally get the answer. I'm glad the Internet exists. ☺️
but if someone picks C first, then the second person picks their own name (B), sure they will pick a new paper (A) and will know that the first person took the C paper. That person now knows every single person's paper.
Yup. In fact everybody will definitely know who picked what in a 3 person system. But that is through inference and not directly. Just something we overlook to simplify the problem with the given 2 rules at the start of the video.
There's only 3 people, so by inference everyone will know by the end. Person 2 always knows what card must be left based on what card they have. Persons 1 and 3 figure it out based on what persons 2 and 3 do
The optimal solution should be: shuffle, cut, shift, staple, reshuffle. Otherwise you could choose to give or get a gift from someone just by picking the cards adjacent to the ones you saw them take. This still has the drawback that you know two people won't get each other. Shifting by a random interval would also work.
@@klicerfn248 that is not true. Suppose there are 4 players, and the first one gives a present to themself, the second one gives to the 3rd one, the 3rd one gives to the 4th one, and the 4th one gives to the 2nd one.
extropian314 It's called an "air danger alarm" and it usually signals bombing. In some countries these alarms are tested every 5-10years, heard it once without knowing it was a test, almost crapped my pants
Hmm... The times I've participated in a Secret Santa exchange, part of the game was the reveal at the final party. People had fun trying to guess who their Secret Santa was, and then they got to see whether they were correct at the end. It didn't remain anonymous beyond the final party.
I love this video, but there's another issue with the third branch that I would argue would result in a fail. If B picks B out of the hat and shuffles it back in, they now know that A picked C, and that C will have to pick B since B will keep drawing until they don't pick their own name. This scenario (where B knows everyone's secret Santa) would happen 25% of the time in this scenario. On top of that, if C sees that B put their name back in, they can also deduce all of the same information because they'd then know that A picked C
The thing that Hannah didn't cover (which I guess isn't relevant) is that this solution also prevents there from being multiple separate loops (which is the main thing James was going for in the assassins game). This is actually a weakness for a Secret Santa solution, because it weakens the anonymity by 1. The one person you know for SURE cannot be buying your present is the person you are buying the present for. For complete anonymity, that should also be a possibility.
chinareds54 Right. It turns out that for largeish n (n≥5 is enough for this to be a decent approximation), the one-loop-derrangements (n-1)! out of the possible approximately (n!/e) derrangements, which is to say e/n out of the total possibilities. Interestingly, the fact that big-loop arrangements account for the plurality of all arrangements is exploited in the solution to the 100 prisoners problem: en.wikipedia.org/wiki/100_prisoners_problem
not only that, but the first picker would know who everyone is buying for. If A picks B, then he knows B would have to pick C, otherwise C would pick C and there has to be a redo. If A picks C then B has to pick A and C has to pick B otherwise there is a redo.
6:30 that's wrong If B recycles, everyone knows C picked B as it is the only name left. That makes the right branch fail 50% of the time, too. So everyone is equally likely to pick each name at the end.
Not everyone. In this case, A and B would know. In fact, I believe that with only three people, A will always know the exact arrangement. The point is not to do Secret Santa with three people. You probably know each other well enough to get two presents for everyone.
KarstenOkk No, everyone will. C drew B himself. B recycled his own card, so he knows C drew it and A knows B put back card B too, because that's the only one he would've put back. But actually you're right. There are only two ways of permuting 3 elements without fixpoint - shifting everything to the left and shifting everything to the right. So from your own card you could always tell... So you should always play with at least 4 persons.
No; you always know. The options are A=B, B=C, C=A and A=C, B=A, C=B. So, you know one of those 3 regardless of whether you are A, B or C, even if nobody recycles. You know who you are buying for. Therefore, you know which of those two sets it is, and you know all the assignments.
One issue: You can only get mono-cyclic derangements. So for example: 123456789 Shuffle. 318742965 Cut and step. 531874296 So the graph is circular. This means several things. One of which is that there is an anonymity violation. If I'm number 1, I know that I am giving to number 3. Consequently, I know that number 3 is NOT giving to me! This is particularly noticeable for groups of 4: 1234 3241 1324 So again, I draw number 1. I know that I am giving to number 4. I also know that either 2 or 3 is giving to me. Further still, If I ask number 4 who they're giving to, it doesn't JUST give me the seemingly-irrelevant information of who they're giving to (number 2), but also the entire cycle. Because if 4 said they were giving to 2, then I'd know that 2 was giving to 3, not me, and therefore that 3 was giving to me, not themselves. Further still, if 4 doesn't know I'm giving to them, then I'm the sole proprietor of the information. 4 just gave me data they didn't have themselves. And of course, it isn't just 4 who can give me info they don't have. If 2 tells me they're giving to 3, then I know 3 is giving to me and 4 is giving to 2. If 3 tells me they're giving to me, then I know that 4 is giving to 2 and 2 is giving to 3. That means: In a cyclic group of 4, any two people sharing information is enough for the most well-informed person to know EVERYTHING, even about people not being discussed.
You are only getting mono-cyclic derangements because you are placing all the tiles in a single line. Take a 12 card system for example. You could line them in 3 rows of 4. This will allow either horizontal derangement, vertical derangement or both. For added complexity you could also flip a coin. Heads steps once while tails steps twice. An appropriately sided dice could be used for larger groups. Anonymity violation only occurs if people are talking to other's about who is buying for who. In your 4 person example yes 1 piece of information from someone else can unravel the whole thing. However the more people that are added the more pieces of information you actually need. This in turn diminishes the issue. The issue is irrelevant as long as everyone plays by the rules and doesn't discuss with anyone who they are buying for which I understand can be somewhat unrealistic to expect.
Mathematician: Let's come up with a complex arrangement such that we get an ideal derangement with minimal risk of conflicts. Me as computer scientist: while(not valid): createNewDraw() - unless you're doing insanely large draws it's only taking a fraction of a second each time.
If createNewDraw is a random permutation the expected number of iterations is ≈ e² - e ≈ 4.7 for large numbers of people. It's not that bad even for large draws :)
@therainman777 He said "for large numbers of people" and "approximately", so while n is in the exact formula, the function converges (becomes closer to the approximation) as n increases, and it does so quickly enough that the exact value of n is irrelevant (it only matters that it's "large").
@TomDufall The flaw of this algorithm, repeating the draw on failure, is described at 6:23: it doesn't result in a uniform distribution; some outcomes are much more likely than others.
I wrote something like that for picking coordinates that obey a set of constraints. It ended up taking longer on average to create each coordinate than to run the main code on that coordinate. Don't optimise prematurely, but don't design code to be slow in the first place - make algorithms that give the correct answer rather than ones that guess, check and retry.
doesnt this system as presented have an issue? if you shuffle the cards before the slicing and then move the "you are number" cards over by one you know whoever picks the card pair before yours on the table is your secret santa. (assuming you are all standing around the table selecting). You wont know what number they are but that information is not relevant. To fix you should retape the half cards back together and the shuffle again. That way you maintain the derangement while hiding the extra information gained by knowing relative locations of cards.
Well, wouldn't it be fine if people wen to grab a card in isolation, with no one being able to see what card they grabbed (or even whether they went to grab anything in the first place).
I did this process this year. And I created a survey where you put a wishlist for your number rather than writing your name on the list. It has worked out rather nicely.
I think what was not presented well was that after shifting the top halves over, people are picking the new pairs at random. Its not "everyone picks a card, cuts it in half, and passes the top to the right." Its "shuffle, cut, shift, tape back together, pick at random." Or if you want to make it obvious, after shifting the top half to the right (or left) some amount, everyone tapes the card in front of them together and tosses it into the hat. *Then* everyone draws a card out of the hat.
If I'm A and I pick C from the hat I know that person B must have A, otherwise C would have himself (which he would point out), not making it anonymous.
Mc Karl: To some extent, it works in every scenario in which you know who you're giving the gift (though you just have partial information instead of complete information). You would need to use something like the card scheme to solve this.
Yeah you always have that problem with three persons that everyone knows who buys for who. Because if we assume there are no cheaters who stay with their own name, the one who buys you presents is the one you didn't draw!
You could just make a random derangement. Then for each person, use a random number generator to assign them to each position. Then, assuming that the random number generator has a perfectly uniform distribution, everyone would have exactly the same chance for any possibility.
No matter how many total people, the 2nd to last person can never pick themselves because everyone will know who the last person has (even if nobody is looking the 2nd to last person will know).
I can break Hannah Fry's system! Make a list of the order that people go up to collect their cards. Look at the completed list of who is what number. Rearrange the numbers in that list so they match the giftgiver. If you know who you're buying for and your number, you can work out the shift that's taken place and can assign givers to recievers.
I've been in 3 secret santas, one was over in Brazil with extended family. It was quite complicated, I think there was a pile of gifts on a table and people would take turns. You had two options: to either take a mystery gift from the table or 'steal' a gift that someone already had. In the case that someone had their gift taken, I think they'd either take from someone else or take a mystery gift. I know that a certain relative was allergic to chocolate but kept getting the chocolate-based gifta from the mystery presents, I forgot whether they had to keep it or choose a different present instead. But it was pretty fun!
The funniest problem to me about the ABC example is there are also outcomes where it's simple to figure out who's buying what regardless of probability. If you're just three people playing and you're player C and end up with B's name you know for a fact that player A must be buying your gift since they can't have ended up with their own name.
Wait but if say the order ends up being 1 3 6 ...(etc.) then shift the top one over becoming say 7 1 3 ... (etc) 1 3 6 ... 1 3 6 And everyone then grabs the cards they would just know that the person before them is buying for them right? So you'd have to stack the 2 cards on top, and then shuffle those around again first before anyone picks up the new set of cards to actually make it work.
Seeing the A is twice is likely to pic one vs the other makes me wonder if/how this is related to the Monty Hall problem. Oh! And a bonus, seeing Trurl and Klapaucius on your list of sample names makes me all kinds of happy.
Great video -- this was also covered by James Grime with Matt Parker on his channel singingbanana, except it was to organise a game of Assassin (which is much more fun than secret santa) :P
The 3 person game is worse than stated: If A chooses A, fail. If A chooses B, then B must choose C and C choose A, else fail. => A knows full outcome. If A chooses C, then B must choose A, C choose B, else fail. Those are the only two valid selections, hence all players know who their Santa is.
The game fails Everytime on the premise that it takes only one person to know who their secret santa for the game to fail. But the premise that all players will know who their secret Santa all the time...let's test that. A picks B. B knows he can only get A or C validly. Assume on the first try that B doesn't get himself. If B gets A, then the game will ultimately be a wash when C picks C. At this point, A knows the B can only get C. What does C know? Assuming the perfect condition where no one picks themselves, C know that A got B or C. C knows that B got A or C. My question is, in this perfect yet possible situation, is there a case where C will not know if he's getting a gift from A or B? My guess is that this is possible, but someone prove me wrong because I can't think no more.
@@jps76 Actually, since there is only two valid permutations with 3 players, then regardless of your turn, you will know who your SS is. Once a game with no self-pulling has been played, (lets call them L M and N for the random order of pulling,) M will have either L or N card in his hand, and if he has L, then L has to have N (else N picked himself) and N have M, so M knows his SS. 3-man Secret Santa is impossible.
@@jps76 in the three person game, there are only two valid outcomes. That's not a premise, it's a conclusion. Now, your question is whether a player can be unaware of who their secret santa is. The answer is yes, they can if they don't understand the game. That's certainly a possibility. Here are the two valid outcomes: 1. A -> B -> C -> A 2. A -> C -> B -> A Another way of understanding this is: you can't give to yourself. Therefore you can't give to your own secret santa. (For otherwise, the third person would have to give to them self). It follows that your secret santa is whoever you aren't giving to.
I know I'm like 4 years late, but whatever. This year me and my friends did it and it was SO stressful! .Firstly, when we first picked out the names, it went so well and no one got themselves. But then two people in the group told each other who they had and we had to re-pick. . And it went so badly! Everyone kept getting themselves and it took ages for everyone to get someone they could buy for! . It was ok after that, but a few days before we exchanged gifts, everyone suddenly started telling each other who they had or giving really obvious clues. Only me and one other person had no idea who we had, which was annoying! Tip for secret Santa's- Keep your mouth SHUT about who you have because it isn't very fun if it's just a Santa!
Considering that it's TH-cam, before I saw the channel name I thought this was a rant about the social ramifications of anonymously exchanging holiday gifts.
rusins I think the idea is that the cards are reattached after the derangement and once again randomized. However there is a need to to have a derangement more complex than a shift/offset, because such a derangement would guarantee that no two participants could get each other.
pirate secret santa is clearly the best choice. my last workplace did it and it was actually a riot. (and is a great way to create natural team bonding)
That is why my group of friends and I do Secret Santa with an app I made. It is impossible to get your own name, and you can add a wishlist of what you would like. We also suggest a budget and an average is drawn from the options. But part of the fun of our Secret Santa is the surprise during the gift exchange of who is your secret Santa.
One problem with the optimal solution: It is impossible for the person you picked to pick you, which makes it a bit less secret :D (if i understand your explanation properly).
Erik Takke you could roll some dice to decide how many cards to shift by. The only problem, though, is that if one person finds out that they are buying for the same person who's buying for them, then everyone knows that they are buying for the same person who's buying for them. it's still anonymous conditioned on everyone following the rules, though.
For even numbers, if the shift is half the number of people, then you instantly know that you picked the person buying for you. Instead of shifting the cards, you could come up with a derangement of them and then shifting the top halves to match it. This way, you can pick the person who picked you without that being true of everyone. Although you would have to have a third party do the derangement or else you could easily see the number of buying pairs.
*The standard "hat" system has more flaws than they mention.* If you pick your own name and replace it, you know someone after you will end up picking it. If everyone else sees you replace a card, they know this too. This reveals information, (potentially) breaching anonymity. This means that the first person is guaranteed total anonymity, but for each redraw down the line, more information is revealed about each. The second to last person will end up knowing exactly who buys for them if they redraw. *For example:* in a 'game' with 10 people, if the 7th person has to redraw, everyone knows that it is one of the next 3 people that will be buying for the 7th person. Though this doesn't strictly violate anonymity, it's not a great system as it could reveal a lot of information. Specifically, there's a 1 in 3 chance people 8, 9, and 10 have person 7. It's also known that people 1-6 do not have person 7. If this happens multiple times, that's a large loss of anonymity, especially for the last ones to draw.
Not necessarily. If you replace your card, the cards can be reshuffled. Thus the next person has no idea which card's yours and anonymity is preserved.
Also the 3 person example straight up doesnt work. If player A pulls C, then he knows exactly who the other people have because B can't pull himself. So by pulling C, he can deduce that B will be buying him a present
The method described at the end of the video will not give anonymity: While the resulting permutation is guaranteed to be a derangement, it is also guaranteed to consist of a single cycle. So, for example, you can be sure that whoever you're giving to is not giving to you (since your card was to their right, so theirs cannot have been to your right), violating anonymity (though it doesn't violate randomness in the same way as the classic method).
We had “assigned” secret santas that our boss (not playing secret Santa) pulled for everyone, to avoid this. Beforehand, we were given sheets to fill out about what we like/bad gift ideas. Worked pretty well!
We actually did a very similar thing to this, and it also turned out very well!
That's what I started thinking is have an impartial person
we did the little sheets too and it was a game changer to make sure you get something somewhat like what you want
??.
We did this is elementary school.
The real problem with secret santa is that nobody actually keeps it a secret
The worst one I've have the misfortune of partaking in in school we didn't even know who we're buying presents for. Needless to say the result was a lot of crying girls and a lot of boys who got a lot of awkwardly girlish presents.
I think we just ended up solving it with some simple barter after the crying ceased.
I always keep it secret, until we all get our gifts bc we all do a group giving
I lie about who i have
@@KucheKlizma Yeah, we had that, too. Our teacher then sort of just dumped all the presents on the table and everyone picked one by one. It wasn't fair at all, especially because somebody bought gift cards, others bought a pair of crisps from the cafeteria.
Or, what happened to me is everyone else was told who their secret santa was after getting their presents from them except for me, still don't know who had me
I used to work in an office with just one colleague. Every Christmas, the two of us would have a Secret Santa! It worked really well.
haha that's fun
lolll
If you pull your own name, keep it and dont tell anyone. That way you buy yourself the best present, the thing you always wanted and you dont even have to waste your money on some random person. Best case scenario.
And if you have to show other people what you got. Just buy the costliest gift like a car. So everybody can be jealous that you are so popular that people in office will even buy car to please you
Damn I am turning into Sheldon :(
No, you are not. I think your idea is exactly right! Why, anyway, would that person be unhappy?
that would defeat the purpose
If it's a Secret Santa in the office or something, with people you don't know well and maybe even don't particularly like, yes it defeats the purpose of getting people you don't like gifts that they don't want, but that purpose is essentially empty consumerism. Pulling yourself and keeping yourself means you can spend that money on something that will actually be used.
That said, gift exchanges that are anonymous are usually done all at once. So you have to be sure to keep anyone from seeing the fact that the gift you're adding to the pile is the same one you're taking out of the pile.
For when my friend group did this a week or two ago, i spent 3 hours making an app so that it was completely fair
I was very close to making it give everyone my name
Can you you put it on the App Store?
@@marykint7022 its only very rough unfriendly processing code
Oh ok never mind :)
Sue Sylvester is that you?
There’s a website for this my friend group has used for a couple years: Sneaky Santa
I love how on this channel, they had to specify *substandard* calculator to make the gift unappealing.
Matt Parker has a BAMBOO caclculator made from BAMBOO that he'd like to introduce you to. Oh, and did i mention its BAMBOO?
A superstandard calculator would be very appealing
Certainly not an FX99!
The trick is to don't say anything if you pick your own name. That way you get to buy something for yourself. .____.
You'd be doing everyone a favor by soaking up what would otherwise have been a failure, that would've wasted everyone's time. So really, it's a very altruistic thing to do... Especially if you're rubbish at giving presents.
+Simon N. Simonsen "So really, it's a very altruistic thing to do." - I don't think so. Consider all your colleagues looking at your very nice present (which you bought yourself for yourself) thinking "why did I get a crappy present?!?" and getting envious! :-p
Everyone buys their own present, thinking they got one over on the system, not realizing that not a single gift was exchanged by anybody.
But the other person who picked their own name will speak up
Ted Jones exactly why i looked at the replies
Unpacks present... *another klein bottle*
just like i wanted
May be ppl think u stink
*thanks Cliff*
Klien bottle guy has an easy job of picking
I really wanna like your comment. But I can't.
A nice thing about Dr. Fry's method is that it makes sure that the entire group has a single complete circle of gift giving. With a sufficiently large group, I tend to find that Secret Santa results in isolated groups of gift givers.
Exactly, and that weakens the claim that the system is entirely secret--once you learn the identity of your recipient anyway. You have also learned that you are not their recipient.
thank you, this really should've been mentioned in the video.
Let's be honest, a Hannah Fry video is the best Christmas present
exactly what I was thinking
Sharkon36+ UnM, no. A video? A date would be a lot better...
definitely
Secret Santa appears to work differently in Britain. In the US, you don’t know who is going to buy you a present, but when you give/get the present it’s revealed
You and I must live in a different US
I've done it both ways in the US. I even had a secret santa where it went over a few weeks, and each week was a gift, and we got revealed on the last gift
I did that and I'm in the uk
For me it's always been, pick names, don't tell anyone who has who, give presents, awkwardly laugh at the reveal of the person who got you after you open. I'm in the UK
That is white elephant
When I did a secret santa with my friends we used an app that chose for us and it emailed us a list of what the person likes within the budget
Dezeya what app?
Wow
And if the app maker was smart, they'd use this algorithm to ensure a constant run time, especially for large groups. With the number of retries possible, a group of 20 people could take an hour to run (if it was unlucky enough to need redraws multiple times)
Michael Arnold if the app was smart it wouldn’t need redraws because it wouldn’t let you pick yourself.
@@xander.deanna yeah...by using the algorithm described in this video. If it used the first algorithm described in this video, it could get to the last person's turn to draw and have no options because only their name is left, thus forcing a redraw.
I actually ran a Secret Santa in an office once, and I came up with a solution involving an elaborate Excel spreadsheet and the random() formula function, plus a bit of careful printing involving keeping two as-yet-unseen sheets of paper stapled together while cutting and folding tickets. The tickets in this case actually had names on them, and were folded so that the gift recipient was not visible. It was a lot of work, but fun to design. Most people in the office thought I was bonkers, but I did manage to run a fair event by going to all that effort. Of course, there's the other problem - how to get your wrapped gift to the designated distribution point without anyone knowing that one was bought by you (e.g. by looking at the wrapping). That's actually a very hard problem to solve in an open plan office :-|
+macronencer that's cool
Thanks! I like Hannah's solution though: it's certainly simpler than mine :)
So in the excel sheet when playing around with random() and such, how did you ensure a derangement? That is, how did you ensure that no one was assigned to themselves?
I was just writing a macro for this earlier today... Not an elegant solution, but it basically has two columns. Givers in one, receivers in the other. At each step the macro goes down the second column and picks a random person from the first. And then I've got checks to make sure the giver doesn't match the receiver, and an extra loop to make sure nobody gets picked as receiver more than once.
The trick though, is having a friend in another department, who can run the macro, mail each giver the name of their partner anonymously, and keep the resulting list for potential tracking purposes. Just in case someone fails to deliver a gift or delivers something seriously inappropriate.
+Shadowstray Off the top of my head, why not sort the people randomly then have the person they buy for be the person below them (or the person at the top for the bottom-most name, of course you can still do this part in a 2nd column with a simple formula). While it's not as random as it could be as it won't make small subsets of the total list buying presents for each other, my intuition is that that is not necessarily desireable; and besides this would be quick to implement and probably easier to confirm that it is working relatively bug free ;)
EDIT: damn it; it's the algorithm suggested in the video... I just got to that part. Oddly it doesn't mention the lack of randomness of the method, that's a bit disappointing for a Numberphile video.
3 people never works, if A picks B, then obviously A is getting a gift from c.
unless someone picks himself
But what if B picks A?
@@morganbegg3535 Then C picks themselves and they start over again.
@@mathygamba Let's say that A is giving a gift to B. C cannot give a gift to B because A is already doing that. C obviously cannot give a gift to him/herself so C can only give a gift to A. B can then only give a gift to C.
Why didn’t I think of this
9:37 While picking the pair of cards you can still choose who is buying for you or who you're buying for by choosing the right or left of what that particular person chose
I don't get it. If the cards are mixed up how can you tell?
@human721 They are mixing the number cards but when they cut the card, you know the top number is moved to the right so you will know that the right pair of card will have your number as the top card. Similarly for the bottom card
@@jaingandharv01 Oh I get it. I saw another comment that made a suggestion to cut the cards, move them, staple them together and mix them again, so you won't know who is getting the gifts for you. This still has the issue that two people can't gift to each other.
This is exactly the type of mostly pointless math that I'd sit around pondering.
I got this as an exam question
@Ben Chermside Are you forgetting the shuffle?
I know right!
@@JonathanSharman Actually Ben is correct on this one (i was looking through the comments to see if anyone had beaten me to that remark)
The process as explained:
- shuffle the numbers (you are/ you are buying for are the same on each card)
- cut the cards in half and shift 'you are buying for' 1 position to the left or right (the fact that this guarantees on-one is buying for themselves, is actually the stated goal of doing it this way).
- pick up a bundle. (end up exactly in the situation Ben described, if you see who picks up which bundle)
You get a gift from 1 neighbour and give to the other (same direction for all involved), the only thing that actually got shuffled is which number is assigned to each person (the extra variable introduced to make the rest work)
With an extra step, you can get this to work though.
If after shuffling and shifting 1, you staple the new sets back together (keeping the 'no-one picks themselves' fix intact), then shuffle again.
Mostly important maths is the best kind of maths because if you are right you feel important and if your wrong it doesn't matter
> another klein bottle
GEE I WONDER WHO BOUGHT THAT
TrolleyMouse oh thanks Cliff, again....
ahahahah
I hope to one day be as passionate about anything as Cliff is about Klein Bottles.
I would love to get a Klein bottle from Cliff as a secret Santa gift. In fact, that's now my life goal.
TrolleyMouse xDDD
I remember doing a gift exchange where you bought a present, then everyone was handed a random present. Then, a story was read, and with a certain keyword, the gifts would move left or right with one keyword for each direction. Once the story was over, everyone opened the present they had. It’s not really a secret santa, but how random is it? Would it not just depend entirely on the amount of keywords?
Mucus this sounds similar to a white elephant gift exchange
It's not really random at all, it's actually predetermined, assuming the story was already written and not being made up on the spot by the exchangers.
Actually it is random since the distribution of the gifts was random. The story just doesn't affect the randomness, it only realigns the order of the gifts and the order of the receivers, but the randomness is the same.
I read this as each person got the present that they gave out, wouldn't that be a funny coincidence?
"Derangement" has got to be my favorite mathematical term ever ever.
Elliot Grey I agree. It is a great term.
Sounds like a parody animated series title.
Theres lots of degeneracy in physics too
Not to burst your bubble, but it's actually 'de-arrangement' XD
You'd love the formula for it even more. It's a summation with lots of factorials!
I think you missed a step. If things go as you described, then you know for sure that the person who drew a pair of half cards before you is buying for you, and the person after if the one you're buying for (Or the other way around depending on which way you shifted the cards).
To remedy this, you need to basically tape the cards back together after shifting them, and shuffle them again, so that the order they're picked in doesn't matter anymore, because no one knows what order the cards are in.
People pick the cards randomly, you don't just hand them out in order.
cbernier3 But even then you can know by tracking the cards that people pick and then picking the cards before or after them. There's no way to prevent that unless you shuffle them again.
Gamesaucer It's true, if the point of all this process is to make completely anonymous any pick, then this is definitely a flaw. It could work in some way, but in my opinion it's not rigorous.
Seth Bembeneck So this is how the proposed solution works. Say you shuffle the cards, and they end up in the order "1 6 3 7 4 5 2".
Now they're cut into halves, and we end up with "1:1, 6:6, 3:3, 7:7, 4:4, 5:5, 2:2". How we shift them, and we end up with "1:6, 6:3, 3:7, 7:4, 4:5, 5:2, 2:1".
You can easily see here that for whatever pair you pick, that you will be involved with the people picking the cards left and right of yours, so it's not anonymous.
Ola Kaldestad smh, learn to read before you post.
5:30 Another problem here is that B can pretty easily suss out who is their secret santa, since they saw their own name and put it back, pulled out A, and then the only name left is B for C.
With 3 people everyone knows everyone‘s secret santa anyway. So it’s pointless to do it really since it’s never „secret“.
@@MorB173 Yes, that's a problem with a 3 person group. But the general idea remains the same no matter how large the group is. If the second last person pulls their own name and puts it back in to pick someone else, they will immediately always know who has drawn their name: the last person. If anyone ever pulls their own name, that reveals information to the whole group by narrowing down the possible gift givers for that person. In such a case it is definitely someone who picks after they do.
Love the cheerful energy of Prof Hannah to the extent that I only hear laugh , secret santa , laugh, Hannah's nice voice and no maths . That's fine with me !
Isn't anonymity violated in any case with three people anyways? Everyone knows that the person that bought their present is the one they didn't buy the present for.
If I am A and I picked B name, A still could have been picked by B or C. My pick has no bearing on that, right?
Jason C You are A, you picked B. B could pick A or C, but if they pick A, C will have to pick C, which will force redoing everything. Therefore, any successful run of picks will result in A picks B, B picks C, C picks A (for some values of A, B, C).
3 is an illustration of the problem for a larger N.
The companies I've been with that did Secret Santa, including this year, had you fill out a list of tenish categories of likes and dislikes (brands, things in the price range you'd like, themes and interests for gifts). It was also secret until the gift exchange where you reveal who you got when you give them their gift.
I'm still hype for this video but I'm 45 seconds in and none of the top comments seem to mention this even though I thought it was common practice. An eternally-secret gift for a rando in your office seems like a recipe for failure and I'm not sure math will help
That's not really a Secret Santa then, is it?
More of a Surprise Santa.
@@NathanTAK I always thought the secret was who was the gift giver, not the present itself lol 😆 in my workplace we did something similar too. We just wrote down 2-3 options we wanted and kept it at about 50 bucks. If someone put 2 things that, when added, gave to around 50 bucks people would buy the two things. It was awesome tbh
yes every time I have done it, you find out at the end who gave you a present. I used to organize one for a group of online friends ( who lives all over the world) and you had to know who gave you a gift because of the return address on the package.
Ive done that before!
Why would you not want to know who got you the gift? The only reason for that would be prank gifts
To get rid off the problem of everyone getting a crappy gift, just make everyone submit their Amazon wish list for their Santa to be able to look at. That way it removes the stress from the buyer of buying something bad, and the receiver gets something they wanted :)
Just keep a short public list even if your secret santa group doesn't want to do that. Then if your person wants to sneak a peek (or any relatives that barely know you), they have the chance to.
@@erinpac Or write a list of things you like and don't like. I find Secret Santas to be funnier when there is a part of guessing what someone might like and being surprised by what your santa have chosen for you, rather than just it being a question of paying for an item in a list.
What if you don't have an Amazon wish list?
@Crow they might have not had time or money for it, or didn't find it. you can't really demand very specific things
Take all the stress away, everyone just buys themselves something and say it's from Secret Santa. Guaranteed success, everyone gets something they want.
Me: *should be productive*
TH-cam: here's a video of a Mathmatican explaining how to make the most fair secret santa using math
@Roger Loquitur Equal probability
Hannah's laughter is positively infectious!
My friends and I did this a few weeks ago... there were five of us. It was a nightmare, it took us probably 20 times, not exaggerating, for someone to not get themselves. I repeatedly insisted that we should just have a computer decide for us, but they insisted we needed to do it the “traditional” way. It borderline made me mad lol
Oh wow :O I did this with my band, 5 people as well. First try, and no one got themselves. When the day came to give the gifts, it ended up being a circle. It wasn't my idea but I told em its supposed to be a secret, but people forgot to put names on their gifts, so we just handed it to each other 😂
SAME- and we have twins in our group and they didn’t want to get each other so it was so much harder
The third time they refuse the computer is when you withdraw your name from the pool
There's a website for secret santa
@@rohar8964 ugh twins are always so annoying
this isn't the point of the video, but I LOVE Secret Santa at my work! :) We fill in information sheets (favorite candies, hobbies, favorite restaurant, snacks, shirt sizes, colors, etc) -- and everyone winds up with things they like. Plus we do Secret Santa for a whole week, wherein we have a gift limit amount and most of us give something small every day of the week. It's really fun and it works out super well! Plus it's fun to reveal yourself at the end of it (which is how we play).
The proposed procedure gives a uniformly random cyclic permutation, but not a uniformly random derangement. This is unelegant, since then everyone knows one person, that they are definitely not receiving a present from (namely the person they buy a present for).
Also: The example with three people is misleading, since everyone involved will learn which of the two derangements is chosen, just by considering who they have to buy a present for.
Well the first time I heard the cards solution to this sort of problem was with matt parker talking about their hitman game which needed a cyclic permutation to work
Correct, this method will never select some of the possible derangements. You would need to be able to split participants up into a random number of cycles of varying sizes in order to do that, but I'm not sure of a physical way of accomplishing that. It's simple with code.
9:59 I want to know who works in an office with a colleague named 'Klapaucius', because sadly I do not.
That's a Sims 1 reference (I think you got that, but just in case...)
It's from Stanisłav Lem, both Klapaucius and Trurl )
en.wikipedia.org/wiki/The_Cyberiad
I want to work (somewhere, anywhere) with Hannah Fry 😍
Trurl, obviously!
I’m insulted. You said a crappy present but there was a wrapped klein bottle.
Maybe it's a crappy klein bottle, with only 3 dimensions.
Cliff Stoll makes sales ,I get a cool blown glass bottle, we all win!
I reckon it'd be quite fiddly to wrap a Klein bottle...
@@charliedobbie8916 not with klein paper! just getting that out of the shop may be tricky.
The guy who offered the bottle already drinked it humu humu
PS: you drink a Klein bottle by doing triple lutz
-Have you ever done this?
-Nope.
I died. 😂
Did you just call a Klein Bottle as a trashy present?!
I sense a war brewing. The klein bottle man v Hannah fry. This war would run for decades as both have loyal fans. #TeamKlein
Its not a true klein bottle
It's only trashy on the _inside_.
Jack Sainthill what inside?
Peravit Raviruchiphun
Tell you later.
Don't go away.
On your improved secret Santa you are missing a step to make it actually work. You need to make it anonymous the order that the cards are picked up in. Otherwise, by just paying attention to who came before or after them, depending on the shift, they know who is giving to them. You need to then tape the new cards together and shuffle them again before drawing.
That's why the cards are shuffled before being cut in two. If you're particularly paranoid, you could tape the two halves together (facing each other) and get people to pull it out of a hat.
@@nipuniperera9918 - Shuffling before the cut does nothing. Once you cut the card, the top says "You are 5" and the bottom says "You buy for 5". Now you shift the top row over 1 to the right to get the derangement like in the video.
That means whoever picks left of you buys for you. And whoever picks right of you is who you buy for.
And that means everyone knows who everyone is buying for, as long as they pay attention.
You need to shuffle AFTER the cut and derangement. And the only way to do that (without making a mess) is by fixing the deranged pieces together again.
Yep, i noticed the Same flaw in their sistem.
Next on BuzzFeed: £5 Secret Santa Vs. £100 Secret Santa
*$, $$ or $$$
Tom Lambert I just had the thought: $5 secret Santa vs 10,000 degree knife.
Half the office fills one hat. The other half fill another. The two groups swap hats to pull from.
Green Vein "Half the office" meaning all the people in one office split in two at random, obiously, why would they be two distinct groups based on this one-time split?
***** What are you talking about?
***** No it isn't, what in my reply specifically is problematic.
***** What does that matter if they are thought up randomly?
Because one of the rules laid out in the beginning is that "everybody has an equal chance of being picked up by anybody else". You have no chance to be picked by half of the office.
My only criticism of the last method is that it’s impossible to have subgroups. My secret Santa can’t have me. For some people that’s desirable but I like the idea of having two people by random chance get each other, or even a three person group. Further, you obtain a little more information in this method, because you know your recipient can’t give you a gift, and if you obtain any more information due to carelessness or one/two people telling you (for instance to ask what gift they should get person C), you can deduce even more information about the exchanges
Worst secret santa present I ever saw was a raw (!) pork chop wrapped in a pro-wrestling magazine.
P.S. It was an anonymous secret santa where people bought presents for a set amount of money and left them at a big table.
I'd argue it was one of the best presents. Usually you get something drab and useless. At least it was a funny one :D
Rip
MrCorvusC one time i saw someone receive a framed image of the gift giver, holding the frame
Apart from it being wrapped in a freaking magazine, that's a great present...
@Oskar winters We get it, you're vegan
Love Hannah!
Yeah, it's a cool movie
There is 69 like on your comment I don't want to ruin it, it fits qiute well
In less than an hour, 150 likes lol
Archibald Belanus 314 now.
When I organized a Secret Santa for a group of people, we engineered it so that we (the execs) knew who nearly everyone else was getting something for. Two of us made the lists, so we also wouldn't be able to cheat and figure out who was getting us presents.
It worked out pretty well. I'd say the majority of the gifts were earnest and well-thought-out. Of course, this was not an office situation, but a board of directors made up of people who were often friends, classmates, and who had been planning/hosting events together for at least one semester, if not much more.
I really like it when Hannah talks maths to me
Crash Raindog me too
with the 3 person hat thing
if a picks b
and b picks c
then b can deduce that a picked b because b knows that a cant have a or c
That's true. I think you would need more people in your secret santa pool to make deductions impossible. I wonder what the minimum number of people is then?
if a pics c
and b picks b - he has to put it back and get c
so b knows that the only card left has b on it...
I thought the same but it's kind of pointless, because nobody ever does secret santa with less than 7-10 people.
+Rpodnee There is no minimum number that will guarantee that deductions are impossible under the "draw from a hat" system.
They touched on this briefly in the video. Regardless of how many people you started with, if the 2nd to last person draws their own name they will know for sure that the last person is going to buy for them, since they will put back their name and draw the other one.
+Nathan L if they drew their own name they would restart the entire drawing process for everyone. I'm sure there is a minimum number that would make deductions impossible.
Last year, I spent an entire day figuring this one out but I wasn't smart enough to actually solve it. Ended up not going thru the secret Santa. When I saw this video I knew I'll finally get the answer. I'm glad the Internet exists. ☺️
but if someone picks C first, then the second person picks their own name (B), sure they will pick a new paper (A) and will know that the first person took the C paper.
That person now knows every single person's paper.
Yup. In fact everybody will definitely know who picked what in a 3 person system. But that is through inference and not directly. Just something we overlook to simplify the problem with the given 2 rules at the start of the video.
beat me to it :)
There's only 3 people, so by inference everyone will know by the end. Person 2 always knows what card must be left based on what card they have. Persons 1 and 3 figure it out based on what persons 2 and 3 do
Thank you sir, came here to say that.
Lulink ikr
The optimal solution should be: shuffle, cut, shift, staple, reshuffle. Otherwise you could choose to give or get a gift from someone just by picking the cards adjacent to the ones you saw them take. This still has the drawback that you know two people won't get each other. Shifting by a random interval would also work.
I pulled my own name about 3 years ago, That year i got a present that i really wanted.
That means someone else got their own name too unless there was a odd number of people
@@klicerfn248 that is not true. Suppose there are 4 players, and the first one gives a present to themself, the second one gives to the 3rd one, the 3rd one gives to the 4th one, and the 4th one gives to the 2nd one.
@@ПавлоСурженко even number of people then?
@@klicerfn248 with three people it's possible that you give a present to yourself, and the other two people give presents to each other.
I was looking away and that 2:46 siren set me in apocalypse mode.
And it's just like the HG Wells _Time Machine_ sirne when the Morlocks are coming out.
reminds me of silent hill 1, spooky
extropian314 It's called an "air danger alarm" and it usually signals bombing. In some countries these alarms are tested every 5-10years, heard it once without knowing it was a test, almost crapped my pants
air raid siren*
Hannah is love, Hannah is life.
Hmm... The times I've participated in a Secret Santa exchange, part of the game was the reveal at the final party. People had fun trying to guess who their Secret Santa was, and then they got to see whether they were correct at the end. It didn't remain anonymous beyond the final party.
0:45 Hey now, Hello Internet Vinyl is NOT junk...
project rèvolution!
Riley Russell It was included in the examples of "junk" gifts
Porglit I know, I don't know why I pinged you lol
Porglit I was about to say the same thing, untill I realised I have nothing to play it on...
Асен Доцински I don't either, but if it's HI then it can't be junk
I would be very suspicious if someone in my office bought me a "Hello Internet vinyl edition" for the Secret Santa... Very. Ha!
Al D
I love this video, but there's another issue with the third branch that I would argue would result in a fail.
If B picks B out of the hat and shuffles it back in, they now know that A picked C, and that C will have to pick B since B will keep drawing until they don't pick their own name.
This scenario (where B knows everyone's secret Santa) would happen 25% of the time in this scenario. On top of that, if C sees that B put their name back in, they can also deduce all of the same information because they'd then know that A picked C
This is just like a solution to James Grimes's assassin problem!
Right, and this is precisely the solution that he presented
The thing that Hannah didn't cover (which I guess isn't relevant) is that this solution also prevents there from being multiple separate loops (which is the main thing James was going for in the assassins game). This is actually a weakness for a Secret Santa solution, because it weakens the anonymity by 1. The one person you know for SURE cannot be buying your present is the person you are buying the present for. For complete anonymity, that should also be a possibility.
chinareds54 Right. It turns out that for largeish n (n≥5 is enough for this to be a decent approximation), the one-loop-derrangements (n-1)! out of the possible approximately (n!/e) derrangements, which is to say e/n out of the total possibilities.
Interestingly, the fact that big-loop arrangements account for the plurality of all arrangements is exploited in the solution to the 100 prisoners problem: en.wikipedia.org/wiki/100_prisoners_problem
+chinareds54 which means this doesn't work at all for groups of 3 and is pretty sketchy for 4.
I just clicked on it because Hannah was in it.
I've seen this video a million times, but I'm rewatching it because Hannah's the best
not only that, but the first picker would know who everyone is buying for.
If A picks B, then he knows B would have to pick C, otherwise C would pick C and there has to be a redo.
If A picks C then B has to pick A and C has to pick B otherwise there is a redo.
Indeed, a three-person secret santa wouldn't be too smart in real life. Luckily, it still serves as a lesson in probabilities.
6:30 that's wrong
If B recycles, everyone knows C picked B as it is the only name left. That makes the right branch fail 50% of the time, too. So everyone is equally likely to pick each name at the end.
Not everyone. In this case, A and B would know. In fact, I believe that with only three people, A will always know the exact arrangement. The point is not to do Secret Santa with three people. You probably know each other well enough to get two presents for everyone.
KarstenOkk No, everyone will. C drew B himself. B recycled his own card, so he knows C drew it and A knows B put back card B too, because that's the only one he would've put back.
But actually you're right. There are only two ways of permuting 3 elements without fixpoint - shifting everything to the left and shifting everything to the right. So from your own card you could always tell...
So you should always play with at least 4 persons.
Patrick Wienhöft Ah, you're suggesting people know if someone recycled. In that case, yes. But without that knowledge, A still knows everything.
No; you always know. The options are A=B, B=C, C=A and A=C, B=A, C=B. So, you know one of those 3 regardless of whether you are A, B or C, even if nobody recycles. You know who you are buying for. Therefore, you know which of those two sets it is, and you know all the assignments.
worst gift: I once received three sticks of charcoal for secret santa
caitepriestley what country? Your charcoal comes in sticks??
Like for drawing?
Well, maybe they want you to make them a nice charcoal drawing. 😂
QR subliminal adverts work well! I've just bought a book and I don't know why!
+Chris Beard I don't think it's subliminal, just hidden. Unless your brain reads QR codes.
Numberphile doesn't your brain read QR?
Stop trying to snow crash me
One issue:
You can only get mono-cyclic derangements.
So for example:
123456789
Shuffle.
318742965
Cut and step.
531874296
So the graph is circular. This means several things. One of which is that there is an anonymity violation.
If I'm number 1, I know that I am giving to number 3.
Consequently, I know that number 3 is NOT giving to me!
This is particularly noticeable for groups of 4:
1234
3241
1324
So again, I draw number 1. I know that I am giving to number 4. I also know that either 2 or 3 is giving to me. Further still, If I ask number 4 who they're giving to, it doesn't JUST give me the seemingly-irrelevant information of who they're giving to (number 2), but also the entire cycle.
Because if 4 said they were giving to 2, then I'd know that 2 was giving to 3, not me, and therefore that 3 was giving to me, not themselves. Further still, if 4 doesn't know I'm giving to them, then I'm the sole proprietor of the information. 4 just gave me data they didn't have themselves.
And of course, it isn't just 4 who can give me info they don't have.
If 2 tells me they're giving to 3, then I know 3 is giving to me and 4 is giving to 2.
If 3 tells me they're giving to me, then I know that 4 is giving to 2 and 2 is giving to 3.
That means:
In a cyclic group of 4, any two people sharing information is enough for the most well-informed person to know EVERYTHING, even about people not being discussed.
Equal probability of derangements was not one of the assumptions. This meets all of the assumptions, and is therefore perfect.
Yeah but the idea is not to share any information.
Peter Smythe I loved your comment!!! It blew my mind when you said that a person could give you data that he himself doesn't know.
You are only getting mono-cyclic derangements because you are placing all the tiles in a single line. Take a 12 card system for example. You could line them in 3 rows of 4. This will allow either horizontal derangement, vertical derangement or both. For added complexity you could also flip a coin. Heads steps once while tails steps twice. An appropriately sided dice could be used for larger groups.
Anonymity violation only occurs if people are talking to other's about who is buying for who. In your 4 person example yes 1 piece of information from someone else can unravel the whole thing. However the more people that are added the more pieces of information you actually need. This in turn diminishes the issue.
The issue is irrelevant as long as everyone plays by the rules and doesn't discuss with anyone who they are buying for which I understand can be somewhat unrealistic to expect.
Peter Smythe "If".
Mathematician: Let's come up with a complex arrangement such that we get an ideal derangement with minimal risk of conflicts.
Me as computer scientist: while(not valid): createNewDraw() - unless you're doing insanely large draws it's only taking a fraction of a second each time.
I do that for literally any mathematical application.
If createNewDraw is a random permutation the expected number of iterations is ≈ e² - e ≈ 4.7 for large numbers of people. It's not that bad even for large draws :)
@therainman777 He said "for large numbers of people" and "approximately", so while n is in the exact formula, the function converges (becomes closer to the approximation) as n increases, and it does so quickly enough that the exact value of n is irrelevant (it only matters that it's "large").
@TomDufall The flaw of this algorithm, repeating the draw on failure, is described at 6:23: it doesn't result in a uniform distribution; some outcomes are much more likely than others.
I wrote something like that for picking coordinates that obey a set of constraints. It ended up taking longer on average to create each coordinate than to run the main code on that coordinate. Don't optimise prematurely, but don't design code to be slow in the first place - make algorithms that give the correct answer rather than ones that guess, check and retry.
This solution has a minor issue in that you know that whoever you are buying for is definitely not buying for you.
That would solve the issue if there's an even number of participants, but with an odd number the problem still occurs.
You're absolutely right, although in some cases one single cycle is desirable.
Same problem as Enigma?
And hte bigger issue that you know who is buying for you. It's the person to your left.
It's not, the card shuffling sorts that issue.
Wow at 9:54 ! Does Brady force Animator Pete to always make Brady number 1 haha
Yes, it's in my contract
Pete McPartlan I also spotted the Cyberiad reference in the list of names...
Hannah's answer to the last question is literally an example of "Do as I say, not as I do" moment XD
Brady, surely a Klein bottle is a great present! A Parker Square would have been a better example ;)
A Parker Square would be almost the perfect gift. Almost.
doesnt this system as presented have an issue? if you shuffle the cards before the slicing and then move the "you are number" cards over by one you know whoever picks the card pair before yours on the table is your secret santa. (assuming you are all standing around the table selecting). You wont know what number they are but that information is not relevant. To fix you should retape the half cards back together and the shuffle again. That way you maintain the derangement while hiding the extra information gained by knowing relative locations of cards.
Tyler Jackson my thoughts.🐳
Random deal them.
Well, wouldn't it be fine if people wen to grab a card in isolation, with no one being able to see what card they grabbed (or even whether they went to grab anything in the first place).
A random deal ends with the same problem as the original problem
+Freddie Simmons No, it doesn't - the original problem is eliminated by the fact that you can't pick yourself.
I did this process this year. And I created a survey where you put a wishlist for your number rather than writing your name on the list. It has worked out rather nicely.
The way Hannah talks makes me tingle
Yeah it's sexy
I think I'm team Hannah and not team Holly anymore
9:33
5 have to buy a present for 9, he knows that the last number on the table, have to buy a present for him, and the second one for 4
Have everyone choose their sets in secret, and move the cards together after
Then don't tell them how you arranged the cards. They don't need to hear the method behind it, just pick one
@@rkah6187 that works to
I think what was not presented well was that after shifting the top halves over, people are picking the new pairs at random. Its not "everyone picks a card, cuts it in half, and passes the top to the right." Its "shuffle, cut, shift, tape back together, pick at random." Or if you want to make it obvious, after shifting the top half to the right (or left) some amount, everyone tapes the card in front of them together and tosses it into the hat. *Then* everyone draws a card out of the hat.
I LOVED the solution here. Brilliant job, Dr. Fry. This is just the kind of twist that made me subscribe to Numberphile in the first place.
If I'm A and I pick C from the hat I know that person B must have A, otherwise C would have himself (which he would point out), not making it anonymous.
also, if a picks c, and b picks himself, he has to put it back and take a, so he also knows who has who
Mc Karl: To some extent, it works in every scenario in which you know who you're giving the gift (though you just have partial information instead of complete information). You would need to use something like the card scheme to solve this.
Yeah you always have that problem with three persons that everyone knows who buys for who. Because if we assume there are no cheaters who stay with their own name, the one who buys you presents is the one you didn't draw!
You could just make a random derangement. Then for each person, use a random number generator to assign them to each position. Then, assuming that the random number generator has a perfectly uniform distribution, everyone would have exactly the same chance for any possibility.
No matter how many total people, the 2nd to last person can never pick themselves because everyone will know who the last person has (even if nobody is looking the 2nd to last person will know).
5:20 by putting their own card back, everyone now knows that C will end up with B though, thus failing the anonymity criteria though?
Yep, start over everytime anyone draws their own name
I can break Hannah Fry's system! Make a list of the order that people go up to collect their cards. Look at the completed list of who is what number. Rearrange the numbers in that list so they match the giftgiver. If you know who you're buying for and your number, you can work out the shift that's taken place and can assign givers to recievers.
Flirtiest Numberphile video ever?? XD
Smiling while being female = flirting. GRAND.
Ohoh not just the smiling :)
+Mewyabby There's no need to put words into my mouth I just thought their interaction was cute
True 😂😂
You didn't see the Holly Krieger videos? The 63 and -7/4 one especially.
Is that a Klein Bottle at 0:26 , the one with the "hole"
it was a klein bottle , i guess i should have watched more
delet this
That joke flew right over my head...
You're not my general , Green
UMos just search for "numberphile klein"
I've been in 3 secret santas, one was over in Brazil with extended family. It was quite complicated, I think there was a pile of gifts on a table and people would take turns. You had two options: to either take a mystery gift from the table or 'steal' a gift that someone already had. In the case that someone had their gift taken, I think they'd either take from someone else or take a mystery gift.
I know that a certain relative was allergic to chocolate but kept getting the chocolate-based gifta from the mystery presents, I forgot whether they had to keep it or choose a different present instead. But it was pretty fun!
That's called White Elephant!
You gotta stop putting chocolate in the pile
The funniest problem to me about the ABC example is there are also outcomes where it's simple to figure out who's buying what regardless of probability. If you're just three people playing and you're player C and end up with B's name you know for a fact that player A must be buying your gift since they can't have ended up with their own name.
Wait but if say the order ends up being
1 3 6 ...(etc.) then shift the top one over becoming say 7 1 3 ... (etc)
1 3 6 ... 1 3 6
And everyone then grabs the cards they would just know that the person before them is buying for them right? So you'd have to stack the 2 cards on top, and then shuffle those around again first before anyone picks up the new set of cards to actually make it work.
But you do not see the numbers, the cards are facing down the whole time
you dont just move one card from the top to the bottom you pull about half the deck to the bottom
But if you put all the "buy for" cards 1 step to the left then you will know that the person to your right is buying for you.
@ruben yea you cant have people see who took which pile.
Or you just pin the new pairs together so they stay together and shuffle them again.
Seeing the A is twice is likely to pic one vs the other makes me wonder if/how this is related to the Monty Hall problem.
Oh! And a bonus, seeing Trurl and Klapaucius on your list of sample names makes me all kinds of happy.
Great video -- this was also covered by James Grime with Matt Parker on his channel singingbanana, except it was to organise a game of Assassin (which is much more fun than secret santa) :P
Didn't understand instructions: assassinated my colleagues
Ah, I was about to say that! Gather the "real fans"! :p
So I'm not the first one to have noticed that :(
Alex McGaw I knew I had heard the same solution to a problem earlier. Couldn't quite remember where
Guess who is not getting invited to Hannah's christmas party ;)
3 people just doesn't work if you want to maintain anonymity, you can always figure out who picked who.
The 3 person game is worse than stated:
If A chooses A, fail.
If A chooses B, then B must choose C and C choose A, else fail. => A knows full outcome.
If A chooses C, then B must choose A, C choose B, else fail.
Those are the only two valid selections, hence all players know who their Santa is.
Also if A choses C and B picks B, then B has to pick a second card but will now know that card B will be taken by C!
The game fails Everytime on the premise that it takes only one person to know who their secret santa for the game to fail.
But the premise that all players will know who their secret Santa all the time...let's test that.
A picks B. B knows he can only get A or C validly. Assume on the first try that B doesn't get himself. If B gets A, then the game will ultimately be a wash when C picks C. At this point, A knows the B can only get C.
What does C know? Assuming the perfect condition where no one picks themselves, C know that A got B or C. C knows that B got A or C.
My question is, in this perfect yet possible situation, is there a case where C will not know if he's getting a gift from A or B? My guess is that this is possible, but someone prove me wrong because I can't think no more.
@@jps76 Actually, since there is only two valid permutations with 3 players, then regardless of your turn, you will know who your SS is.
Once a game with no self-pulling has been played, (lets call them L M and N for the random order of pulling,) M will have either L or N card in his hand, and if he has L, then L has to have N (else N picked himself) and N have M, so M knows his SS.
3-man Secret Santa is impossible.
@@jps76 in the three person game, there are only two valid outcomes. That's not a premise, it's a conclusion.
Now, your question is whether a player can be unaware of who their secret santa is. The answer is yes, they can if they don't understand the game. That's certainly a possibility.
Here are the two valid outcomes:
1. A -> B -> C -> A
2. A -> C -> B -> A
Another way of understanding this is: you can't give to yourself. Therefore you can't give to your own secret santa. (For otherwise, the third person would have to give to them self).
It follows that your secret santa is whoever you aren't giving to.
@@Not_an_alligator well DUH
I know I'm like 4 years late, but whatever.
This year me and my friends did it and it was SO stressful!
.Firstly, when we first picked out the names, it went so well and no one got themselves. But then two people in the group told each other who they had and we had to re-pick.
. And it went so badly! Everyone kept getting themselves and it took ages for everyone to get someone they could buy for!
. It was ok after that, but a few days before we exchanged gifts, everyone suddenly started telling each other who they had or giving really obvious clues. Only me and one other person had no idea who we had, which was annoying!
Tip for secret Santa's- Keep your mouth SHUT about who you have because it isn't very fun if it's just a Santa!
The problem with 3 people, is that everyone then knows who is buying for who based on what name they choose.
finally a new video :D
There was one last week!?
Numberphile oh yes but isnt it normally 2 uploads per week?
Numberphile you can never satisfy us😈
Not with Hannah
Sneaky QR code at 7:37... ^_^
Considering that it's TH-cam, before I saw the channel name I thought this was a rant about the social ramifications of anonymously exchanging holiday gifts.
HOW DARE YOU CALL A KLEIN BOTTLE CRAPPY
For the record it was "another klein bottle" assuming you have loads.
Pete McPartlan no matter how many they will always stay awesome
Pete McPartlan you mean a storage room full of klein bottles which you can only reach with a robot? If you have less, you don't have enough!
If you already have a klein bottle you don't need another, because the one you have already contains it.
But if you shift all tops 1 unit to the left, then you know you'll be buying a gift to the person on your left / next person to pick up a card!
Yea and you know that the person who picked the card that was right of yours will be buying you something.
rusins I think the idea is that the cards are reattached after the derangement and once again randomized. However there is a need to to have a derangement more complex than a shift/offset, because such a derangement would guarantee that no two participants could get each other.
I see. App it is.
thought the same. remember the cards have been shuffled
rusins the order was also shuffled in the beginning so the one card to the left isn't necessarily one integer bigger :)
pirate secret santa is clearly the best choice. my last workplace did it and it was actually a riot. (and is a great way to create natural team bonding)
You are number six.
I'M NOT A NUMBER I'M A FREE MAN!
I am number two
I hope my secret santa gets me a Hello Internet Vinyl!
+francoistrempe depends who pulls your name from the hat, I guess
That is why my group of friends and I do Secret Santa with an app I made. It is impossible to get your own name, and you can add a wishlist of what you would like. We also suggest a budget and an average is drawn from the options. But part of the fun of our Secret Santa is the surprise during the gift exchange of who is your secret Santa.
One problem with the optimal solution: It is impossible for the person you picked to pick you, which makes it a bit less secret :D (if i understand your explanation properly).
Erik Takke not if there are only 2 people doing it
But playing with 2 people defeats the purpose, you know anyway who picked you :D. You are right though!
Erik Takke you could roll some dice to decide how many cards to shift by. The only problem, though, is that if one person finds out that they are buying for the same person who's buying for them, then everyone knows that they are buying for the same person who's buying for them. it's still anonymous conditioned on everyone following the rules, though.
For even numbers, if the shift is half the number of people, then you instantly know that you picked the person buying for you. Instead of shifting the cards, you could come up with a derangement of them and then shifting the top halves to match it. This way, you can pick the person who picked you without that being true of everyone. Although you would have to have a third party do the derangement or else you could easily see the number of buying pairs.
*The standard "hat" system has more flaws than they mention.*
If you pick your own name and replace it, you know someone after you will end up picking it.
If everyone else sees you replace a card, they know this too.
This reveals information, (potentially) breaching anonymity.
This means that the first person is guaranteed total anonymity, but for each redraw down the line, more information is revealed about each. The second to last person will end up knowing exactly who buys for them if they redraw.
*For example:* in a 'game' with 10 people, if the 7th person has to redraw, everyone knows that it is one of the next 3 people that will be buying for the 7th person. Though this doesn't strictly violate anonymity, it's not a great system as it could reveal a lot of information.
Specifically, there's a 1 in 3 chance people 8, 9, and 10 have person 7. It's also known that people 1-6 do not have person 7. If this happens multiple times, that's a large loss of anonymity, especially for the last ones to draw.
Not necessarily. If you replace your card, the cards can be reshuffled. Thus the next person has no idea which card's yours and anonymity is preserved.
***** I get that. Shuffling doesn't fix all problems. But it does fix the first person OP mentioned.
No it doesnt. Unless you start over, reshuffling the remaining cards wont stop people from knowing that 1-6 dont have person 7
Also the 3 person example straight up doesnt work. If player A pulls C, then he knows exactly who the other people have because B can't pull himself. So by pulling C, he can deduce that B will be buying him a present
7:10 - "you don't like, someone who's rubbish at presents, buying for you."
This would be gold for a sitcom writing prompt.
Did Numberphile just call the klein bottle crappy?! >:(
Pisoi Gaming I just left a very similar comment. I'd be happy if someone got me a Klein Bottle
The emphasis was probably on the _another_ part - I'd be happy about _a_ Klein Bottle, sure - four? Not so much ;)
less the 5 mins. Perfect seeing how long I last. in math class
The method described at the end of the video will not give anonymity: While the resulting permutation is guaranteed to be a derangement, it is also guaranteed to consist of a single cycle. So, for example, you can be sure that whoever you're giving to is not giving to you (since your card was to their right, so theirs cannot have been to your right), violating anonymity (though it doesn't violate randomness in the same way as the classic method).
sounds like a feature and not a bug
Never enjoyed math so much as when it's coming from Hannah Fry, and I love math.