Combinatorics and Probability Riddles

Started by Cuiki, Fri 03/04/2015 19:22:17

Previous topic - Next topic

Cuiki

Who needs more riddle threads?
Everyone!! :cheesy: :cheesy: :cheesy:

So I propose we play... combinatorics and probability!

Here's a fairly easy (and fairly tedious) permutation exercise to get things started:

5 new AGS games came out this week: Gabriel Knightley, Escape from the Wonky Island, Gyst, Oceanspirit Tennis and Day of the Ten Tacos.

You're really excited and want to play all of them today, one after another, but you want to leave the Wonky Island until last, and you want to play Oceanspirit Tennis as soon as possible, that is either first or second. In how many different ways can you play those games?


If you think you know the answer, post it together with some sort of explanation, either a proper mathematical one or just something you make up as you go along. I guess you could also use brute force while you can (which would be typing out all the possible combinations and then counting them).

---------
Also, if you don't know where to start, here's a cool site explaining the basics of combinations and permutations in an easy-to-understand manner:
http://www.mathsisfun.com/combinatorics/combinations-permutations.html
Hmm..it's kinda steep. But with a sled I can slide down the slope.

Eric

#1
I stink at math, but my reasoning would run something like this:


  • If Wonky Island is always last, it should be dropped from has no bearing on the number of possibilities we're considering.

  • If Oceanspirit is first or second, that means:

    • Three possibilities in the first slot with Oceanspirit in the second (A)
    • Three possibilities in the second slot with Oceanspirit in the first (B)
    • A combination of the others in third or fourth for each (C)
    • For each A, there are two C groups. For each B, there are two C groups.
  • Therefore, (3x2)+(3x2)=12

My guess is 12, though I think it's unlikely I'm correct.

Cuiki

You're absolutely correct, of course! I think. :P

Spoiler
I solved it a bit differently, but we got the same result in the end.

There are 2 types of events we can treat separately, like you already indicated:
- OT is first: 1 x 3 x 2 x 1 x 1 = 6
- OT is second: 3 x 1 x 2 x 1 x 1 = 6
Which gives us: 6 + 6 = 12
[close]

(For future reference: if you notice any wrong answers being accepted, make sure to point it out, please.)

Eric, do you want to come up with the next one? It can also be a probability-type riddle.
Hmm..it's kinda steep. But with a sled I can slide down the slope.

Eric

Oooh...I don't know if I'm up to that. Why don't you give us another one, and I'll try to think of one for the future?

selmiak

you have these feelings again and are really emotional on the internet today because you want to share these emotions.
But to not have smiley spammers, the forum admin has limited the number of smileys to 3 per post.
How many different ways are there to express your important emotions with a set of 20 smileys?

O0

Cuiki

Quote from: selmiak on Sat 04/04/2015 11:46:25
you have these feelings again and are really emotional on the internet today because you want to share these emotions.
But to not have smiley spammers, the forum admin has limited the number of smileys to 3 per post.
How many different ways are there to express your important emotions with a set of 20 smileys?

O0
(wtf) :-D 8-)


In the meantime, let's have another one in hardcore mode.

If you throw a standard die 5 times in a row, what's the probability of:
a) the die showing the same number every time?
b) forming a streak of 3 or more of the same number?

Hmm..it's kinda steep. But with a sled I can slide down the slope.

mkennedy

A
Spoiler
1 in 6^5 or 1 in 7776  or  0.0001286 (.01286%)
[close]
?

Cuiki

Quote from: mkennedy on Sat 04/04/2015 23:43:47
Spoiler
1 in 6^5 or 1 in 7776  or  0.0001286 (.01286%)
[close]
Cool, you're going in the right direction... but there's still something missing!

What about Selmiak's smiley challenge, anyone who can tackle that one?
Also, if anyone wants to add their own combinatorics/probability problem, be my guest! It's not even required to know the answer beforehand. ;)
Hmm..it's kinda steep. But with a sled I can slide down the slope.

mkennedy

Quote from: Cuiki on Sun 05/04/2015 00:57:07
Quote from: mkennedy on Sat 04/04/2015 23:43:47
Spoiler
1 in 6^5 or 1 in 7776  or  0.0001286 (.01286%)
[close]
Cool, you're going in the right direction... but there's still something missing!

Doh!
Spoiler
Multiply it by 6 for 6/(6^5) or  1 in 1296 or .000771604 or .0771604%
[close]

Been long time since I took probability in college. Hopefully this time I got it right.

Cuiki

Hmm..it's kinda steep. But with a sled I can slide down the slope.

Mandle

Quote from: Cuiki on Mon 06/04/2015 15:16:05
Yep, that's it!

Isn't that actually the probability of the 5 throws showing a specific pre-determined number 5 times in a row?

The problem only said "the same number 5 times in a row"...In this case: The first throw is irrevelant, the number can be anything and only serves to define the number which must be thrown another 4 times.

For example:

The chance of throwing two sixes in a row is 1 in 36.

But the chance of throwing the same number twice in a row is 1 in 6, as the second throw only needs to match whatever the first throw was.

Or maybe I'm missing something?

Andail

#11
Mandle, that's correct, and if you take into account MKennedy's 2nd post, you'll find that the results are the same.

His approach was to find out the probability of getting a specific number 5 times in a row, then multiplying by 6 to get all the possibilities.

PS:
Here's another one:

Roll a standard die. If you roll 6 it means you get a reroll (adding the 6 you already rolled). This can, theoretically, go on forever. What's the average result of rolling this die?

Cuiki

