Page 1 of 1

A little puzzle

Posted: Sat Apr 12, 2008 6:50 pm
by Charlie Reams
Fred has no friends and his only companion is a coin. He likes to toss the coin until both sides have come up at least once. How many turns of this game does he get to play on average?

Fred eventually gets bored of the coin and starts to play with a die, rolling it until all 6 faces have come up at least once. How long does this game last on average?

[The first part is a warm-up which might give a hint on how to solve the second, but neither case is that difficult if you approach it in the right way. I made it up while I was sitting here so it could be thoroughly embarrassing if I got the answer wrong.]

Re: A little puzzle

Posted: Sat Apr 12, 2008 7:14 pm
by Gavin Chipper
Charlie Reams wrote:Fred has no friends and his only companion is a coin. He likes to toss the coin until both sides have come up at least once. How many turns of this game does he get to play on average?

Fred eventually gets bored of the coin and starts to play with a die, rolling it until all 6 faces have come up at least once. How long does this game last on average?

[The first part is a warm-up which might give a hint on how to solve the second, but neither case is that difficult if you approach it in the right way. I made it up while I was sitting here so it could be thoroughly embarrassing if I got the answer wrong.]
I won't answer this because I think it came up fairly recently on the Yahoo Group and I answered it then (the dice one).

Edit - http://tv.groups.yahoo.com/group/c4coun ... sage/16385 by the way.

Re: A little puzzle

Posted: Sat Apr 12, 2008 7:27 pm
by Joseph Bolas
Charlie Reams wrote:He likes to toss the coin until both sides have come up at least once. How many turns of this game does he get to play on average?
The minimum number of tosses is 2, if you were lucky to get H and T straight away. If you did 3 tosses then you have to focus on all the possible outcomes of 3 tosses and also which ones have a H and T in them. The possible outcomes of 3 coins would be HHH, HHT, HTH, HTT, THH, THT, TTH, TTT, where 6 out of 8 have one of each side so you have a 75% chance of doing the challenge with 3 tosses.

So if correct, its just a number of working out set of outcomes depending on the number of tosses and then finding the one with the higher percentage (if that makes sense).

Re: A little puzzle

Posted: Sat Apr 12, 2008 9:47 pm
by Charlie Reams
Joseph Bolas wrote:
Charlie Reams wrote:He likes to toss the coin until both sides have come up at least once. How many turns of this game does he get to play on average?
The minimum number of tosses is 2, if you were lucky to get H and T straight away. If you did 3 tosses then you have to focus on all the possible outcomes of 3 tosses and also which ones have a H and T in them. The possible outcomes of 3 coins would be HHH, HHT, HTH, HTT, THH, THT, TTH, TTT, where 6 out of 8 have one of each side so you have a 75% chance of doing the challenge with 3 tosses.

So if correct, its just a number of working out set of outcomes depending on the number of tosses and then finding the one with the higher percentage (if that makes sense).
It makes sense, but it's not the right solution. The most likely outcome is not the same as the average outcome. For example, the average outcome when rolling a dice is 3.5, but the most likely outcome is... well, they're all equally likely.

Anyway, Gevin has spoilt my fun, because his answer on the forum is correct. I don't remember reading that post but maybe it inspired me subconciously. Can you generalise the method to a, say, an N-faced die?

Re: A little puzzle

Posted: Sat Apr 12, 2008 11:15 pm
by Joseph Bolas
Charlie Reams wrote:Anyway, Gevin has spoilt my fun, because his answer on the forum is correct. I don't remember reading that post but maybe it inspired me subconciously. Can you generalise the method to a, say, an N-faced die?
Yeah, I've just seen that Gevin's edit was just after I posted my message, so I missed that. Sorry :oops:.

Re: A little puzzle

Posted: Sun Apr 13, 2008 2:09 pm
by Jason Larsen
Two, because 2 x 1 = 2

Re: A little puzzle

Posted: Sun Apr 13, 2008 10:41 pm
by M. George Quinn
Jason. That is brilliant.

