this post was submitted on 24 Nov 2024
386 points (98.2% liked)

xkcd

8885 readers
76 users here now

A community for a webcomic of romance, sarcasm, math, and language.

founded 1 year ago
MODERATORS
 

Look, you can't complain about this after giving us so many scenarios involving N locked chests and M unlabeled keys.

https://explainxkcd.com/3015/

top 43 comments
sorted by: hot top controversial new old
[–] NerdyPopRocks 2 points 1 day ago* (last edited 1 day ago) (1 children)

Everyone out here using a dice calculator, but can someone answer

  1. Given a value x in (0,1) is there a set of dice and AC such that sum(roll{n_iDv_i}) > AC has probability x?
  2. Is there a sequence of finite set of dice and sequence of some AC for which we can get arbitrarily close to any probability?
[–] hangonasecond 2 points 23 hours ago

irrational numbers will always be out of reach for a finite set of dice. I think if you restrict the set to the rationals, you will still run into trouble because there's a finite number of dice and an infinite number of primes, so there will always be a big enough prime whose value you will be unable to get on the denominator. E.g. if you restrict to only a d2 and d3, you can't get a denominator of 5 for your probability. So add a d5. Now you can't get a denominator of 7, and so forth.

But all the primes would suffice especially as you've excluded 1 in the set. Otherwise, include a D1 and you're golden.

To be extra clear, if you have an infinite set of dice, one for each prime, then you can attain a given probability using a finite subset of those dice. If you allow for the use of infinite dice and infinite rolls, my intuition says you can get the whole interval but let's think about it.

It's true that every real can be expressed as a convergent sequence of rationals, and that between any two real numbers there is at least one rational number. You can use this to construct a sequence of rationals that approaches the real numbers we want in the interval, and because we have all the prime dice and I have (not rigorously) proved this is enough to get any rational, we can roll any probability in our sequence. So we can get as close as we like to the real number.

[–] [email protected] 80 points 2 days ago* (last edited 2 days ago) (1 children)

For the probability that at least one arrow picked is cursed: 1/2 + 1/2 × 5/9 = 14/18 = 7/9. (The probability that you picked it the first time, plus the probability that you missed it the first time but picked it the second time).

a dice probability calculator tells me probability of 3d6 + 1d4 at least 16 is 2/9. So the DM is correct.

  • Sidenote: it doesn't matter whether you grab the arrows one at a time or with both hands at the same time. Unless your party is trying to figure out which arms to amputate.
[–] [email protected] 9 points 1 day ago (1 children)

The math is easier if you look for the probability that the arrows are safe. If you do it that way, it's simply 1/2*4/9, or 2/9.

[–] [email protected] 3 points 1 day ago

That is true. Cueball had asked the question in the way I described, but the check was done in the inverse which is easier to do the math on.

[–] deltapi 25 points 2 days ago* (last edited 2 days ago) (1 children)
[–] BreadstickNinja 8 points 1 day ago (1 children)

The second you let fly the arrow, you feel the burning in your fingers. The world around you fades as you look down in horror at the crimson thorns that dance on the surface of your hand. You hardly notice that the arrow met its mark - the goblin falls to the ground, pierced deep through its eye - as you, too, fall to your knees. You bellow in pain, the howling echoing through the cavern as the magical vine constricts, the thorns piercing into your flesh.

Roll for wisdom.

[–] deltapi 4 points 1 day ago (1 children)

Amazing. Ok, and...well at least I'm consistent? 3-1. A 20-sided die roll showing '3' and a modifier of -1

[–] BreadstickNinja 2 points 1 day ago* (last edited 1 day ago) (1 children)

You fail the saving throw. The curse takes hold of you, the Bane of Thorny Improbability, which damns its bearer to be eternally plagued by probability and combinatorics conundra in their adventures.

You know that you possess an antidote to stave off the worst effects of the curse, but you have three unlabeled flasks at your belt, all of which have an equal probability of being the cure. You choose a flask at random, but as you seek to dislodge it, one of the other flasks falls to the earth and shatters. The liquid eats through the rock of the cavern, giving off acrid smoke, and you recognize that the fallen vial was a deadly poison, not the cure.

Knowing that the second flask did not contain the cure, do you have a better chance of salvation by drinking the flask you originally chose, or switching to the remaining unfallen flask?

[–] [email protected] 3 points 23 hours ago

Monty-hall, I'm switching boss.

