Well, that was fun! Join Wrath of Math to get exclusive videos, lecture notes, and more: ru-vid.com/show-UCyEKvaxi8mt9FMc62MHcliwjoin More math chats: ru-vid.com/group/PLztBpqftvzxXQDmPmSOwXSU9vOHgty1RO
It might not be the lack of hats in such a situation that's hazardous, but the lack of clothing well south of the hat region. Or if not hazardous, perhaps adventurous. e ...xactly!
It does indeed sound like a Berlin nightclub, but the calculation was not gender specific, and it could therefore also be applied to any dark room where people remove their hats on entering.
I have a feeling the men without hats are happy to be partying in a dark room. After all, they can dance if they want to, and they can leave their friends behind.
I think that if we asked 10000 people the question (for some arbitrary number of hats, like 20) to give a percentage from 0-100 that no-one gets their hat back there would be quite a peak at 37%. Yeah, there would likely be one at 73% too.
I'm a game developer, and a strikingly similar scenario - and result - came up awhile back when doing a deep dive on some item drop rate adjustments. Imagine you have a monster that drops an item when defeated at a rate of 1 in 100 times and then you defeat 100 of that monster. What's the chance you've gotten at least 1 of that item? Due to the "at least 1", this is easier to count the inverted result of "how many times did you fail to get the item" and repeat 100 times. So: (1-1/100)^100. And then invert that result: 1 - (1-1/100)^100. Giving a result of approximately ~63.4% chance of getting at least once. Generalizing this as n instead of 100, and then letting an n approach infinity, we get the result: Lim n->inf [1 - (1 - 1/n)^n] = 1 - (1 / e)
But they were men without hats And they were dancing And they were friends The men without hats never claimed they didn't "own" hats. They just didn't have any, currently, as is the case with our dancers
In my head I thought "its definitely something like e, or 1/e", and imagine my surprise when I saw the result! Although, not much of a surprise, whenever probability is involved, e will show up.
Yeah, for the mathematically initiated, it may be far less surprising. but it’s so amusing to take a silly word problem like that regarding hats, and the answer is 1/e 😂
As a fascinating exercise, consider the following: Suppose you help n people receive their own hats by randomly distributing all of them. Then, those with incorrect hats return them to you to randomly distribute again among those still missing hats. What is the expected number of iterations it will take for everyone to have their own hat? (I more or less have a proof for this, but i also have homework due today 😢)
Fixed points in this sense are cycles of length 1. The obvious generalisation is to permutations with other minimum (and indeed maximum) cycle lengths. These would be practical things to know.
I remember finishing our subfactorials a year ago and I loved them so much. I made a scratch project to plug a number in to give the sub factorial of the number.
Seems like there's an easier way to count using a recursive definition: let Ai be the set which has *exactly one* fixed point at index i. This means that index i is a fixed point, and the rest is a derangement: !(n-1). Likewise for Bij (the set which has exactly two fixed points). So the number of derangements is going to have the form !n = n! - ((n choose 1)!(n-1) + (n choose 2)!(n-2) + ... + (n choose n-1)!(n-(n-1)) + 1) Then I'm sure we can do some re-arranging.
All this complex mathematics just for the extremely rare situation of men grabbing their hats in a dark room during a storm seems a bit excessive, especially considering that hats are somewhat out of fashion nowadays. Also they could certainly distinguish some hats by feel. I mean, nobody would confuse a baseball cap with a top hat, even in complete darkness.
When you start from n=0, the first value is !0=1 (because the empty permutation has no fixpoint) or even via recusion as !0=!(-1)*0 + 1 (=1) [assuming the unknown value of !(-1) is finite], and from there: !1=!0*1 - 1 (=0), !2=!1*2 + 1 (=1), !3=!2*3 - 1 (=2), !4=!3*4 + 1 (=9), !5=!4*5 - 1 (=44), ...
Here’s a fun fact, integration from 0 to infinity of (x-1)^ne^-x is equal to !n. I don’t think I’m the first to discover this, basically, expand (x-1)^n with binomial theorem, change sum and integral and you get the n-th discrete difference of n! Which is also known as the subfactorial. I’ll leave my derivation for the derrangement formula here as well. Let p(N,k) denote the number of permutations of N elements fixing k. The sum from k=0 to N of P(N,k) is N!. Now note that P(N,k)=C(N,k)P(0,N-k) since fixing k elements is the same as fixing k and NOT fixing the remaining ones. Now you have the sun from k=0 to N of C(N,k)P(0,N-k)=N!. This we know that N! Is the “binomial transform” of the the derrangements, meaning we can invert this sum of write the N-th derrangement as the N-th difference of N! With a bit of tweaking you can use an argument like this to count any permutations of fixing r elements.
e is also closely related to pi. e^pi*i=-1. Also if f(x)=f^4(x), f(x) could equal both e^x, or sin(x). Also, since you mentioned rounding, both pi and e round to 3.
Without accounting for double counting, the direct sum of all sets [A1] to [An] equals n x (n-1)!, is N! again. just thought that's a funny consequence of the math
Hmmm Derangements are actually exactly what I need for my experimentations on creating sudokus. Is there also a way to easily figure out what those derangements are instead of just their amount?
1/e also shows up in another famous math problem, which I'll poorly paraphrase: When dating, what % of the total pool should you check out before committing to one? The answer is 37% of the pool, 1/e.
Explain to me why !n ≠ (n-1)×(n-1)! = n!-(n-1)! if the first item has n-1 choices for what it could be, and if you choose the spot corresponding to that item to fill in next you get n-1 choices, and if you keep going doing that again and again you get n-2, n-3, etc. guaranteed I know this is wrong since (n!-(n-1)!)/n! = 1-1/n which approaches 1 as n→∞, not 1/e
I can't believe I didn't see 1/e coming. I just thought "ooh, Taylor series for cosh(1) minus Taylor series for sinh(1)". Of course, that _is_ 1/e, isn't it? Reason you have to round n!/e to get !n is that you're only summing the terms of the series up to n, and if you add more terms after that to approach n1?e, you'll only have shrinking, alternating fractional terms starting with n!/(n + 1)!, which at largest will be 1/2, meaning the sum of all fractional terms going to infinity will be strictly between -0.5 and +0.5, meaning you just round to eliminate all the fractional terms, and of course eliminating all the fractional terms gives you all the integer terms, which is the truncated series formula for the subfactorial.
Put n beautiful women in this room, and they will never find their hats even the lights on. Now put n-m women, and what is the probability lights off? I have not done the calculation (10PM here in Beijing tired), but I would call this function "n rejects m" !
It’s crazy the way e just pops up everywhere. You can speculate about what the universe would be like if any of the co-called fundamental constants of physics were a little different, but there’s no way to even hypothesize a mathematics with e having some different value. (Or is it? Am I just being limited by the fact I’m living in the universe we find ourselves in? Could there be spaces governed by a completely different kind of mathematics? I don’t see how there could be, it seems that math is necessarily just math in order to be self-consistent, bit again I wonder of that’s just my limited, parochial view?)
Yeah, it's difficult to comprehend the order amongst the chaos. I'm an atheist, but the one thing that regularly makes me lean more towards belief in God is mathematics.
I'm not understanding why the answer to the number of derangements isn't just (n-1)! since if you assume that no element can be placed in its original location then the first one has n-1 options, and the second element has n-2 options (since we exclude whatever we picked for the first one) etc.
Good question! That will fail to count them all. For example, if we have 4 hats then there are 3 people that Hat 1 can be given to, say we give it to Person 2. Now how many people can Hat 2 be given to? It is not n-2 as (n-1)! would suggest. Instead, there are still 3 options, Person 1, 3, or 4.
BTW not to throw a spanner in the works but, mein tutē has got driẹ ekkon, drie ekkon hast mein tutē, if it had not drie ekkon it would not be mein tutē... put th@ in a picture of a pipe & smoke it Dada 🤪
@@ehtuanKIt is in the final 2 terms of the expansion which subtract the n overcounted n-1 fixed point possibilities and add back the 1 all-fixed possibility, or vice versa.
To a C++ programmer you put a bang (!) in front of a bool variable n or expression and we're going to assume it means NOT n. IF n = false THEN !n = true. If (!(3 < 10))... = false. 😏
1+2+3+...+n is called the nth triangular number (imagine a triangle of dots, 1 at the peak, then 2, then 3, then 4...) and there is a simple way to calculate such a sum
@WrathofMath get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class get out of my class
Lol, I do my best to strike a good balance, but it’s hard to get it perfect. Keep in mind the vast majority of my videos are parts of lecture series on college-level topics, in those videos I’m able to assume a significant amount of prior knowledge. In these videos I am not assuming that, and I get quite worried of slinging around terms where the audience doesn’t know what I’m talking about. Suffice to say these worries slow my pace some.