This topic should be locked as it has nothing to do with either cheese or mushrooms.

Re: A little puzzle

Posted: Sun Apr 13, 2008 10:54 pm
by Jason Larsen
Thank you.

I will accept what you say, George.

Re: A little puzzle

Posted: Wed Apr 16, 2008 9:36 pm
by Gavin Chipper
Anyway, for an n-sided dice: n/n (or 1) + n/(n-1) + n/(n-2) ... + n/(n-(n-1)) (or n)

Re: A little puzzle

Posted: Wed Apr 16, 2008 9:49 pm
by Jason Larsen
How did you come up with that?

Re: A little puzzle

Posted: Thu Apr 17, 2008 8:21 pm
by Gavin Chipper
Jason Larsen wrote:How did you come up with that?
Well, to get all the sides of the dice to come up, you first have to get one of them - there is a 100% chance of achieving this on your first go, and the average number of goes is one. Then you need to get the second number. Each time you roll, there is one chance in n of failing (the chance of rolling the number you got the first time). You have an (n-1)/n chance of succeeding, and the average number of goes is the reciprocal of this. For the next one you have an (n-2)/n chance, until you get down to the last side left, where the chance is 1/n and the average number of goes is n. So you just add up all the averages to get the total average. I know this reads like a ramble but I can't be bothered to make it any clearer.

Re: A little puzzle

Posted: Thu Apr 17, 2008 8:32 pm
by Joseph Bolas
Gevin-Gavin wrote:Well, to get all the sides of the dice to come up, you first have to get one of them - there is a 100% chance of achieving this on your first go, and the average number of goes is one. Then you need to get the second number. Each time you roll, there is one chance in n of failing (the chance of rolling the number you got the first time). You have an (n-1)/n chance of succeeding, and the average number of goes is the reciprocal of this. For the next one you have an (n-2)/n chance, until you get down to the last side left, where the chance is 1/n and the average number of goes is n. So you just add up all the averages to get the total average. I know this reads like a ramble but I can't be bothered to make it any clearer.
So then for an 8-sided die for example it would be then:

8/8 + 7/8 + 6/8 + 5/8 + 4/8 + 3/8 + 2/8 + 1/8?

Re: A little puzzle

Posted: Thu Apr 17, 2008 8:38 pm
by Gavin Chipper
Joseph Bolas wrote:
Gevin-Gavin wrote:Well, to get all the sides of the dice to come up, you first have to get one of them - there is a 100% chance of achieving this on your first go, and the average number of goes is one. Then you need to get the second number. Each time you roll, there is one chance in n of failing (the chance of rolling the number you got the first time). You have an (n-1)/n chance of succeeding, and the average number of goes is the reciprocal of this. For the next one you have an (n-2)/n chance, until you get down to the last side left, where the chance is 1/n and the average number of goes is n. So you just add up all the averages to get the total average. I know this reads like a ramble but I can't be bothered to make it any clearer.
So then for an 8-sided die for example it would be then:

8/8 + 7/8 + 6/8 + 5/8 + 4/8 + 3/8 + 2/8 + 1/8?
No - it would be 8/8 + 8/7 + 8/6 + 8/5 + 8/4 + 8/3 + 8/2 + 8/1.

Re: A little puzzle

Posted: Fri Apr 18, 2008 2:05 am
by Jason Larsen
If you were all having fun with this, I bet you would all shout, "Yahtzee!"

Re: A little puzzle

Posted: Fri Apr 18, 2008 8:12 am
by Jon Corby
I'll take that bet.

Re: A little puzzle

Posted: Fri Apr 18, 2008 1:26 pm
by Jason Larsen
You know what Yahtzee is, don't you, Jon?

Re: A little puzzle