#12
Yeah, like Andail said.
To further elaborate (also for other people who aren't entirely sure what's going on):

Mkennedy's approach looks something like this:

The number of all the possible outcomes is 6x6x6x6x6 or 6^5 or 7776.
The number of desired outcomes is 6 ([1,1,1,1,1] or [2,2,2,2,2] or [3,3,3,3,3] or [4,4,4,4,4] or [5,5,5,5,5] or [6,6,6,6,6])

When you divide the number of desired outcomes with the number of total outcomes, it shows you the likelihood of a desired event to happen in the form of a number between 0 and 1 (0 being impossible and 1 being certain).

So, we have 7776 different ways in which this die can land, but only 6 of them will yield the desired outcome. 6 divided by 7776 is 0.00077 (or 0.077%, if you multiply it by 100).
----
Now, what you were doing on the other hand, was not calculating the number of outcomes in advance, but rather figuring out the probability of each individual throw and multiplying them together in the end (which is an equally valid approach):

- the first throw can of course be any number from 1-6, which translates to 6/6 chances (or 1)
- the second throw can only be one specific number (determined by the previous throw), so we have 1/6 chances to get this one right.
- same with the third, fourth and fifth throw.

So, in the end, our calculation would look like this:
(6/6) x (1/6) x (1/6) x (1/6) x (1/6) = 6/7776 = 0.00077
OR:
1 x (1/6) x (1/6) x (1/6) x (1/6) = 1/1296 = 0.00077
Hmm..it's kinda steep. But with a sled I can slide down the slope.

Cuiki

#13
Apologies for a double post...

Quote from: Andail on Tue 07/04/2015 14:47:07
Roll a standard die. If you roll 6 it means you get a reroll (adding the 6 you already rolled). This can, theoretically, go on forever. What's the average result of rolling this die?

Wow, that one is pretty insane. :shocked:
But I guess it's a sort of thing that could occasionally come in handy in real life situations (board games, maybe?), so let's give it a go.

Spoiler
For the sake of simplicity, let's say we have a really limited number of rerolls before someone tells us: "That does it. You're cheating, there's no way anyone could have so much luck."

First, let's limit it to 1 reroll. The equation would go something like this:


And if it's limited to 2 rerolls, it would look like this:


Can you see the pattern? The numbers at the top of the fractions (numerators?) are all the scores you can get. Basically, if the player is allowed to do a maximum of two rerolls, your scores can be 1, 2, 3, 4 and 5 but not 6; they can be 7, 8, 9, 10 and 11 but not 12 (6 + 6); and they can be 13, 14, 15, 16, 17, AND 18 (6 + 6 + 6). Makes sense?

Anyway, the average gets slightly bigger with each reroll.
So, the average score would be 4.19991 for when the rules allow you to do 5 rerolls (meaning a total of 6 rolls).
[close]

Spoiler
But that's not good enough, eh? :tongue:

So I tried to come up with a more general formula. I can't really explain how I got there, but let's just say it took quite a bit of trial and error.

n = number of rerolls allowed.

It looks kinda messy, but that's really about as good as I can make it. Besides, I only ever tested it with small values for n. Anyone feels like doing a double check?
[close]

Spoiler
So, unless I completely screwed up somewhere along the way (which I certainly might have), the answer should be: somewhere around 4.2
TA-DA!

And now I've got a headache...
[close]

EDIT: I uploaded a wrong formula before.
Hmm..it's kinda steep. But with a sled I can slide down the slope.

selmiak

but, ... but I never rolled a 4.2 ever ???

Cuiki

Yeah, that's where it all falls apart.. :tongue:
Hmm..it's kinda steep. But with a sled I can slide down the slope.

Mandle

Ahhhhhh...gotcha...I didn't understand how the "desired results sets" thing worked. My probability studies only went as far as the very basics it seems. I'd imagine the more complex methods being shown here are far more robust and can tackle more intricate problems.

That last one looks more like the calculations for a shuttle launch to me than something to do with a mere d6 :=

Snarky

#17
The average dice roll is 3.5 (7/2). The chance of getting another roll is 1/6. So the total is the sum of all terms 3.5 * (1/6)^k, where k goes from 0 to infinity. There's some formula to calculate the sum of a (convergent) infinite series that I used to know, but have forgotten. Ah, here it is:

http://www.mathsisfun.com/algebra/sequences-sums-geometric.html

For a series of the form a*r^k, the sum is a*(1/1-r).

So the answer is 3.5 * 6/5 = 7/2 * 6/5 = 21/5 = 4.2.

selmiak

I get the feeling you are all cheating. I'll never play any games with you that involve any dice! :P

Cuiki

QuoteSo the answer is 3.5 * 6/5 = 7/2 * 6/5 = 21/5 = 4.2.

Oh man, I should have known there was an easier way to solve that! XD
(Btw, I'm really useless at maths in general. It's just these combinatorics-type problems that I adore for some reason...)

---------------------------------------
Okay, here's a little game:

There are 6 marbles in a bag.


One of them is worth 10 points, two are worth 5 points, two are worth 1 point, and one has an X written on it, meaning it will deduce all the points from you if you draw it.
You can draw as many as you wish, and if your total score is 10 points or more, you'll get paid double the amount of money you bet, and if you lose, you lose all of it.

a) How many marbles should you draw in order to have the highest possible chances of winning?
b) Is it a reasonable game to play (i.e. would you be making more money than losing it in the long run)?
Hmm..it's kinda steep. But with a sled I can slide down the slope.

SMF spam blocked by CleanTalk