Pi is Evil - Numberphile

2023 ж. 4 Қаз.
307 916 Рет қаралды

Featuring James Munro. See brilliant.org/numberphile for Brilliant and 20% off their premium service & 30-day trial (episode sponsor)
More links & stuff in full description below ↓↓↓
Dragons, Dice and Evil Numbers.
James Munro is Admissions and Outreach Coordinator for Maths at Oxford University. More about outreach at Oxford can be found at www.maths.ox.ac.uk/outreach
James Munro: people.maths.ox.ac.uk/munro/
Correction: the optimal number for the original 20-sided die problem is actually 35 (this is slightly better than 34). James has been fed to the dragon as punishment for this error.
More Pi videos: bit.ly/PiNumberphile
The Most Evil Number on Numberphile: • The Most Evil Number (...
Dragon Curve on Numberphile: • Dragon Curve - Numberp...
And another Dragon Curve on Numberphile: • Wrong Turn on the Drag...
Patreon: / numberphile
Numberphile is supported by Jane Street. Learn more about them (and exciting career opportunities) at: www.janestreet.com
We're also supported by the Simons Laufer Mathematical Sciences Institute (formerly MSRI): bit.ly/MSRINumberphile
Our thanks also to the Simons Foundation: www.simonsfoundation.org
NUMBERPHILE
Website: www.numberphile.com/
Numberphile on Facebook: / numberphile
Numberphile tweets: / numberphile
Subscribe: bit.ly/Numberphile_Sub
Videos by Brady Haran
Animation and editing by Pete McPartlan
Numberphile T-Shirts and Merch: teespring.com/stores/numberphile
Brady's videos subreddit: / bradyharan
Brady's latest videos across all channels: www.bradyharanblog.com/
Sign up for (occasional) emails: eepurl.com/YdjL9

Пікірлер
  • Correction: the optimal number for the original 20-sided die problem is actually 35 (this is slightly better than 34). James has been fed to the dragon as punishment for this error.

    @numberphile@numberphile7 ай бұрын
    • Thanks! I've been searching for an off-by-one error in my code :D

      @WilcoVerhoef@WilcoVerhoef7 ай бұрын
    • Haha, hope the Dragon liked fried James. 🙂

      @hassanalihusseini1717@hassanalihusseini17177 ай бұрын
    • It says James still works at Oxford in outreach. Is he doing this from within the dragon's belly?

      @Corwin256@Corwin2567 ай бұрын
    • @@Corwin256 It is dark in here, but on the plus side I've got more time to think about maths now! ^James

      @OxfordMathematicsPlus@OxfordMathematicsPlus7 ай бұрын
    • No graphic on screen for that?

      @Bill_Woo@Bill_Woo7 ай бұрын
  • The best number you can pick is Graham's Number. That way you can stall long enough for a rescue party.

    @imveryangryitsnotbutter@imveryangryitsnotbutter7 ай бұрын
    • it's actually kinda interesting, because with numbers this large you end up with the problem that you cannot inch towards such a number in this universe by adding small enough numbers. There's just not enough information storage space in the universe to represent all the intermediate steps. edit. so, peculiarly, you can throw the die enough times to reach graham's number, but you'd never in this universe know whether you actually did or not

      @Sopel997@Sopel9977 ай бұрын
    • >don't want to be in a dungeon forever >choose a number that keeps you there forever

      @avaraportti1873@avaraportti18737 ай бұрын
    • @@Sopel997 Would it be achievable in some different number base?

      @Eagle3302PL@Eagle3302PL7 ай бұрын
    • Can't see the dragon for the TREE(3)?

      @MindstabThrull@MindstabThrull7 ай бұрын
    • Too bad the dragon has a time machine which defeats any time problem

      @johnacetable7201@johnacetable72017 ай бұрын
  • What surprises me is that 21 is so unlikely even though it is exactly double the average, and it is the most likely to come up if you just have 2 throws.

    @ashwynwadhawan7908@ashwynwadhawan79087 ай бұрын
    • If you have exactly 2 throws, that is. The extra chance for numbers 1 to 20 comes precisely from the option of stopping after the first throw.

      @vojtechstrnad1@vojtechstrnad17 ай бұрын
    • You are correct to be surprised, as he seems to be calculating only the odds of hitting the number in a single throw after you get to within 20 of that number. He is not considering the chances of reaching the number in 2 or more additional throws once you get to within 20. Unless I missed something. So he is leaving out the possibility, for example of 1+1+1+1......+1+1 = 21.

      @GreylanderTV@GreylanderTV7 ай бұрын
    • @@GreylanderTV No, any way of reaching a number is included in the calculation, even 1+1+1+1+...+1+1 = 21.

      @vojtechstrnad1@vojtechstrnad17 ай бұрын
    • @@GreylanderTV The recurrence relation for 21 includes the probability that you were previously at 20 and rolled one, which already includes the probability that you were at 19 and rolled one, etc.

      @vojtechstrnad1@vojtechstrnad17 ай бұрын
    • @@GreylanderTV When he talks about "recurrence relations" he means that the computer will take his 1-roll equation and keep iterating it for an arbitrarily large number of rolls. This is why the other ways of reaching 21(or anything else) are included. If you didn't know this, then I get why it looked like he wasn't considering large numbers of rolls.

      @hakesho@hakesho7 ай бұрын
  • Is a number even more evil if it hits 666 twice because there is a zero in that spot?

    @stechuskaktus8318@stechuskaktus83187 ай бұрын
    • I like your thinking.

      @numberphile@numberphile7 ай бұрын
    • @@numberphile Then sqrt(90) would be triple evil, only counting decimal places

      @stechuskaktus8318@stechuskaktus83187 ай бұрын
    • Obviously 666 zeroes at that spot is the most evil.

      @mehill00@mehill007 ай бұрын
    • 664 Neighbors of the beast.

      @NeilABliss@NeilABliss7 ай бұрын
    • I thought along the same lines - How many numbers are "double evil" where summing the whole as well as decimals ends up evil where the Nth decimal position number arriving at 666 is the same number as the whole?

      @Omensan@Omensan7 ай бұрын
  • Brady you are such an amazing interviewer. Every single time I am in awe of your abilities.

    @polares8187@polares81877 ай бұрын
    • Yes I didn't get his intuition about it being most likely to be in between 20 and 40, but it turned out to be correct!

      @jschoete3430@jschoete34307 ай бұрын
  • I bet the editor had real fun with that wilhelm scream lol

    @Chriva@Chriva7 ай бұрын
    • 1:43

      @nixfriarr@nixfriarr7 ай бұрын
    • I can't believe I missed that! It was quiet in my defence though 😂

      @CombustibleL3mon@CombustibleL3mon7 ай бұрын
  • This problem actually is a fantastic application of dynamic programming. If you do it without it, the time complexity of your algorithm is O(20^n). With DP it is O(n)

    @liobello3141@liobello31417 ай бұрын
    • Even better, this is a (homogenous) linear recurrence (with constant coefficients) so has a closed form that you can compute in O(1)

      @tehdarkneswithin@tehdarkneswithin7 ай бұрын
    • @@tehdarkneswithin I guess that requires finding the 20 exact roots of a 20th order polynomial first? Please show us the way... 😉 (And it seems to assume we can do exponentiation in O(1), which I kind of doubt when we want to be exact...)

      @landsgevaer@landsgevaer7 ай бұрын
    • @@tehdarkneswithinwell. i was thinking of a different problem, the finding of the max for any kind of die. which was O(s^3). Yes finding the answer to your problem however is probably like O(s*log(n))

      @narwhalergames@narwhalergames7 ай бұрын
    • Based comment I've been grinding dp problems, when I close my eyes all I see is `if dp[i] >-1 return dp[i]`

      @XxZeldaxXXxLinkxX@XxZeldaxXXxLinkxX7 ай бұрын
  • If you can choose any number, just choose 0 and don't roll at all. Instant win.

    @toonkrijthe7565@toonkrijthe75657 ай бұрын
    • choose -1 so that you would roll forever knowing that you will never reach it. bore the dragon until it succumbs and frees you

      @drenz1523@drenz15237 ай бұрын
    • The problem raises when it would demand at least one roll from you.

      @alexhunter-meier@alexhunter-meier7 ай бұрын
    • @@drenz1523 that would be a instant lose, as it is exact. If above, you die.

      @claudetheclaudeqc6600@claudetheclaudeqc66007 ай бұрын
    • @@alexhunter-meier so it's result as a instant lost as well. Best would use X boom, guarantied win here!

      @claudetheclaudeqc6600@claudetheclaudeqc66007 ай бұрын
    • @@claudetheclaudeqc6600 oh right... darn it!

      @drenz1523@drenz15237 ай бұрын
  • Brady's intuition is amazing. Every time.

    @spockfan2000@spockfan20007 ай бұрын
  • Pi being evil is another reason to use Tau instead - It reaches 663 on the 139th digit and 668 on the 140th, nicely skipping over 666 as any well behaved number should do!

    @hoazl.@hoazl.7 ай бұрын
    • Pi being evil is another reason to keep using pi. Tau is not evil and therefore boring.

      @ashwynwadhawan7908@ashwynwadhawan79087 ай бұрын
    • Ten points to G̶r̶i̶f̶f̶i̶n̶d̶o̶r̶ Steve Mould

      @vasyan123@vasyan1237 ай бұрын
    • I'm OK with any additional reason to use Tau.

      @dryued6874@dryued68747 ай бұрын
    • Would you rather eat pi or a tau (towel)?

      @glasswingbutterfly@glasswingbutterfly7 ай бұрын
    • But I have no umbra formas why would I go tau

      @wewoweewoo@wewoweewoo7 ай бұрын
  • I've never seen this James Munro guy but please use him more! He has such a good, conversable tone, you can hear the excitement in his voice for maths as he speaks and he has the ability - seemingly - to speak to a range of ages and abilities and foster an enjoyment in maths. In fact this guy's probably what Rishi wants from all his teachers lol. Great video Brady. Interesting subject topic. I've literally just got home from a tutoring session with a student regarding probability so this was a nice continuation from that for me.

    @Matthew-bu7fg@Matthew-bu7fg7 ай бұрын
  • Update: I have verified the first 3000 values for N. Was able to compute each result in O(N^2) cause of knowing what place to start looking and an improved algorithm that does not compute things based on number of rolls. The answers to the question of what the best guess > N is seems to follow f(N) = round((e - 1)N + 4 - pi) for N=2...3000 EXCEPT N=232 and N=1233 both in which case the actual answer is f(N)+1 but thats not something im completely sure about since the difference in probability for N=232 is only 6.182648143449043e-12 and for N=1233 is a meager 5.937702586555904e-13. Edit: I am sure now. have tried with 112 bit percision floating point numbers.

    @narwhalergames@narwhalergames7 ай бұрын
    • The issue with picking the closest value to the peak is that doing that only works for specific kinds of functions. (They at least require that, around a peak x, f(x + k) = f(x - k).) It doesn't work for generalised functions, but if the function can be approximated by one that fulfills this property, it will usually get you the right answer. Any quadratic function meets this rule, so if the function has a very small third derivative, you can get away with it.

      @therealax6@therealax65 ай бұрын
    • You are wrong.

      @YashvardhanMemoryTricks@YashvardhanMemoryTricks5 ай бұрын
  • Interesting that the 0 is ignored in the average of the digits in pi. If you include it to get an average digit of 4.5, then the value 1/4.5 represents the expected number of times that a specific very high total will be hit, since it can be more than once if one or more zeros occur immediately after hitting the total.

    @MrBrain4@MrBrain47 ай бұрын
    • Ya but there is no 0 on a die

      @slo3337@slo33377 ай бұрын
    • @@slo3337 Any number can appear on any die. In fact, most 10-sided die are numberd from 0-9 (as well as some numbered from 00 to 90, that when paired with a 0-9 allow you to roll 0-99 for percentages). This would also perfectly simulate rolling a 9-sided die in this application (since we only care about the sum, not the number or rolls).

      @phiefer3@phiefer37 ай бұрын
    • @@phiefer3 Well, in a literal sense, the only numbers which can appear on a die... are the numbers which are marked on the faces of said die. A way to have a guaranteed victory against the video's dragon is by putting your chosen number (or a factor of it) on all the faces of the dragon's die.

      @BinaryBolias@BinaryBolias7 ай бұрын
    • If you want the probability that a given number will be hit, then zero must be ignored But if you want the expected number of digits, then zero should be included (He was only doing the former, not the latter)

      @Muhahahahaz@Muhahahahaz6 ай бұрын
    • Remember the recurrence relation? p(k) = 1/n p(k - 1) + 1/n p(k - 2) + ... + 1/n p(k - n). (In the digits example, n = 9.) If we allow zero, the probability becomes 1/(n + 1) (because there's now an additional possible outcome), and you get the extra addend for zero: p(k) = 1/(n + 1) p(k - 0) + 1/(n + 1) p(k - 1) + ... + 1/(n + 1) p(k - n). But p(k - 0) is obviously p(k), so you can move that term to the other side, and you get p(k) - 1/(n + 1) p(k) = n/(n + 1) p(k) on the left-hand side, meaning you have to divide all terms by n/(n + 1) - which gets you back to the original equation without zero.

      @therealax6@therealax65 ай бұрын
  • I love that you can screw around with numbers and get something meaningful out of sensless goofing around.

    @cheaterxl243@cheaterxl2437 ай бұрын
  • Pi might be evil, but Numberphile is a great good.

    @dskinner6263@dskinner62637 ай бұрын
  • Pi is evil?! Welp, looks like you gotta change your profile picture, Numberphile!

    @tigerdalandan@tigerdalandan7 ай бұрын
    • 😂

      @physicsstudent3176@physicsstudent31767 ай бұрын
    • Long live Tau

      @imveryangryitsnotbutter@imveryangryitsnotbutter7 ай бұрын
    • @@imveryangryitsnotbutterTau is 2*pi so does that mean it’s twice as evil?

      @fatcerberus@fatcerberus7 ай бұрын
  • Fun fact: 666 is a mistranslation; the actual number is 616. Is pi still evil by the more accurate texts?

    @shanedk@shanedk7 ай бұрын
    • Neat. Do you have a citation for that?

      @PJandBethany@PJandBethany7 ай бұрын
  • The calculation for the optimal dragon dungeon number can use pi too. Instead of (e-1)N, you can do the average of the die * pi to get close to the optimal guess. 6 sided die average is the sum of both sides divided by two, so 3.5, and 3.5 * pi = 11. Same for 20 sided die, but 10.5 * pi = 33, not 34

    @themaskedcrusader@themaskedcrusader7 ай бұрын
  • When the "many more sides die" was suggested, my mind immediately went to 600 - one of the 4D platonic solids.

    @Roxor128@Roxor1287 ай бұрын
  • Actually, 35 is the most likely for a 20-sided die, not 34.

    @vojtechstrnad1@vojtechstrnad17 ай бұрын
    • Thanks for the sanity check. Just wrote code to solve this myself and it was giving me 35.

      @sncxyz@sncxyz7 ай бұрын
    • Seeing the same by just rolling a lot in python: number of success for 32: 96891 number of success for 33: 97156 number of success for 34: 97212 number of success for 35: 97605 number of success for 36: 97127 1 million rolls each time.

      @Spoon_builds@Spoon_builds7 ай бұрын
    • Ah I wondered if anyone would spot this. Sorry - I have no idea why I said 34 on the day. In my defense, 34 and 35 have very very similar probabilities. ^James

      @jamesmunro@jamesmunro7 ай бұрын
    • Thought I messed up the Desmos graph when I saw 35. 34 - 0.09751 35 - 0.09767

      @asheep7797@asheep77977 ай бұрын
    • Perhaps because (e-1)*20 is closer to 34 than 35 the intuition would be that 34 is slightly better than 35. However, a bit of experimentation shows that 35 is favoured.

      @ianstopher9111@ianstopher91117 ай бұрын
  • Tried telling my maths teacher that maths was evil. She was unimpressed.

    @markedis5902@markedis59027 ай бұрын
  • The recursive rule can be seen as a Infinite Response Filter that just average the previous N values for a N sided dice. So it's a low-pass filter hence the smoothing effect.

    @cmuller1441@cmuller14417 ай бұрын
    • *an N-sided die

      @TheGreatAtario@TheGreatAtario7 ай бұрын
    • I'm so glad that someone picked up on the smoothing effect! This was not the right video to talk about how there's a jump discontinuity then a jump in the first derivative (in the continuous version), but it's the sort of thing I see when I look at the graph :) ^James

      @jamesmunro@jamesmunro7 ай бұрын
    • @@TheGreatAtario Yes - the singular noun is die, and its' plural is dice. "The dice are loaded", not "the dice is loaded".

      @hb1338@hb13387 ай бұрын
    • This is actually a fantastic observation, and could merit an entire video just exploring this topic itself.

      @tehdarkneswithin@tehdarkneswithin7 ай бұрын
    • For the values for 1 to 20, you can think of P(n) = 0 for -19 =< x =< -1 and P(0) = 1, which makes sense conceptually, since you always start with 0, and you never have negative numbers. It doesn’t make sense if you keep extending it backwards, though: you get that |P(n)| = 20 for n in [-39, 20], alternating in sign. And then you get P(-40) = 800.

      @felipevasconcelos6736@felipevasconcelos67367 ай бұрын
  • I like that under the digit definition of evil 666 itself is not an evil number

    @Slackow@Slackow7 ай бұрын
    • It's a lucky number.

      @ska4dragons@ska4dragons7 ай бұрын
    • That's the best trick of evil

      @JavierSalcedoC@JavierSalcedoC7 ай бұрын
    • The worst evildoer thinks they are righteous.

      @BobStein@BobStein7 ай бұрын
    • ​@@BobStein It's like humanity in general, it mostly does evil on this planet and thinks it's all right.

      @alexhunter-meier@alexhunter-meier7 ай бұрын
    • The Biblical reference relates 666 to “the number of the beast (or antichrist).” The Antichrist mimics the true Christ with stolen power & knowledge. So naturally the original 666 from the true Christ is not evil.

      @claycon@claycon7 ай бұрын
  • More videos from Mr. Munro please! I like this guy!

    @jthawken123@jthawken1237 ай бұрын
    • yes he's great

      @FedeDragon_@FedeDragon_7 ай бұрын
    • (waves) Hi! I've made about 70 episodes of an online maths club over on this channel, and I'm doing a bunch of livestreams on maths admissions test questions. ^James

      @OxfordMathematicsPlus@OxfordMathematicsPlus7 ай бұрын
  • See brilliant.org/numberphile for Brilliant and 20% off their premium service & 30-day trial (episode sponsor) James Munro is is Admissions and Outreach Coordinator for Maths at Oxford University

    @numberphile@numberphile7 ай бұрын
    • You might want to pin your comment so that everyone gets to read it.

      @godfreypigott@godfreypigott7 ай бұрын
    • Came here to say this, so instead I’ll just bump the comment with a reply.

      @picassodilly@picassodilly7 ай бұрын
  • Watching hardcore mathmeticians trying to do simple mental arithmatic is always amusing, a friend is doing a phd is maths and we always find it funny when he stuggles to work out his portion of the bill 😂

    @TheMotlias@TheMotlias7 ай бұрын
    • I enjoyed differential equations in college… But had to use my fingers or scratch paper to add and subtract. 😂

      @gwynethjones3503@gwynethjones35036 ай бұрын
  • You summarize every signals intelligence intuition I've felt throughout my life very well

    @learning_with_irving4266@learning_with_irving42664 ай бұрын
  • oh crazy, James was my guide at a cambridge summer school back in 2014!

    @jordanparker8922@jordanparker89227 ай бұрын
  • I really like this James, he reminds me of classic numberphile

    @matrixstuff3512@matrixstuff35127 ай бұрын
  • Great puzzle! Tried to solve it in my head before firing up python, and the incorrect heuristic I got was roughly (2 - 1/e)*N. I figured out the probabilities for 1 through 20 to be P(x) = p*(1+p)^(x-1), where p = 1/20, which are exponentially increasing. Then P(21) would be the average of P(1) through P(20), and so on. The approximation I then made was that the maximum probability among P(21) through P(40) would be the average starting from the first number between 1 and 20 that had an above-average probability (i.e. more than P(21)), and if you work through the math on that, this would give an optimal value of N + log(e-1)/log(1+p), in the limit as N becomes large; and using series expansions this is roughly (2 - 1/e)*N. This is an approximation because the probabilities P(21) through P(40) are also (initially) increasing, so instead of finding the first x such that P(x) > P(21), we should find the first x such that P(x) > P(x+20). But that seemed too complicated to think about. Pleasantly surprised to see the actual correct heuristic also involves e, and to be more specific, a simpler expression of e that lies between 1 and 2!

    @johnchessant3012@johnchessant30127 ай бұрын
  • I heard the Wilhelm scream. You didn't slip it past us.

    @ruidh@ruidh7 ай бұрын
  • Putting this challenge in my D&D game!

    @felipea.barretto7503@felipea.barretto75037 ай бұрын
    • That is a bit meta. The dragon in the game is asking the characters to choose numbers for dice rolls which the players then perform on behalf of the characters.

      @ianstopher9111@ianstopher91117 ай бұрын
  • Really fun little problem and approach!

    @agargamer6759@agargamer67597 ай бұрын
  • Excellent video. I don't believe I've seen a video with James before, but that was really an excellent topic, and made entertaining! Would live to see more. My first intuition was that this had to do with partitions, but it doesn't seem needed (or maybe you can use them but it's overkill for this particular topic as you can use more traditional methods?). Cheers,

    @guillaumelagueyte1019@guillaumelagueyte10197 ай бұрын
    • I'm pretty sure that expanding that recurrence to a non-recurring version requires solving partitions along the way, but that's just my intuition.

      @therealax6@therealax65 ай бұрын
  • What a great video for Spooktober! Thanks Brady

    @CombustibleL3mon@CombustibleL3mon7 ай бұрын
  • It got cute there at the end. Your intuition at the start was so good! Exactly the right reasoning that led you to the right conclusion and you got there quickly while I was still pondering. Now I'll never know if my intuition was gonna be that good! haha cheers

    @claykellogg5372@claykellogg53727 ай бұрын
  • If the dragon let you choose 2 target numbers upfront, what would the best choices be for a 20-sided die? Will they maybe be 34 & 35, or will they be spread out?

    @ballenf@ballenf7 ай бұрын
    • That's a really good question. I thought it would obviously be 34 and 35 but the more I think about it the more I'm unsure.

      @byzatic8507@byzatic85077 ай бұрын
    • My intuition tells me that since the average roll of a d20 is 10.5, choosing 33 and 34 is the best option. To explain why spread out numbers wouldn't work, imagine the dragon gave you 10 numbers to choose. You could choose any 10 random numbers, or you could choose 10 numbers around 34. Since we know from this video that 34 is the best choice, this gives us 4/5 numbers to select as a sort of "early exit", and the other 5/4 numbers as a "late exit", essentially allowing our number to "fall through" a "bigger hole"

      @thefidgetspinnerofdoom@thefidgetspinnerofdoom7 ай бұрын
    • That’s an interesting question because you want to pick two that are both likely but cover different sequences of rolls.

      @jakobr_@jakobr_7 ай бұрын
    • Right. P1 + (P2 | !P1). Interesting.

      @mrjava66@mrjava667 ай бұрын
    • This is an excellent follow-up question. ^James

      @jamesmunro@jamesmunro7 ай бұрын
  • a formula would really be best for comprehension, extension, and application.this is A start: with r rolls of an s sided dice the probability that the rolls' result sum above total t is given by ... this would be very helpful on a type on functor category scheme i'm looking into.

    @aidandanielski@aidandanielski7 ай бұрын
  • 1:43 obligatory Wilhelm scream

    @Muhahahahaz@Muhahahahaz6 ай бұрын
  • Since (e-1)N leads to an approximation, just use √3N

    @willemkoning@willemkoning7 ай бұрын
  • That dragon dice problem feels like convolution is involved, but I cant really put my finger on it

    @danielhogendoorn1134@danielhogendoorn11347 ай бұрын
  • Missed a great chance for a Matt Parker cameo with whatever highest number fair die he created a while ago.

    @johnboyer144@johnboyer1447 ай бұрын
  • Right on. Thanks for sharing.

    @ruperterskin2117@ruperterskin21177 ай бұрын
  • There is a fragrance called Pi, by Givenchy (and created by one of the most prolific and successful perfumers: Alberto Morillas.) Pi smells really great, warm sweet, suitable for cold weather season, so this the best time to wear it in the northern hemisphere . I'd encourage all math/Pi enthusiasts to check it out.

    @raulsaavedra709@raulsaavedra7097 ай бұрын
  • Combinatorics comes to mind. Partitions in particular. With the added complexity of a limited number of faces in the dice. The discontinuities are borne in the denominator I believe… (There’s a scene about these partitions in the Ramanujen movie)

    @ricardolordelo3881@ricardolordelo38817 ай бұрын
  • Could you please include some reference links in the description so people who are interested in these problems can look more into them? I'm interested in the continuous generalization he mentioned, but I don't know how to search for this problem or the related work on it.

    @1ucasvb@1ucasvb7 ай бұрын
    • Let me know if you find anything - I'm the person in the video and I don't have a reference for this! Just a small bit of maths I did on the back of an envelope. Might have to write it up now it's on numberphile... ^James

      @jamesmunro@jamesmunro7 ай бұрын
    • @@jamesmunroAh, so this is something you came up with yourself? That's cool. How did you approach the continuous case?

      @1ucasvb@1ucasvb7 ай бұрын
    • ​@@jamesmunro I figured out continuous functions for (1) the segment for S between 0 and n: P_1(S) = (1 / n + 1)^S / (n + 1), with a maximum probability at the point (n, (n + 1)^(n - 1) / n^n), and (2) the segment for S between n and 2 n: P_2(S) = n^(-S) (n + 1)^(S - 1) - S n^(n - S) (n + 1)^(S - n - 2), with a maximum probability at the point ((n + 1)^(n + 1) / n^n + 1 / ln(n / (n + 1)), -(n / (n + 1))^(n - n^(-n) (n + 1)^(n + 1)) / (e (n + 1)^2 ln(n / (n + 1)))).

      @yeoman588@yeoman5887 ай бұрын
  • Re: Evil I tried doing my own and wasn't getting 666, but then saw that you stuck a note in the animation about ignoring the leading number. Once I started from the decimal, we get matching results,. I went position by position for the first 200 are here are the counts of different end points (where I stopped adding up digits when adding the next one puts the total over 666): 666: 45 665: 42 663: 25 664: 24 662: 20 660: 17 661: 15 659: 10 658: 2

    @ericrosen6626@ericrosen66267 ай бұрын
  • Thank you for using an accurate dragon cartoon

    @silverbiocide@silverbiocide7 ай бұрын
  • I appreciate the Wilhelm scream.

    @cliftonchurch6039@cliftonchurch60397 ай бұрын
  • I'd like to hear Matt Parker's position on whether the leading digit should be included in the evil check. I'd also be curious how the check is done with 10 and numbers larger than 10. Is everything before the decimal place tossed out, or just the first digit?

    @hoebare@hoebare7 ай бұрын
    • Matt obviously would have gone with 34, and gotten eaten before he could answer this.

      @jpdemer5@jpdemer57 ай бұрын
  • This is a cool bit of maths, I will try to remember it the next time I am trapped in a dungeon with an angry dragon and a dice.

    @abigailcooling6604@abigailcooling66047 ай бұрын
  • 11:04 I find it interesting that the corresponding decimal place is 12 squared

    @luketurner314@luketurner3147 ай бұрын
    • Yes, In Analog Clock, Hour Needle passes 2 times from 12... And there are 1440 minutes in a Day..

      @MuhammadFrazAslam@MuhammadFrazAslam7 ай бұрын
  • How can the recurrence relation for p_100 (at 4:20) be possibly correct beyond p_99? Numbers between 2 and 20 all have a different number of partitionings, as we Indeed later see, so their probabilities are not equal.

    @sternmg@sternmg7 ай бұрын
  • 12:34 The easiest way to make a 9-sided die is with a 9-sided prism and doming the ends so it can't land on the nonagonal faces.

    @1959Edsel@1959Edsel7 ай бұрын
  • Not discussed in the video, but a nice result anyway: the probability of hitting N with an N-sided die approaches e/(N+3/2) for large N.

    @ThePathNotTaken@ThePathNotTaken7 ай бұрын
  • Nice problem for a computer simulation. You have to be careful when you simulate a dice because what you get may not be evenly divisible by the number of sodes. The rng I use fills an integer with random bits which doesn’t work well if you want to simulate a dice with, say, 17 sides. So you have to discard some of the values close to the max value.

    @TheFrewah@TheFrewah5 ай бұрын
  • LOL the wilhelm scream at 1:43

    @adizmal@adizmal7 ай бұрын
  • I'm seeing the long term average strategy for huge values... sort of... however: You will always have a last roll - which either hits your value or exceeds it. (If it does neither, it isn't your last roll). When you are thus within range, there is ALWAYS a 1 in 20 chance of getting the right number. To put it another way, there is never a situation where more than one value on the d20 will end the game in a victory... so... all numbers are equal. Please explain how this is wrong, since it clearly seems to be.

    @leefisher6366@leefisher63667 ай бұрын
    • Oh, if you're allowing an interval now, I choose [1,20] inclusive.

      @leefisher6366@leefisher63667 ай бұрын
  • okay but bold of you to assume I wouldn't want to stay with the dragon forever

    @MPSpecial@MPSpecial7 ай бұрын
  • Amazing video! Btw, I'm in uni and just started learning matlab, how would we graph something like that in matlab? (if this is a stupid question pardon me👀)

    @diogomiguel6377@diogomiguel63777 ай бұрын
    • Two loops, an inner and an outer. The inner loop stops when your sum has reached a threshold value. The outer should be large enough so that matlab runs for a few hours. Keep track of the sums in arrays. Then divide by what the outer loop gives so you get something between 0 and 1. Now you can create a graph

      @TheFrewah@TheFrewah5 ай бұрын
  • James: "I don't know how to make a nine-sided die" Most recent Curiosity Box: "hold my light-year of water"

    @SorcerorNobody@SorcerorNobody6 ай бұрын
  • Good idea Sir

    @ashokdangol7457@ashokdangol74577 ай бұрын
  • A Parker Number is where the digits do not add up to ANY literary sum. Not 42, not 666, not 451...

    @BobStein@BobStein7 ай бұрын
  • Brady choosing 42 then there’s the Wilhelm’s scream during animation, welcome to nerdphile ;)

    @yesthatsam@yesthatsam7 ай бұрын
  • Really cool! I love it! I am going to work this into a game for sure! I don't understand that initial probability spike. How is it more likely to roll a 20 on a d20 than a 1?

    @NateSchoonoversAdventures@NateSchoonoversAdventures7 ай бұрын
    • That's because you can hit 20 with 1 throw (20), but if you miss it you can still get 20 with 2 throws (1 + 19, 2 + 18, etc), but if you miss it and if you are still below 20 you can get 20 with 3 throws, etc. Whereas to get 1 you only have one throw.

      @Tangwuji67@Tangwuji677 ай бұрын
    • If you notice the size of the jump in that graph, it's exactly 0.5, the initial value for rolling 1, which is equal for all numbers 1 to 20. So, essentially there is zero ways to add numbers to get 1, more ways to get each subsequent number, so the probably increases and increases, and at 20 the extra 0.5 suddenly DROPS OFF, and now you have a curve with no discontinuity, and just an extra 0.5 bonus for the initial 1 to 20.

      @kindlin@kindlin7 ай бұрын
    • That makes sense! I just missed that part. Thanks!@@Tangwuji67

      @NateSchoonoversAdventures@NateSchoonoversAdventures7 ай бұрын
  • its interesting to hear that Brady's intuition was something that had to be small because my mind immediately went that extremely large numbers could be better because there are more and more ways to reach that number. My intuition was telling me that it should be a very large multiple of 21 since it would be a multiple of the average roll (10.5) of a 20 sided die

    @Azide_zx@Azide_zx5 ай бұрын
  • Gonna implement this into my next DnD game.

    @WAMTAT@WAMTAT7 ай бұрын
  • My initial guess was 3 times the average of the faces, which would have rounded up to 32 for the 20-sided die and 11 for the 6-sided die. And now I'm wondering how well that scales up with the number of faces.

    @RussellThomason@RussellThomason7 ай бұрын
    • 3 times the average, where the average is (N+1)/2. So 3*(N+1)/2. Which expands to 1.5N + 1.5 They gave the exact answer as (e-1)*N, which is ~1.7N. Or 1.5N + 0.2N So your approximation works for values where 0.2N is about 1.5. When you get bigger N your approximation will deviate more and more. But it's not bad for a quick guess!

      @ericbarr734@ericbarr7347 ай бұрын
  • "Zeros dont really get you closer to your rolling total, they just delay the inevitable." 🤯

    @90sambabam1@90sambabam17 ай бұрын
  • 12:35 You can make an "any-sided" die by taking a pointy prism and create as many faces on the side as you need. Within reason, from 3 to 10 works fine.

    @cg21@cg215 ай бұрын
  • That's interesting. Intuitively I would have said, since the expected value of the dice is 10.5, you ought to go for a large value that is a multiple of that, so 84 or thereabouts. Something I noted - 10.5*3 is (rounded) 32, which is quite close to the actual ideal value 34. I wonder if that's coincidental or there's an underlying relationship.

    @kolkonut@kolkonut7 ай бұрын
    • Talking of rounded, 10.5 * π gets you even closer to 34...

      @FightingTorque411@FightingTorque4117 ай бұрын
    • @@FightingTorque411 And the average of a 6-sided die is 3.5 and multiplying it by π is ... 11! Code cracked?

      @AdelaeR@AdelaeR7 ай бұрын
    • @@AdelaeR Fascinating. Could there be a relationship between e and pi in this context, with respect to the (e-1)N heuristic? If I could get my hands on a spreadsheet, I'd love to tabulate the difference between pi*E[N] and (e-1)N for a range of N. It may prove to be a very interesting graph.

      @kolkonut@kolkonut7 ай бұрын
    • The stated code is (e-1)N ~ 1.7N. So pi*(N+1)/2 ~ 1.6N + 1.6 which will be in the ballpark of the above for small N, but gradually deviate more and more. Similarly, finding m so that m(N+1)/2 ~ 1.7N will be hit or miss for different N.

      @lowbudgetmaths@lowbudgetmaths7 ай бұрын
    • (N+1)/2*3 = 1.5N + C so also close by coincedence

      @NoNameAtAll2@NoNameAtAll27 ай бұрын
  • This guy taught me chaos theory

    @joshuaprice1@joshuaprice17 ай бұрын
  • The definition of evil number is corrected in the end of the video. The typical definition (by Pegg and Lomont) is that digits of the fractional part accumulate to 666 at some position (here the non-fractional digits, that is 3 for pi, was included). e, by the way is not evil by this definition.

    @foobar1500@foobar15007 ай бұрын
  • Wow! I estimated the best number would be either 22 or 33. Based on what I know from backgammon, the average roll would be approximately half the highest possible roll plus one (11). Then look at the multiples of 11 higher than 20 and less than 40.

    @MetroAndroid@MetroAndroid7 ай бұрын
  • Player 1 has a standard 6 sided die, sides labelled 1-6. Player 2 has a unique 6 sided die, with 5 sides labelled "0" and 1 side labelled "21" (Sum:1-6). The goal of the game is to reach a number, "x", or exceed that number, in the least rolls. What dice should you pick? Does it matter? Does the value of "x" have an impact on the dice you should choose?

    @SupachargedGaming@SupachargedGaming3 ай бұрын
  • I wonder. On a smooth graph, if we're using N-sided dice, what's happening between N and N+1? Does it tend to infinity? Or it's smoothness just breaks somewhere between these numbers? (where exactly?) Or it just doesn't exist in that range?

    @ghaydn@ghaydn7 ай бұрын
    • The graph jumps down a bit (jump discontinuity), it does not tend to infinity. Here are the exact formulas if you want to graph it yourself, where T is the target number and N is the number of sides: P(T,N) = ((N^(-1)+1)^(T))/(N+1) for 1=

      @Sugarush-bc4wh@Sugarush-bc4wh7 ай бұрын
    • The break occurs exactly right after T=N

      @Sugarush-bc4wh@Sugarush-bc4wh7 ай бұрын
  • It should be possible to envisage or even draw, and therefore construct, a fair n-sided dice (not die!), with equally sized faces, even though there's no classically named corresponding solid. Or am I wrong?

    @paulbennett7021@paulbennett70217 ай бұрын
  • Numberphile: Pi is evil Also, Numberphile (9 years ago): Pi is beautiful 😂

    @shahchintan420@shahchintan4207 ай бұрын
  • I'm curious. What if you had M number of dice that have D faces? So what is the probably of landing on a value greater than N*D?

    @Mthompson2100@Mthompson21007 ай бұрын
  • If you had a full set of dice (D6 D8 D10 D12 D20) and you can choose a different one for each roll, what number is best to pick then? Is there a strategy? What if to have to plan the sequence of rolls before you start?

    @SWebster10@SWebster107 ай бұрын
    • p=0.30013020833333337 when guess is 8 and your plan is to use: 8, 6, 10, 12, 20. (this is the optimum)

      @narwhalergames@narwhalergames7 ай бұрын
  • Legend is still Continuing

    @bobuxmeansrobux6789@bobuxmeansrobux67897 ай бұрын
  • Not a mathematician, and no experience with advance calculation. What occurred to me was adding the integers from 1 to 20. 1+2+3+4+......20 and that got me 210. 210 then halved to get the average of 105, which when divided by 3 = 35(also noticed the 10.5 average you mention is a factor of 105{10.5x10}). So out of curiosity : Total of integers on all faces/sides of die lets call "T" divided by 2 to get T/2 then divided by 3, something like (T/2)/3? The question is does this hold up on a greater sided die and or even on a twenty sided die with random integers?

    @stephensmith219@stephensmith2195 ай бұрын
  • I really like the animation!!

    @fierydino9402@fierydino94027 ай бұрын
  • Please inform about the latest status of ABC conjecture (!theorem)

    @user-vr8ln3rw8y@user-vr8ln3rw8y7 ай бұрын
  • What's even better than doing the math is just refusing the dragon's game. If he then tries to keep you there, it's wrongful imprisonment.

    @KarmasAB123@KarmasAB1233 ай бұрын
  • "The fractional part of Pi is evil, maybe the 3 saves it." There's a theology joke in there somewhere.

    @snakerattleroll6678@snakerattleroll66787 ай бұрын
  • That e-1 is not an integer is the house (or dungeon) advantage.

    @smylesg@smylesg7 ай бұрын
  • Coming soon on StandUpMaths... Rolling 20-sided dice!

    @backwashjoe7864@backwashjoe78647 ай бұрын
  • I'm gonna call this rule34 of dice 😈

    @TacticalPew@TacticalPew7 ай бұрын
  • And that's why we should be using tau instead. Periodicity of the circle for the win!

    @QuantumHistorian@QuantumHistorian7 ай бұрын
  • Mathematicians: here's the most statistically probable number you can get Me: the dragon never said I had to say what the number was out loud, I'll just the roll the dice 3 times and say the sum of the 3 rolls is the number I've chosen

    @Tjalian@Tjalian7 ай бұрын
  • That dice is an icosahedron one of the 5 platonic solids 😊

    @jonessenoj6753@jonessenoj67537 ай бұрын
  • more evidence for tau to replace pi

    @heathrobertson2405@heathrobertson24057 ай бұрын
    • Are you sure that-for this definition of evil-tau is not also evil?

      @PhilBoswell@PhilBoswell7 ай бұрын
    • @@PhilBoswell I haven’t check but I remain in hope

      @heathrobertson2405@heathrobertson24057 ай бұрын
  • Does anyone know the name of that problem? I would like to look at written math about that.

    @danodet@danodet7 ай бұрын
  • I was hoping the right answer to the dragon's riddle was somehow Pi related :'(

    @mattrenegar476@mattrenegar4767 ай бұрын
  • as long as the dragon is waiting, you get to live. the answer is bigger than the number of rolls you can make for the rest of your natural life

    @steubens7@steubens77 ай бұрын
  • Great Video! I stumbled over two things: 5:50 What does he mean by "You have to make 21 in two rolls"? That the highest probability is achieved with two rolls? Because of course there is also 5+5+11, 5+5+5+6, 21*1 etc. 11:30 He is talking about the average one digit makes in the summation of the digits, shouldn't zero be included here? Zero occurs with the same likeliness in Pi as all other digits, so the average should be 0+1+2+3+4+5+6+7+8+9/10 (Mind the divided by 10 instead of 9!). In effect, only 1/4.5 = 22.23 % of numbers are 3v1l, on average.

    @hpgeerdes@hpgeerdes7 ай бұрын
  • is it possible to get python code that show that 35 is the best sum to chooses in dice with 20 faces . my code show different answer

    @yzahavi1@yzahavi17 ай бұрын
  • Another level of irrelevance is to consider whether the number of the beast was actually 616.

    @lettersquash@lettersquash5 ай бұрын
  • I'd pick something like 9239328574395749 and leave once the dragon gets bored.

    @jeroenneve5807@jeroenneve58077 ай бұрын
KZhead