[–] Ostrakon 27 points 2 days ago* (last edited 2 days ago) (3 children)

You have a 1 in 2 chance of pulling a cursed arrow the first time.

If you pulled a cursed arrow the first time, the second arrow has a 4 in 9 chance to be cursed. Otherwise, it's 5 in 9.

Personally I'd have resolved this as a single d10 once, and rerolled a 10 on the second arrow. I haven't done the math to know if 3d6+1d4 <16 yields the same probability though.

[–] [email protected] 29 points 2 days ago (1 children)

Its xkcd so I assume Randall et al did the math.

From a play session perspective? If the GM is that good that they can mental math it, I would much rather be given one roll than a series of rolls. Ask anyone about their horror stories about grappling in 3e about how much that kills the game flow.

Also: The verbiage is ambiguous (less so if you have the context of how many attacks per round a player has and what feat they are using) but I think you can represent "I grabbed two at once" and "I grabbed one and then one" with a binomial coefficient. Been more than a minute but poking chatgpt to remember the notation (nCk) and it is likely representable as (5C2)/(10C2) which is approximately 22.2%.

As for the dice? I forget if the type of die meaningfully impacts this but 3d6+1d4=4-22. Whether a 16 maps to that 22.2% range is beyond my brain right now as this comment was mostly because I forgot the difference between nCk and nPk and felt like googling that.

[–] godot 5 points 2 days ago* (last edited 2 days ago) (1 children)

The type of dice used can meaningfully impact this. The chance of a 2 or 12 rolling 2d6 is 1/36, the chance rolling 1d8+1d4 is 1/32. The chance of rolling 7 on 2d6, the most common result, is 1/6. The chance of rolling a 5, 6, 7, 8, or 9 on a 1d8+1d4, all equally likely, is 1/8 each.

Unlike you I can’t begin to remember the elegant way to find this. I also assume Randall would have it at least close to right.

[–] AEsheron 3 points 2 days ago

Anydice.com can handle this stuff easily. As already pointed out in another comment, it does perfectly match. What it will not tell you is if you grabbed one or 2 arrows, though presumably a roll of 1-x could be used to say you got one, and x+1-15 means you got two.

[–] [email protected] 12 points 2 days ago* (last edited 2 days ago) (1 children)

I dm Call of Cthulhu, so simply roll a luck check.
The chance doesn't follow maths, it follows the whims of That Which We Do Not See.
And Randall has pushed his luck with them too far already.

[–] ggppjj 4 points 2 days ago* (last edited 2 days ago)

I was gonna say, sounds like a great use-case for quantum statistics. Until the roll, each arrow is in a superposition where it can be said to be simultaneously cursed and normal. Luck check for each shot until all of either are fully gone.

[–] [email protected] 1 points 2 days ago (1 children)

Yeah, d10 (1-5 cursed, 6-10 normal), then repeat with 1 or 10 being a reroll. I’m curious what the intent of the character was, whether they’re looking for a simple answer or something contrived like the DM’s answer.

[–] [email protected] 2 points 2 days ago (1 children)

then repeat with 1 or 10 being a reroll

or: repeat with the already rolled number being a reroll

[–] [email protected] 1 points 2 days ago

Sure, but I usually prefer high/low success/failure

[–] okamiueru 13 points 2 days ago* (last edited 2 days ago) (5 children)

I have never played ~~R&D~~ D&D (or, I did once, but had a bad experience), so bear with me.

Is it ever allowed to simply do the thing, instead of rolling dice? For example in this case, to place 5+5 tokens upside down, and pick two of them? Or fold pieces of paper, etc?

Edit: I meant D&D of course. Don't know where the R came from.

[–] [email protected] 2 points 1 day ago

Dices are only used if there is a fail condition.

Folding a paper doesn't have one.

Folding an crane for an origami competition does.

[–] [email protected] 17 points 2 days ago

Absolutely!

The rules are a base framework for the DM to build upon.

Also the scenario in the comic isn’t actual DnD it’s really a math problem phrased in a DnD setting using standard DnD dice. In a real game the DM would probably do something like what you described.

[–] [email protected] 8 points 2 days ago

You play the game with humans, you are "allowed" to do what ever you want and doesn't annoy the others. I like your idea with the tokens.

[–] [email protected] 4 points 2 days ago* (last edited 2 days ago) (1 children)

