infinitely many people failed this interview question
HTML-код
- Опубликовано: 3 дек 2024
- infinitely many people failed this interview question
We calculate infinity bang divided by infinity factorial. In other words, out of all permutations of infinitely many objects, how many are derangements? This is useful for example, for Secret santa, where you want to make sure that no one gets their own gifts, or for making sure that students don't grade their own exam. The answer will surprise you! For this, we use an explicit way of calculating the derangements by using the inclusion-exclusion principle, and finally by using a power series. This is a must-see for calculus and probability and combinatorics students, enjoy!
Derangements: • what is a derangement?
RUclips: / drpeyam
Instagram: / peyamstagram
Teespring merch: dr-peyam.creat...
¡The Spanish factorial!
And 'e' stands for España
I saw "¡∞" in the thumbnail and wondered what "¡" means in math.
I guess that is like
¡ ! = bang! = "BANG"
Didn't expect that
Note that 'n bang' is another way of saying 'n factorial', and should not be confused with 'bang n'.
Bangin'
A more deranged than usual Dr Peyam!
Happy late thanksgiving, and giving thanks for this interesting nugget.
I was convinced that the limit would approach 0 before watching this. What a nice result!
I too could have believed it to be 0, until he showed the definition. As soon as he showed it, it was very obviously 1/e.
Yep@@xinpingdonohoe3978
Hello Dr. Peyam! Your enthousiasm ist contagious and your shirts are incredibly cool! Greetings, Célestin
Isn't (!N)/((N+1)!) as N goes to positive infinity also an example of infinity bang divided by infinity factorial, but instead equal to zero instead of 1 over e ?
Yes, because the lim n→∞ n!/(n+1)! = 0 and the remaining factor is finite.
@@dlevi67 Thank you for verifying my calculation, but my main point is that when just writing !infinite/infinite! it is not clear what is the relation of the speeds at which these two infinities are approaching their infinity.
(e.g. if I wrote minus instead of plus in my first alternative example, it'd still be infinity bang divided by infinity factorial, but the limit would be positive infinity.)
@@Apollorion Once again, yes, because the lim n→∞ n!/(n-1)! = ∞ and the remaining factor is finite. Asymptotic behaviour does not matter for this limit, as both numerator and denominator approach ∞ at the 'speed' of the factorial (to use your language).
The fact is that for every m,
lim n→m n!/(n+1)! = 1/m
and
lim n→m n!/(n-1)! = m
replace m with ∞, and you have what is happening to the limit (of both the 'simpler' n!/(n±1)! and the more complex !n/(n±1)! expression.
@@dlevi67 But how can you derive which of the limits is the proper one for: _infinity bang divided by infinity factorial_ ?
@@Apollorion In the same way that Dr Peyam does in the video. You note that for any m>0
!m/m! = (m! * Σ(k,0,m)(-1)^k/k!)/m!
which can be rewritten as
Σ(k,0,m)(-1)^k/k! * m!/m!
note that the first factor is always finite for any value of m, and m!/m! = 1 for any value of m. You then take the limit for m→∞.
lim m→∞ m!/m! = 1 as numerator and denominator are identical, so their ratio is 1 no matter what they are, and the limite of the other expression equals 1/e.
If instead of having !m/m! you have !m/(m+1)! you have
lim m→∞ m!/(m+1)! *Σ(k,0,m)(-1)^k/k!)
the second factor does not change, and it still evaluates to 1/e, but the first factor tends to 1/∞ (i.e. 0), so the result is 0.
Vice-versa, if you have !m/(m-1)!
lim m→∞ m!/(m-1)! *Σ(k,0,m)(-1)^k/k!)
the second factor still evaluates to 1/e, but the first factor tends to ∞, so the result is ∞.
Neo: Whoa. Déjà vu.
[Everyone freezes right in their tracks]
Trinity: What did you just say?
Neo: Nothing. Just had a little déjà vu.
Trinity: What did you see?
Cypher: What happened?
Neo: A black cat went past us, and then another that looked just like it.
Trinity: How much like it? Was it the same cat?
Neo: It might have been. I'm not sure.
Technically this is only the principle value right?
Not really. The infinities really cancel out. 'Technically' it's the limit, though.
Is there some profound link here between statistical mechanics and geometry (e is scaling through real exponents, rotation through imaginary exponents)? And is there a link with gaussians too somehow in the form of e^(-x^2)
Very clever
Guess: it goes to exp(-1)
How did you know? 😱
Given n distinct letters L1,L2,L3,....Ln and n distinct envelopes E1, E2, E3,....En
If the n Letters are assigned randomly to the n Envelopes find the probability that at least 1 Letter is paired with the correct Envelope.
This means the alternating sum gets divided by n!. Also our alternating sum runs from 1 to inf. not 0.
sum_ R=1 to n [ (-1)^n / R! and as n---> inf. then we obtain 1 - 1/e as the required probability.
About 63 %.
MONTMORT LETTER PROBLEM
Lovely shirt :)
Hello Dr Peyam! I love your videos, but I do not understand your argument here, because infinity factorial is the cardinality of all permutations of N (natural numbers or any countably infinite set), and infinity bang is the cardinality of all permutations of N such that no number is matched to itself. None of these is defined by limit. Of course, if they were defined by limit somehow, then your argument would be correct. As both equal to continuum, we want to divide two equal infinite cardinal numbers to each other.
If f(x) is uniformly continuous on a set S1 & S2 is a proper subset of S1 then is f(x) uniformly continuous on S2?
If f is uniformly continuous on S1 & f is uniformly continuous on S2 then is f uniformly continuous on S1 union S2?
Please someone help.professor peyam please consider making a video on it
That sounds like a homework problem to me
@drpeyam no its not a homework problem...actually i want to use it to solve problems....so i need its proof(anytime i can show the proof & save my grades)
There are NaN enough people on earth for that to be true
what's that stupid notation? I recently saw it in several headlines on youtube.
The notation !N describes the number of derangements of N objects, which are permutations where no object appears in its original position. For example, !4 = 9 means there are 9 ways to rearrange 4 objects such that none remain in their initial positions.
infinite is not a number so it can not be divided as in a fraction but if you thought of it like a fraction you will be saying a number can be divided infinite parts like 2, 3, .... inf. Eventually you have zero.