Problem 227

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
User avatar
Georg
Posts: 157
Joined: Mon Jan 21, 2008 7:00 am
Location: Mannheim, Germany
Contact:

Re: Problem 227

Post by Georg »

sfabriz wrote:Now I am ready NOT to solve this one... :cry:
You failed, NOT to solve this one. :wink:
User avatar
sfabriz
Posts: 175
Joined: Thu Apr 06, 2006 12:18 am
Location: London - UK

Re: Problem 227

Post by sfabriz »

Hehe,
yes, eventually I solved it, but it has been quite hard since I was insisting with the wrong approach.
It's a very tricky problem...

Cheers!
Image
zwuupeape
Posts: 189
Joined: Tue Jun 09, 2009 6:11 pm

Re: Problem 227

Post by zwuupeape »

Anyone who solved this problem can PM me? I think I got something wrong. What is meant by ten significant digits? abc.defghij or abc.defghijklm ? At any event I'm pretty sure I have a precision problem. I know the result is approximately true according to Monte Carlo simulations, and there's no reason why it shouldn't be exact except for problems with floating point representation... If I can PM anyone with the solution so that I'll know just how far off am I it will be good. Thanks !!
User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 11:15 pm
Location: Bremen, Germany

Re: Problem 227

Post by daniel.is.fischer »

Ten significant digits is abc.defghij.
I'll take a look.
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
Waldovski
Posts: 32
Joined: Thu Jul 08, 2010 11:11 am

Re: Problem 227

Post by Waldovski »

Hi all,

I have read all of the above, but I'm still doubtful as to whether I understand this problem correctly. I will try to limit myself to yes/no questions (if the answer is "no", could you please tell me the correct interpretation? Thanks).

1. When you say "two opposite players", you mean 1 and 51, correct?
2. A game starts with 100 players. At some point, one player has the two dice. The game is over. The new game starts with 100 people, and NOT the remaining 99, correct?

(PS: I think it is time the sentence "The game ends when one player has both dice after they have been rolled and passed, that player has then lost." is fixed. It is obviously wrong English and is causing a great deal of confusion)
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 227

Post by jaap »

Waldovski wrote:1. When you say "two opposite players", you mean 1 and 51, correct?
Yes, those are two opposite players.
Waldovski wrote:2. A game starts with 100 players. At some point, one player has the two dice. The game is over. The new game starts with 100 people, and NOT the remaining 99, correct?
That is irrelevant. You are asked for the expected number of turns in a single game.
Waldovski
Posts: 32
Joined: Thu Jul 08, 2010 11:11 am

Re: Problem 227

Post by Waldovski »

Thanks.
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 227

Post by hk »

Waldovski wrote:(PS: I think it is time the sentence "The game ends when one player has both dice after they have been rolled and passed, that player has then lost." is fixed. It is obviously wrong English and is causing a great deal of confusion)
Well I changed it into:
"The game ends when one player has both dice after they have been rolled and passed; that player has then lost."
Happy now?
Image
War ruins the life and health of untold numbers of innocent children.
Waldovski
Posts: 32
Joined: Thu Jul 08, 2010 11:11 am

Re: Problem 227

Post by Waldovski »

Thanks again...

