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...

Комментарии • 40

  • @DeVibe.
    @DeVibe. 4 дня назад +33

    ¡The Spanish factorial!

    • @dlevi67
      @dlevi67 4 дня назад +4

      And 'e' stands for España

    • @pierreabbat6157
      @pierreabbat6157 3 дня назад +1

      I saw "¡∞" in the thumbnail and wondered what "¡" means in math.

    • @nostalgia_1439
      @nostalgia_1439 3 дня назад

      I guess that is like
      ¡ ! = bang! = "BANG"

    • @francoismolinier6924
      @francoismolinier6924 2 дня назад +1

      Didn't expect that

  • @ytbqiqayon
    @ytbqiqayon 4 дня назад +12

    Note that 'n bang' is another way of saying 'n factorial', and should not be confused with 'bang n'.

  • @dlevi67
    @dlevi67 4 дня назад +6

    A more deranged than usual Dr Peyam!
    Happy late thanksgiving, and giving thanks for this interesting nugget.

  • @benburdick9834
    @benburdick9834 4 дня назад +7

    I was convinced that the limit would approach 0 before watching this. What a nice result!

    • @xinpingdonohoe3978
      @xinpingdonohoe3978 2 дня назад

      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.

    • @alnfsyh9403
      @alnfsyh9403 12 часов назад

      Yep​@@xinpingdonohoe3978

  • @celestindupilon2773
    @celestindupilon2773 4 дня назад +5

    Hello Dr. Peyam! Your enthousiasm ist contagious and your shirts are incredibly cool! Greetings, Célestin

  • @Apollorion
    @Apollorion 4 дня назад +5

    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 ?

    • @dlevi67
      @dlevi67 4 дня назад +1

      Yes, because the lim n→∞ n!/(n+1)! = 0 and the remaining factor is finite.

    • @Apollorion
      @Apollorion 4 дня назад +1

      @@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.)

    • @dlevi67
      @dlevi67 4 дня назад

      @@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.

    • @Apollorion
      @Apollorion 3 дня назад

      @@dlevi67 But how can you derive which of the limits is the proper one for: _infinity bang divided by infinity factorial_ ?

    • @dlevi67
      @dlevi67 3 дня назад

      @@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 ∞.

  • @marcelob.5300
    @marcelob.5300 4 дня назад +1

    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.

  • @mathunt1130
    @mathunt1130 4 дня назад +2

    Technically this is only the principle value right?

    • @dlevi67
      @dlevi67 4 дня назад +1

      Not really. The infinities really cancel out. 'Technically' it's the limit, though.

  • @guidosalescalvano9862
    @guidosalescalvano9862 3 дня назад

    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)

  • @antoniocampos9721
    @antoniocampos9721 2 дня назад

    Very clever

  • @joelpaddock5199
    @joelpaddock5199 2 дня назад

    Guess: it goes to exp(-1)

    • @drpeyam
      @drpeyam  2 дня назад

      How did you know? 😱

  • @ianfowler9340
    @ianfowler9340 4 дня назад +4

    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

  • @vishnukarthik8351
    @vishnukarthik8351 3 дня назад

    Lovely shirt :)

  • @alala512
    @alala512 3 дня назад

    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.

  • @Man20045
    @Man20045 3 дня назад

    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

    • @drpeyam
      @drpeyam  3 дня назад

      That sounds like a homework problem to me

    • @Man20045
      @Man20045 2 дня назад

      @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)

  • @martinprince8253
    @martinprince8253 4 дня назад

    There are NaN enough people on earth for that to be true

  • @TekCroach
    @TekCroach 4 дня назад +1

    what's that stupid notation? I recently saw it in several headlines on youtube.

    • @yewdimer1465
      @yewdimer1465 4 дня назад +5

      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.

  • @chucksucks8640
    @chucksucks8640 3 дня назад

    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.