The Subfactorial is Hilarious

Поділитися
Вставка
  • Опубліковано 6 січ 2025

КОМЕНТАРІ • 648

  • @WrathofMath
    @WrathofMath  2 місяці тому +65

    Well, that was fun!
    Join Wrath of Math to get exclusive videos, lecture notes, and more:
    ua-cam.com/channels/yEKvaxi8mt9FMc62MHcliw.htmljoin
    More math chats: ua-cam.com/play/PLztBpqftvzxXQDmPmSOwXSU9vOHgty1RO.html

    • @kilgorezer
      @kilgorezer 2 місяці тому

      i agree, that was fun

    • @donspencer7224
      @donspencer7224 Місяць тому

      That was very interesting

    • @none432141
      @none432141 28 днів тому

      😢😢😢àaaaaaaaaaaaàaaaaaaaaa😢aàaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaà😢😢😢aà😢😢😢a😢😢​@@kilgorezer

    • @Gmackematix
      @Gmackematix 24 дні тому

      You say subfactorial. I say the Secret Santa function.

    • @JackeDao
      @JackeDao 17 днів тому

      Frick this easyer formula ⬇️
      !n=(n-1)^n-2

  • @disnecessaurorex4908
    @disnecessaurorex4908 2 місяці тому +1519

    I feel like "It's 1/e, isn't it?" is the "he is right behind me, isn't he?" of maths

    • @RickofUniverseC-137
      @RickofUniverseC-137 2 місяці тому +28

      Great analogy!

    • @CliffSedge-nu5fv
      @CliffSedge-nu5fv 2 місяці тому +82

      Euler is always there. Sometimes he's downstairs.

    • @blasphemer_amon
      @blasphemer_amon Місяць тому +3

      Was not expecting to see a 2021 Abu Dhabi reference here 💀

    • @Asiago9
      @Asiago9 Місяць тому +11

      It's always an expression to do with pi, e, or ln of something it feels like in these higher level math videos

    • @apokalypthoapokalypsys9573
      @apokalypthoapokalypsys9573 Місяць тому +9

      ​@@blasphemer_amonit's not a reference to "2021 Abu Dhabi", it is a reference to the thousands of badly written movie scripts with tiresome clichés

  • @enderslice8378
    @enderslice8378 2 місяці тому +2029

    IT'S ALWAYS e LEAVE ME ALONE EULER

    • @patrickwienhoft7987
      @patrickwienhoft7987 2 місяці тому +675

      I love that even in your furious use of caps lock you still have the respect for mathematics to properly write e as lower case

    • @enderslice8378
      @enderslice8378 2 місяці тому +513

      My rage doesn't make me disregard how symbols work. I have standards.

    • @pagjimaagjinen9733
      @pagjimaagjinen9733 2 місяці тому +181

      This smaller case e makes it seem like you say e calmly, and shout the rest

    • @kingnoob3503
      @kingnoob3503 2 місяці тому +46

      Euler will chase you for your life

    • @interconnected.
      @interconnected. 2 місяці тому +25

      I love this reply lmao 🤣

  • @deepdrag8131
    @deepdrag8131 2 місяці тому +754

    “A dark room with several men who aren’t wearing any hats.”
    Oh! The nightmares I’ve had about that!!

    • @WrathofMath
      @WrathofMath  2 місяці тому +57

      😂😂

    • @McDonalds-Empty-Cup
      @McDonalds-Empty-Cup 2 місяці тому +38

      Nightmares? I had fantasizes about that

    • @-danR
      @-danR 2 місяці тому +10

      That's Inception level 1
      The deeper nightmare is none of them getting their hats back.
      This is a branch of Applied Mathematics I never knew I needed.

    • @CliffSedge-nu5fv
      @CliffSedge-nu5fv 2 місяці тому +12

      Oh, _hats_ not wearing hats, right. That's what they aren't wearing.

    • @davidwright8432
      @davidwright8432 2 місяці тому +3

      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!

  • @Frownlandia
    @Frownlandia 2 місяці тому +399

    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.

    • @WrathofMath
      @WrathofMath  2 місяці тому +91

      True, but one has to worry about the hats going wherever they want to, a place the men may never find

    • @davegrimes3385
      @davegrimes3385 2 місяці тому +43

      And, if they don't dance, well they're no friends of mine

    • @madacsg
      @madacsg 2 місяці тому +1

      It will be definitely a SAFETY DANCE! 😉🤗😄 ua-cam.com/video/1p_BvaHsgGg/v-deo.html

    • @spectria.limina
      @spectria.limina Місяць тому +20

      I'm glad these men are so safety-conscious while dancing.

  • @Hyreia
    @Hyreia Місяць тому +100

    "A derangement" is such a hilarious term for something in math. I love it.

    • @travcollier
      @travcollier Місяць тому +2

      I would bet whoever came up with subfactorials was just goofing around.

  • @Ryanisthere
    @Ryanisthere 2 місяці тому +197

    0:38 this is getting very spicy
    several men without hats

    • @WrathofMath
      @WrathofMath  2 місяці тому +51

      Spicy indeed, in a world of hatless men, where do we find God?

    • @the_siili
      @the_siili 2 місяці тому

      ​@@WrathofMaththe God is a man without a hat

    • @tweer64
      @tweer64 2 місяці тому +14

      Did they leave their friends behind?

    • @Akio-fy7ep
      @Akio-fy7ep 2 місяці тому +11

      @@tweer64 If their friends don't dance, well they're ... no friends of mine.

    • @HFIAPY
      @HFIAPY Місяць тому +1

      *"There's no party like a Diddy party"* 😏

  • @whamer100
    @whamer100 2 місяці тому +747

    as a programmer, seeing "!n" just makes me think "logical not n" which evaluates as either 0 or 1 depending if its non-zero lmao

    • @cosmnik472
      @cosmnik472 2 місяці тому +34

      bitwise not also works

    • @dapcuber7225
      @dapcuber7225 2 місяці тому +19

      I'd be more inclined to think bitwise not as I usually write logical not as ¬ but yeah this would be confusing 😭

    • @kuwi1061
      @kuwi1061 2 місяці тому +25

      ​@@cosmnik472 For that ~ is used like this ~n

    • @litfill54
      @litfill54 2 місяці тому +5

      or strict n in haskell

    • @JdeBP
      @JdeBP 2 місяці тому +5

      Those who have programmed in some home computer BASICs will be thinking "pling n".

  • @ReinOfCats
    @ReinOfCats 2 місяці тому +67

    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)

    • @Dexaan
      @Dexaan 2 місяці тому +8

      I remember mentally calculating critical chance for multiple critical chances way back in the Warcraft 3 days and my rough math always seemed to end up near either 33% or 66%

    • @Alphabetatralala
      @Alphabetatralala Місяць тому +1

      Geometric distribution is a bitch.

  • @James2210
    @James2210 2 місяці тому +171

    Brings a whole new meaning to "Statements dreamed up by the utterly Deranged"
    (from the "stop doing math" meme)

    • @trenixjetix
      @trenixjetix Місяць тому

      I love the goku voiced version

  • @der.Schtefan
    @der.Schtefan 2 місяці тому +259

    A dark room with many men in it... Sounds like a Berlin nightclub.

    • @empathogen75
      @empathogen75 2 місяці тому +16

      And then e showed up.

    • @nicholasiverson9784
      @nicholasiverson9784 2 місяці тому +5

      @@empathogen75 only if it was one of Those clubs, with hatless men.

    • @coyets
      @coyets 2 місяці тому +5

      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.

    • @matthiasschulz3569
      @matthiasschulz3569 2 місяці тому +2

      I feel like there's a Flight of the Conchords song about this kind of situation ...

    • @8bits59
      @8bits59 Місяць тому

      ​@@coyetsyes, obviously. Did you miss the joke?

  • @carly09et
    @carly09et 2 місяці тому +241

    This is Weird : I was just doing some economic modelling and this result popped out. This explains the entropy of a market, as it estimates states.

    • @WrathofMath
      @WrathofMath  2 місяці тому +42

      That sounds very interesting, will have to research

    • @joshuaiosevich3727
      @joshuaiosevich3727 2 місяці тому +17

      You might find it useful that derrangements can be represented by an integral: int_{0}^{/infty} (e^(-x))(x-1)^ndx

    • @carly09et
      @carly09et 2 місяці тому +12

      @@joshuaiosevich3727 That's true. But I was finding the ratio by construction - ie a fractal result. This explained why the result converged on this.

    • @815TypeSirius
      @815TypeSirius Місяць тому +1

      ​@@joshuaiosevich3727 linear algeba ruins everything

    • @joshuaiosevich3727
      @joshuaiosevich3727 Місяць тому +1

      @@815TypeSirius I'm afraid I'm too dense to get what you're saying.

  • @KookyPiranha
    @KookyPiranha 2 місяці тому +111

    this is literally how i process every combinatorics problem hoping all the terms cancel out when they dont

    • @meatyman4803
      @meatyman4803 2 місяці тому +3

      Finding this guy in a math video is a fever dream

  • @asmithgames5926
    @asmithgames5926 2 місяці тому +53

    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.

    • @WrathofMath
      @WrathofMath  2 місяці тому +28

      With how big dating pools are now due to modern transportation and dating apps, I still have a significant amount of work to do 🤣

    • @robo3007
      @robo3007 2 місяці тому +6

      It also marks the point where the graph y = x^x stops decreasing and starts to increase

  • @Frahamen
    @Frahamen 2 місяці тому +60

    that's quite a deranged equation.

  • @Kapomafioso
    @Kapomafioso 2 місяці тому +15

    11:00 just a note: I think here either the sum should be marked with i < j (not i =/= j), or, if written in this way, there should be 1/2 in front of it. You don't want to repeat elements: A1 intersection A2 and then A2 intersection A1. But the result is correct, the non-repeating sum over i < j is equal to n choose 2.

    • @scottmiller2591
      @scottmiller2591 Місяць тому

      Came here to say this. The n choose 2 fixes this, since it ignores permutations of the choosing, which is why even though the left hand side is wrong, the right hand side is correct. This also means the higher order indices in the summation later on for the inclusion exclusion formula need to be written as i < j < k ... for all free indices from the set, or put another way 1 =< i < j < k ... =< n.

  • @briancooke4259
    @briancooke4259 2 місяці тому +43

    Your pace and depth are perfect. I would not attempt those formulas on my own, but you made perfect sense if them. Thank you so very much!

  • @incription
    @incription 2 місяці тому +27

    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.

    • @WrathofMath
      @WrathofMath  2 місяці тому +9

      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 😂

  • @askod420
    @askod420 Місяць тому +24

    1:04 say that again

  • @luinérion
    @luinérion 2 місяці тому +21

    5:38 "it will blow your socks off"
    What a relief that it won't blow my _hat_ off 😌

    • @WrathofMath
      @WrathofMath  2 місяці тому +8

      The hats are long gone at this point 😂

  • @furrball
    @furrball 2 місяці тому +78

    I wasn't wearing socks and my toes blew up.

    • @WrathofMath
      @WrathofMath  2 місяці тому +20

      Sorry 😞

    • @VioletRM
      @VioletRM 2 місяці тому +13

      a small price for science

    • @furrball
      @furrball 2 місяці тому +6

      @@WrathofMath np, that solved having to trim toenails.

    • @Thk10188965
      @Thk10188965 2 місяці тому +2

      Unfortunate

    • @Dexuz
      @Dexuz 2 місяці тому +5

      Your fault for having toes

  • @Connorses
    @Connorses 2 місяці тому +16

    i was scared for just a second when you started drawing that hat rack

    • @-danR
      @-danR 2 місяці тому +1

      I was wondering how he would manage to hang the hats on it.

  • @mondaypunday
    @mondaypunday 17 днів тому +1

    Well paced, engaging, and playful. Euler would be proud.

  • @blacklistnr1
    @blacklistnr1 2 місяці тому +14

    I appreciate the gentle transition to combinatorics via hats and Zeus's wrath :))

  • @IRLtwigstan
    @IRLtwigstan 2 місяці тому +5

    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.

  • @dukenukem9770
    @dukenukem9770 2 місяці тому +48

    I’m excited to integrate a “deranged“ math lesson into my sons home-study curriculum!

    • @lollol-tt3fx
      @lollol-tt3fx 2 місяці тому +13

      poor son😂

    • @isavenewspapers8890
      @isavenewspapers8890 2 місяці тому +7

      Oh cool. I love taking an integral of the subfactorial function.

    • @TamWam_
      @TamWam_ Місяць тому

      i'm excited to show this to my math teacher

  • @truebino
    @truebino 2 місяці тому +9

    The night theme of Hateno village made this an emotional hat story for me...

    • @WrathofMath
      @WrathofMath  2 місяці тому +1

      Takes me back to sophomore year of college

  • @245trichlorophenate
    @245trichlorophenate Місяць тому +4

    This is why nobody likes mathematicians. They mix everybodies hats up when noone is looking.

  • @geoffstrickler
    @geoffstrickler Місяць тому +2

    Great explanation, you show how it’s calculated, how it’s relevant, and the end result is actually simple to calculate.

  • @AusTxMale
    @AusTxMale 2 місяці тому +4

    That was well worth the wait. Thanks for such a fun explanation.

  • @jonathanallan5007
    @jonathanallan5007 2 місяці тому +9

    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.

    • @bitonic589
      @bitonic589 2 місяці тому

      Omfg it's really everywhere

    • @Kapomafioso
      @Kapomafioso 2 місяці тому

      Why would there be a peak at 73% as well?

    • @jonathanallan5007
      @jonathanallan5007 2 місяці тому

      @@Kapomafioso Second most popular "random" number from 0 to 100.

  • @KylerRaineP.Nangit74
    @KylerRaineP.Nangit74 2 місяці тому +26

    6:39 WHAT YOU'RE LETTING AI?!?!?!

    • @JuniperHatesTwitterlikeHandles
      @JuniperHatesTwitterlikeHandles 2 місяці тому +2

      AI's taking everyone's jobs, not even the set of all permutations where i is fixed is safe....

    • @WrathofMath
      @WrathofMath  2 місяці тому +8

      gotta do what you gotta do

  • @NestorCustodio
    @NestorCustodio 2 місяці тому +27

    I will never write a "3" or a "2" as legibly as this man did @ 2:30. 😢

    • @WrathofMath
      @WrathofMath  2 місяці тому +16

      I was cooking with those

    • @CliffSedge-nu5fv
      @CliffSedge-nu5fv 2 місяці тому

      I did once, and then never again. 😢

    • @terrybull3798
      @terrybull3798 2 місяці тому +2

      However; not equal looked indistinguishable from +/- @11:30 :)

  • @HFIAPY
    @HFIAPY Місяць тому +1

    0:42 "there's no party like a Diddy party" 💀

  • @stephenspackman5573
    @stephenspackman5573 2 місяці тому +2

    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.

  • @elreturner1227
    @elreturner1227 Місяць тому +1

    e and pi are the most interesting numbers like “oh you have a weird value for this problem which no field of mathematics even comes close to?” Plug in e or 1/e or e^2 or the eth root of e or e^pi just keep plugging variations of e and pi and it’ll probably work and if it doesn’t even Euler can’t help you

  • @davidbelk46
    @davidbelk46 2 місяці тому +2

    So, if you need to calculate a subfactorial for some reason and you wish to save a lot of time, just divide the factorial by the number e then round to the nearest integer. It works every time.

  • @raphaeld9270
    @raphaeld9270 2 місяці тому +1

    Seems like a useful way to calculate the secret santa arrangements where no-one gets its own gift.
    Thanks for the video, I wasn't sure if it was a joke video at first, but it was pretty interesting.
    You earned a sub :D

  • @yan-amar
    @yan-amar 2 місяці тому +17

    What I love about mathematicians is that they'll mention Greek gods like it's 1200 BC.

    • @thedoublek4816
      @thedoublek4816 2 місяці тому +2

      When the Wrath of Zeus meets the Wrath of Math.
      "Our fight will be legendary!"

  • @uelssom
    @uelssom Місяць тому +2

    If you gather enough men without hats, they can do the Safety Dance

  • @MPBSODIYL
    @MPBSODIYL 2 місяці тому +5

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

    • @Dexaan
      @Dexaan 2 місяці тому +3

      I bet the proof wouldn't fit in the margin, either.

    • @danredebeer
      @danredebeer Місяць тому

      is the expectation not just 1/n! ?

  • @ruin1307
    @ruin1307 Місяць тому

    Love how this is done sooo much easier with like a for loop and if statement in programming

  • @danquella330
    @danquella330 2 місяці тому +1

    I kept waiting for the hilarity, and was left with the impression that you math types are easily amused!

  • @DrMikeE100
    @DrMikeE100 Місяць тому +1

    Beautiful.... Thanks you! (Dr Mike Ecker, retired PSU math professor)

  • @gerald56
    @gerald56 2 місяці тому

    Thanks for the presentation! This is a clssical gem of discrete mathematics.

  • @George-tk2hj
    @George-tk2hj Місяць тому

    This was really fun, and the notation wasn’t too difficult. Thanks!

  • @mab9316
    @mab9316 Місяць тому

    Beautiful explanation. Thank you.

  • @chrisstott3508
    @chrisstott3508 Місяць тому

    A wonderful and beautiful result, thanks.

  • @RadicalCaveman
    @RadicalCaveman Місяць тому +2

    1/e is so hilarious, I'm amazed there isn't a sitcom about it.

  • @graydhd8688
    @graydhd8688 Місяць тому

    Funny, i didn't know subfactorials were a thing but I'm learning about recursion in programming and this is helping me get more perspective on a specific problem I've been stuck on for two days. Essentially i was trying to figure out a formula to assess all permutations of something and worked out the subfactorial without knowing it had a name, i just noticed it was similar to a factorial but adding.

    • @graydhd8688
      @graydhd8688 Місяць тому

      I didn't get the formula on my own, just that the subfactorial is involved lol

  • @fariesz6786
    @fariesz6786 2 місяці тому

    this was satisfying bc when saw the approximation before it felt so random yet underwhelming (like what, you just multiply the factorial by an essentially constant factor?)
    but this explains neatly where it came from

  • @francocatanzaro96
    @francocatanzaro96 2 місяці тому +1

    4:23 I hear your Easter Egg of putting the Select File Theme from SM64, as Pannenkoek does! Very clever!

  • @MooseEatsBear
    @MooseEatsBear Місяць тому

    Man. I thought I was doing really well with understanding this and then I got to the beginning of the explanation at 6:30. You explain things very well but sadly there is a minimum bar of familiarity with the subject required that I just don't have. C'est la vie!

  • @NoriMori1992
    @NoriMori1992 Місяць тому +3

    Enjoyed the SM64 music 😊

  • @bud-yo
    @bud-yo Місяць тому +1

    Oh wow that changes a lot

  • @nullmeasure6155
    @nullmeasure6155 2 місяці тому

    Hot example, honestly. This is also the most lucid presentation of inclusion-exclusion I have ever seen. Well done.

  • @VAFLEG
    @VAFLEG 2 місяці тому +93

    1:03 there's hawk tuah🗣️🗣️

  • @Dagobah359
    @Dagobah359 Місяць тому +7

    5:34 Missed opportunity to say it would blow our hats off. Booo!

    • @WrathofMath
      @WrathofMath  Місяць тому +2

      I will not be tempted by your cheap puns!

  • @MVRX.
    @MVRX. Місяць тому

    Great explanation!

  • @GayAnnabeth
    @GayAnnabeth Місяць тому

    oh hey, alternating harmonic series, love to see it

  • @SquidLikesTalking
    @SquidLikesTalking 2 місяці тому +2

    What a fantastic video, such an enjoyable watch, the mario 64 music was just the cherry on top

    • @WrathofMath
      @WrathofMath  2 місяці тому +2

      Thanks so much! Trying to get the music at the right volume, I think I got it just about right this time.

    • @dottn
      @dottn Місяць тому

      I didn't realize there was music until I saw these comments.
      I was listening at a lower volume, and your voice was quite clear, but there was this annoying beeping sound like a reversing truck every now and then.
      Turned out to be the high notes of the music track starting at 3:50, from which only they were audible to me.

  • @ValeBridges
    @ValeBridges Місяць тому +1

    2:25 that sounds deranged

  • @topquark22
    @topquark22 2 місяці тому

    Great expanation of the inclusion/exclusion proncople

  • @TheDavidlloydjones
    @TheDavidlloydjones 2 місяці тому +1

    As is obvious from their accurate, lifelike portraits, the men in this diagram are misidentified. They are actually Man 47, Man 312, and Man 14,703.
    1. 2. and 3 all died in the pneumonia epidemic of 1919.

  • @mattadams2292
    @mattadams2292 Місяць тому

    At about the 18:55 mark, when reindexing to start at i=0 instead of i=2, wouldn't this change the ending index to (n-2) rather than n?
    Once we're considering the limit as n goes to infinity, this change no longer matters, so the 1/e result is unchanged.

  • @Manisphesto
    @Manisphesto 2 місяці тому +45

    I now wanna question what n!n is, is it n! × n, or n × !n...

    • @callyral
      @callyral 2 місяці тому +24

      parentheses are your friends

    • @matino0820
      @matino0820 2 місяці тому +7

      Id say n × !n bc you put numbers before variables like 2x

    • @mathguy37
      @mathguy37 2 місяці тому +13

      !n!

    • @tobithesergal
      @tobithesergal 2 місяці тому +2

      stuff like this is why im not better at math, that’s very ambiguous

    • @Abdullah-uszZZ
      @Abdullah-uszZZ 2 місяці тому +3

      well, clearly, the bodmas order wasn't enough 😢😂

  • @stickmaker10111
    @stickmaker10111 25 днів тому

    Dude your penmanship is so nice

  • @SatisfyingWhirlpools
    @SatisfyingWhirlpools 2 місяці тому

    My favorite part about it is that the sequence appears more slightly strange (the terms don’t all end in 000…)

  • @thetruetri5106
    @thetruetri5106 2 місяці тому +2

    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?

    • @buddermybacon
      @buddermybacon 2 місяці тому

      Latin squares

    • @thetruetri5106
      @thetruetri5106 2 місяці тому

      @buddermybacon well latin squares only have n derangements not every possible one though

  • @WhyCatsCantFly
    @WhyCatsCantFly Місяць тому

    the file select theme in the background makes this so beautiful

  • @ErikYoungren
    @ErikYoungren 2 місяці тому +2

    5:33 Now I just want to know how likely is it that none of the viewers get both their socks back?

  • @ThePsyko420
    @ThePsyko420 2 місяці тому +1

    I gotta say when i read the title I was expecting the same as factorial except with division instead of multiplication

  • @Jacko_hedgehog
    @Jacko_hedgehog 2 місяці тому +1

    This video amazed my mom as I watched this since she never heard of subfactorials before

  • @kinexkid
    @kinexkid 26 днів тому

    I love how at 2:00, the row for the hats was above the row for the men like they were wearing them lol. I hope that was intentional

  • @HelPfeffer
    @HelPfeffer Місяць тому

    0:25 yes, it means 1 factorial times n = n

  • @rodrigoqteixeira
    @rodrigoqteixeira 2 місяці тому

    Nice. You can instead of divising by e multiply by the precomputed 1/e or e^-1

  • @micknamens8659
    @micknamens8659 2 місяці тому +5

    The "key game" parties for tolerant couples were popular in the US in the 70s.
    The men put their car keys in a pot and each woman drew a key from the pot and drove home with this man to have a little fun together.
    Different use case, but the math is the same 😊

  • @tomkerruish2982
    @tomkerruish2982 2 місяці тому +22

    Clearly, they were not doing the Safety Dance.
    (Gen X earworm, activate!)

    • @surkh
      @surkh 2 місяці тому +2

      Well, then they're no friends of mine!

    • @lulairenoroub3869
      @lulairenoroub3869 2 місяці тому +1

      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

    • @porl42
      @porl42 2 місяці тому +1

      I had exactly the same thing in my head 😂

    • @RandyKing314
      @RandyKing314 2 місяці тому +1

      i was trying to work out a comment like this…well played!

  • @MURDERPILLOW.
    @MURDERPILLOW. Місяць тому

    1:32 oh god there was a puzzle like this in proffessor layton, you had to figure out how likely it was that 2 people got their hat but one person didnt. I guessed EVERY number from 1-100% only to realise it was 0%

  • @active2-0001
    @active2-0001 Місяць тому +1

    Slide to the left!
    Exclamation point:
    !
    !
    !
    !

    • @nmatavka
      @nmatavka Місяць тому

      Now Charlie Brown!

  • @MaxwellClarkeNZX
    @MaxwellClarkeNZX 2 місяці тому

    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.

  • @thesmilingbraniac4438
    @thesmilingbraniac4438 2 місяці тому +3

    12:45 writing (-1)^(j-1) feels illegal

  • @GreigaBeastDS
    @GreigaBeastDS Місяць тому

    What happens when we move the exclamation mark to the other side? I imagine it gets quieter instead of louder.

  • @thatkindcoder7510
    @thatkindcoder7510 Місяць тому

    Honestly amazed by how you could confidently go deep into a topic in such an entertaining way. Might be slightly jealous...

  • @lexacutable
    @lexacutable 2 місяці тому +1

    music credits?

  • @jamesbond_007
    @jamesbond_007 2 місяці тому

    Excellent video!!!

  • @verdatum
    @verdatum 22 дні тому

    In case no one else has mentioned it, really weird harmonics in the background music. It cuts through like an alarm signal on small speakers. Good content though!

  • @NexusSpacey
    @NexusSpacey 2 місяці тому +4

    This music is making me think I'm watching a Zullie the Witch video

    • @mjp121
      @mjp121 Місяць тому

      I was thinking panenkoek

  • @Solrex_the_Sun_King
    @Solrex_the_Sun_King Місяць тому

    4:29 I thought I was hearing noises at this point cause my brain was so bored, but it's actually Mario music that's extremely quiet in the background lol

  • @miezekatze3536
    @miezekatze3536 2 місяці тому +1

    the moment he said "the probability will surprise you" I thought "probably 1/e or sth like that"...

  • @Sgrunterundt
    @Sgrunterundt Місяць тому

    The chance of any person getting their own hat is 1/n. Thus the chance of every one not getting their hat is (1-1/n)^n.
    This has the well known limit of 1/e as n tends to infinity.

  • @Oyakinya-Izuki
    @Oyakinya-Izuki 2 місяці тому +5

    It's here!

  • @captaindapper5020
    @captaindapper5020 Місяць тому +1

    "it's the on left now"

  • @ollllj
    @ollllj 2 місяці тому

    do we have a mathertmatical sign for "total electrical resistance of parallel resistors", which is: inverse of all resistances, summed up, and the sum is then inverted again: (resistor1^-1+resistor2^-1...)^-1
    This also occurs (identical function) in "exponential smooth-step function" for "smoothing (more than 2) meta-balls or more complex signed-distance-fields" (commutatively), the simplest one one that is commutative and that allows for independent "sharpness" factors.

    • @julioaurelio
      @julioaurelio 2 місяці тому +1

      That's H(n)/n, where H(n) is the harmonic mean of n numbers.
      This operation also appears when finding the equivalent capacitance of capacitors in series.

  • @Lolly_Bingo69
    @Lolly_Bingo69 2 місяці тому

    20:05 I was just waiting for it (it was worth it)

  • @8bits59
    @8bits59 Місяць тому

    Was the file select music intended to be a reference? I really hope it was.

  • @timbeaton5045
    @timbeaton5045 2 місяці тому +1

    probably a dumb question. but is this extensible to continuous functions in a similar way to the Gamma function?

  • @FaerieDragonZook
    @FaerieDragonZook 2 місяці тому

    If you have a permutation of n elements, where element n is not a fixed point, you can form a permutation with n-1 elements by removing element n and 'sewing' the permutation back together: where f(a) = n and f(n) = b, then sew it by setting f(a) = b. If the original permutation was a derangement, then either the new permutation is a derangement or a = b. If a = b, then the set of n-2 elements where both n and a (=b) are removed is a derangement. Thus, !n = (n-1) × (!(n-1) + !(n-2)). This is contrasted with the equation n! = n × (n-1)!

  • @kylesnotepic
    @kylesnotepic Місяць тому +1

    that's called an admin command

  • @arnoldvanhofwegen2255
    @arnoldvanhofwegen2255 20 днів тому

    A better analogy would be people celebrating Christmas and picking a ballot with the name of a participant from a pot where nobody is supposed to pick the one with their own name.