It is now correct English-wise, but still confusing :P. I'm sorry; I don't mean to be pedantic (I really don't!) but that sentence could do without the "that player has then lost" bit. Unless I'm still misunderstanding the problem, that part has no bearing on the answer whatsoever, yet it seems to suggest that the game does not actually end on the first occurrence of a player holding both dice. This seems to be a common complaint as far as I can tell from the previous posts.

But I thank you again for the responses and the adjustment.
aff
Posts: 1
Joined: Thu Jun 21, 2012 10:11 pm

Problem 227

Post by aff »

I have been trying to do this for a while. I dont believe I fully understand the question. Does it have a definite answer every single time?
User avatar
rayfil
Administrator
Posts: 1412
Joined: Sun Mar 26, 2006 5:30 am
Location: Quebec, Canada
Contact:

Re: Problem 227

Post by rayfil »

@aff

We realize you are new to this forum. Please read the sticky post entitled "Comments, questions and clarifications about PE problems".

And then, please, do not start a new topic when one already exists. Use the search box at the top of the page. An answer to your querry may already have been posted before.
When you assume something, you risk being wrong half the time.
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 227

Post by thundre »

aff wrote:I have been trying to do this for a while. I dont believe I fully understand the question. Does it have a definite answer every single time?
Do you understand that "expected number of..." means expected value?

Do you have a question about the rules of the game?
Image
User avatar
Marcus_Andrews
Administrator
Posts: 1637
Joined: Wed Nov 09, 2011 5:23 pm

Re: Problem 227

Post by Marcus_Andrews »

aff:

An easy way to understand what "expected" means is to think of "the average if we were to conduct an infinite number of trials."

For example, the expected value of a standard 6-sided die is 3.5 because (1/6)*1+(1/6)*2+(1/6)*3+(1/6)*4+(1/6)*5+(1/6)*6 = 3.5. It's the sum of all possible values the die can take on, each weighted by the probability of each value occurring (and in this case, all numbers occur with probability 1/6).

More intuitively, if you were to roll this die over and over and over and over again, you'd find that the average of all your rolls, over time, starts to tighten in on 3.5. The values of the rolls themselves are by no means definite, but the expected value (by definition) is.

So, there's another way to phrase the question of Problem 227: "If you were to play this 100-player game an infinite number of times, what is the average number of turns the game lasts?"

Of course, answering that is quite a bit harder than answering the die-question. I might recommend starting out with easier problems involving expectation such as Problem 151.
aff wrote:I have been trying to do this for a while. I dont believe I fully understand the question. Does it have a definite answer every single time?
coreyjkelly
Posts: 7
Joined: Fri Dec 28, 2012 5:54 am
Location: Canada

Re: Problem 227

Post by coreyjkelly »

Can anybody confirm the answer for 10 players to be 109.3250866?
Image
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 227

Post by thundre »

coreyjkelly wrote:Can anybody confirm the answer for 10 players to be 109.3250866?
That is wrong, I think.
Image
coreyjkelly
Posts: 7
Joined: Fri Dec 28, 2012 5:54 am
Location: Canada

Re: Problem 227

Post by coreyjkelly »

thundre wrote:
coreyjkelly wrote:Can anybody confirm the answer for 10 players to be 109.3250866?
That is wrong, I think.
Gave this one another try today. Does 21.37846616 sound any better?
Image
coreyjkelly
Posts: 7
Joined: Fri Dec 28, 2012 5:54 am
Location: Canada

Re: Problem 227

Post by coreyjkelly »

coreyjkelly wrote:
thundre wrote:
coreyjkelly wrote:Can anybody confirm the answer for 10 players to be 109.3250866?
That is wrong, I think.
Gave this one another try today. Does 21.37846616 sound any better?

Found my mistake. The answer for 10 players should be 40.56192661
Image
minqiang
Posts: 1
Joined: Wed Apr 30, 2014 2:19 pm

Re: Problem 227

Post by minqiang »

The players sit around a table; the game begins with two opposite players having one die each. On each turn, the two players with a die roll it.


Problem is so frustratingly unclear. Why not just say:

On each turn, the two players with a die roll it simultaneously!!!???

One word. and I could have saved so many hours for people.
coreyjkelly
Posts: 7
Joined: Fri Dec 28, 2012 5:54 am
Location: Canada

Re: Problem 227

Post by coreyjkelly »

minqiang wrote:The players sit around a table; the game begins with two opposite players having one die each. On each turn, the two players with a die roll it.


Problem is so frustratingly unclear. Why not just say:

On each turn, the two players with a die roll it simultaneously!!!???

One word. and I could have saved so many hours for people.
It shouldn't matter whether they roll/pass simultaneously or not, since the problem only depends on the state of the table at the end of the turn.
Image
tommyjcarpenter
Posts: 3
Joined: Wed May 03, 2017 4:58 pm

Re: Problem 227

Post by tommyjcarpenter »

On page one of this thread, Robert Gerbicz says

"No, read the wikipedia's article! For this problem, because the answer will be in [1000,10000) the submitted answer should be in the form: abcd.efghij
(and use rounding to get the last digit)."

On page two of this thread, daniel.is.fischer says

"Ten significant digits is abc.defghij.
I'll take a look."

Which one is it?
Post Reply