Posted: Fri Apr 18, 2008 1:36 pm
by Joseph Bolas
Gevin-Gavin wrote:
Joseph Bolas wrote:
Gevin-Gavin wrote:Well, to get all the sides of the dice to come up, you first have to get one of them - there is a 100% chance of achieving this on your first go, and the average number of goes is one. Then you need to get the second number. Each time you roll, there is one chance in n of failing (the chance of rolling the number you got the first time). You have an (n-1)/n chance of succeeding, and the average number of goes is the reciprocal of this. For the next one you have an (n-2)/n chance, until you get down to the last side left, where the chance is 1/n and the average number of goes is n. So you just add up all the averages to get the total average. I know this reads like a ramble but I can't be bothered to make it any clearer.
So then for an 8-sided die for example it would be then:

8/8 + 7/8 + 6/8 + 5/8 + 4/8 + 3/8 + 2/8 + 1/8?
No - it would be 8/8 + 8/7 + 8/6 + 8/5 + 8/4 + 8/3 + 8/2 + 8/1.
My bad, I got confused by what side of the '/' you put (n-1) :oops:.

Re: A little puzzle

Posted: Fri Apr 18, 2008 3:49 pm
by Jon Corby
Jason Larsen wrote:You know what Yahtzee is, don't you, Jon?
It's a river in China, isn't it?

Re: A little puzzle

Posted: Fri Apr 18, 2008 3:52 pm
by Jason Larsen
No, that's Yangtze. Yahtzee is a dice game similar to poker with a cup.

Re: A little puzzle

Posted: Fri Apr 18, 2008 3:56 pm
by Joseph Bolas
Corby wrote:
Jason Larsen wrote:You know what Yahtzee is, don't you, Jon?
It's a river in China, isn't it?
You love sarcasm don't you :lol:.

EDIT: I was asking this to Corby.

Re: A little puzzle

Posted: Fri Apr 18, 2008 4:09 pm
by Jason Larsen
It's pronounced differently, whether you have an accent or not.

Re: A little puzzle

Posted: Fri Apr 18, 2008 4:22 pm
by Richard Brittain
How can you be sure of that Jason? There could easily be some little town in Wales where people pronounce 'Yahtzee' and 'Yangtze' the same.

Re: A little puzzle

Posted: Fri Apr 18, 2008 4:30 pm
by Dinos Sfyris
Stop Yangtzing Jason's chain!

Re: A little puzzle

Posted: Fri Apr 18, 2008 4:41 pm
by Ben Wilson
Jason Larsen wrote:No, that's Yangtze. Yahtzee is a dice game similar to poker with a cup.
Throw in 2 girls and that's the type of game I want to play. ;)

Back on topic, did the puzzle ever get solved?

Re: A little puzzle

Posted: Fri Apr 18, 2008 4:44 pm
by Joseph Bolas
Ben Wilson wrote:Back on topic, did the puzzle ever get solved?
If you are on about the question "Can you generalise the method to a, say, an N-faced die?", then yes, Gevin-Gavin solved it.
Gevin-Gavin wrote:Anyway, for an n-sided dice: n/n (or 1) + n/(n-1) + n/(n-2) ... + n/(n-(n-1)) (or n)

To get all the sides of the dice to come up, you first have to get one of them - there is a 100% chance of achieving this on your first go, and the average number of goes is one. Then you need to get the second number. Each time you roll, there is one chance in n of failing (the chance of rolling the number you got the first time). You have an (n-1)/n chance of succeeding, and the average number of goes is the reciprocal of this. For the next one you have an (n-2)/n chance, until you get down to the last side left, where the chance is 1/n and the average number of goes is n. So you just add up all the averages to get the total average. I know this reads like a ramble but I can't be bothered to make it any clearer.

Re: A little puzzle

Posted: Sat Apr 19, 2008 2:16 am
by Jason Larsen
The game is pronounced "Yahtzee," with the "ah" sound meaning, "Open wide for the doctor!"

Re: A little puzzle

Posted: Sat Apr 19, 2008 7:51 pm
by Richard Brittain
Jason, are you trying to replicate the crazy British sense of humour?

Re: A little puzzle

Posted: Sat Apr 19, 2008 9:12 pm
by Jason Larsen
No, that's just the way it's pronounced, Yahtzee.