I'd absolutely allow something like that at my table. Something like this isn't going to have explicit rules, so even in a serious RAW (Rules As Written) game, the GM is going to have to come up with something. It's just that we all have dice and may not have the right setup for tokens, etc.

Really, the simple way to do it is have arrows #1-5 be the cursed ones. The player then rolls a D10 to see which ones are pulled, rerolling on repeat "arrows".

[–] wunami 3 points 2 days ago (1 children)

You have less arrows to pull from on subsequent rolls. You can't keep using a D10.

[–] [email protected] 4 points 2 days ago (1 children)

That’s why you reroll on already taken numbers. Or drop down a die size every two arrows.

[–] [email protected] 3 points 1 day ago

Now someone has to do the math on how many rolls on average it will take to resolve the action given the chance of rerolls.

[–] [email protected] 4 points 2 days ago* (last edited 2 days ago) (1 children)

The dm can make up whatever rules they want! That’s the great thing about it. I’ve never heard of anyone doing that, but in this case it sounds like a great idea to simplify the whole thing.

Edit: that’s also the terrible thing about it and if you have a bad DM they can make you miserable. That could be why you had a bad experience?

[–] okamiueru 1 points 2 days ago

I was joining a group of people who I didn't know all that well. I was keen to try the D&D experience, and somewhat follow the implied path by the DM. The others were more into the "sandbox" experience. So we ended up doing little more than burn down a tavern after 4 hours of playing. Probably helps if the DM goes through and figures out people's expectations. We were just kids tho. This was 20 years ago.

[–] [email protected] 1 points 1 day ago

Why would someone be carrying arrows that cursed the shooter? Is it a cursed quiver that has some benefit, but also has a chance of giving arrows that curse you? 

[–] givesomefucks 9 points 2 days ago (1 children)

Xkcd is smart, so I'm likely missing something.

But a random 2 out of 10, just roll two d10s and call it a day.

[–] Mozingo 18 points 2 days ago (2 children)

2d10 would be used if each arrow had a 10% chance of being cursed. But that's not the case. There are 10 arrows, five are cursed, and 2 are selected. Therefore the first arrow would have a 5/10 chance of being cursed, while the second selection would have either a 4/9 or 5/9 chance of being cursed depending on whether or not the first arrow was cursed.

To solve this, requires using combinatorics. There are 10 choose 2 (45) ways to choose two arrows, of which there are 5 choose 2 (10) ways to choose 2 arrows that are non-cursed. This works out to be 2/9 odds to pull two safe arrows. Which means you need to get funkier with the dice.

[–] givesomefucks 1 points 2 days ago (1 children)

Therefore the first arrow would have a 5/10 chance of being cursed, while the second selection would have either a 4/9 or 5/9 chance of being cursed depending on whether or not the first arrow was cursed.

If they pulled one, checked if it was cursed, and then pulled another, you'd be right

But they pulled two out of ten at the same time.

So roll two d10s, and say odds are cursed and even would regular. And that's good enough.

I mean, maybe I'm missing something and I didn't spell it out exactly what I meant in the first comment, but that should be the exact same odds as the action.

[–] [email protected] 5 points 2 days ago (2 children)

But what if I roll 2 times 1? I can't pull arrow 1 twice!

[–] ClanOfTheOcho 3 points 2 days ago

Re-roll on a repeat

[–] givesomefucks -4 points 2 days ago (1 children)

Specific number doesn't matter.

We have a binary result: cursed or regular. You probably wouldn't lose anything by flipping a coin twice as long as the distribution of the arrows in the quiver is truly random.

Like, if you're looking closer than that, you might as well account for when the arrows were added to the quiver, if they were added at the same time, how much the quiver has been jostled. The line has to be drawn somewhere, which I think is literally the joke of the comic....

There's a very very simple solution but the DM is about to overthink and come up with the same result as the easy way, which they'll realize after taking the long way around.

I know I've lost a lot of time by thinking "it's worth being exact" and then I found out, no it really wasn't worth it.

[–] SwordInStone 4 points 2 days ago (1 children)

you will lose. the first arrow has 50% of being cursed the second 4/9 or 5/9.

[–] givesomefucks -4 points 1 day ago (1 children)

That is if he pulled two individually, one after another.

Not two at the same time.

The odds are two out of ten.

There is no simpler way to explain this, I'm sorry if it still isn't working

[–] SwordInStone 4 points 1 day ago

the odds of what exactly are 2/10?