Problem 298
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.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
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
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.
Problem 298
I'm almost sure I got it and monte carlo gives very close results to what I get, but still the answer is wrong. :\ If anyone who solved it can PM me and help out it will be very much appreciated, thanks
Re: 298
Thank you. I know what was wrong with my old method.stijn263 wrote:No, they're not
After 5 turns the expected difference is 0. Good luck!
Now i have an hopefully correct but inefficient method:
7 => 0.00000000
8 => 0.01209600
Going crazy to compress states.. any hints?
Re: Problem 298
Yeah, that's good. You're halfway through now.
Re: Problem 298
So if I'm running monte carlo on this and it is not coverging, does it mean that I'm just not trying it fast enough? Or could it be that my random numbers are flawed?
Re: Problem 298
In my opinion the wording of this problem is terrible.
 elendiastarman
 Posts: 410
 Joined: Sat Dec 22, 2007 8:15 pm
Re: Problem 298
Okay...do you have anything constructive to say?Waldovski wrote:In my opinion the wording of this problem is terrible.
Want some
3.14159265358979323846264338327950288419716939937510
58209749445923078164062862089986280348253421170679...?
3.14159265358979323846264338327950288419716939937510
58209749445923078164062862089986280348253421170679...?
Re: Problem 298
All right, I need a little help in understanding, because my program gives me zero as a result.
I've tried to check myself by calculating result after 8 steps by bruteforce and i've got zero aswell. I guess i simply don't understand something.
What i'm doing wrong?
I've tried to check myself by calculating result after 8 steps by bruteforce and i've got zero aswell. I guess i simply don't understand something.
What i'm doing wrong?
Last edited by ffff0 on Tue Jan 24, 2012 12:29 pm, edited 2 times in total.
Re: Problem 298
Oh my, i got it.
We have to sum not difference, but Abs(difference)!
I totally agree that wording of this problem is terrible. I've have to search the whole internet, including some solution discussion just for understanding the problem. This is not what Project Euler is about.
We have to sum not difference, but Abs(difference)!
I totally agree that wording of this problem is terrible. I've have to search the whole internet, including some solution discussion just for understanding the problem. This is not what Project Euler is about.
Re: Problem 298
Does this ipso facto mean that the wording is terrible?ffff0 wrote:I've have to search the whole internet, including some solution discussion just for understanding the problem.
Oh and please remove your spoilers in your but last post.
Re: Problem 298
If you look at my frustrations  yes. If you look at number of people, that have solved this problem  no.hk wrote: Does this ipso facto mean that the wording is terrible?
Oh and please remove your spoilers in your but last post.
Don't see how my post can help to count up to 50, but okay, removed.
Re: Problem 298
I don't understand why the answer isn't 0. I'm thinking: after each turn L and R have 5 distinct numbers. 1 random number is chosen out of 10, so for each of them there is a 1/2 chance to get a point, so after 50 turns they would have on average 25 points each. I don't get why their algorithm for picking a number matters , as long as the called number is random and their 5 numbers are distinct?
Re: Problem 298
You're asked for the expected value of LR. Not the expected value of LR. Since there is at least some chance they do not have the same score, the expected absolute value cannot be 0.
Re: Problem 298
Even though there's a chance they have different scores, should there be equal chances that L gets A and R gets B, and L gets B and R gets A?
Re: Problem 298
Suppose you have a coin that you flip twice times, with a 50/50 chance of heads/tails on each flip.
Let H be the number of heads in your two flips, T the number of tails.
The possible outcomes are:
H=0, T=2: probability 25%
H=1, T=1: probability 50%
H=2, T=0: probability 25%
The expected value of HT is 0: every possible positive result with H>T is matched by an equally probable negative result with the values swapped.
E(HT) = (20)*25% + (11)*50% + (02)*25% = 0.5 + 0  0.5 = 0
The expected value of HT is not 0: Every possible result is 0 or positive, and the latter has nonzero probability.
E(HT) = 20*25% + 11*50% + 02*25% = 0.5 + 0 + 0.5 = 1
Let H be the number of heads in your two flips, T the number of tails.
The possible outcomes are:
H=0, T=2: probability 25%
H=1, T=1: probability 50%
H=2, T=0: probability 25%
The expected value of HT is 0: every possible positive result with H>T is matched by an equally probable negative result with the values swapped.
E(HT) = (20)*25% + (11)*50% + (02)*25% = 0.5 + 0  0.5 = 0
The expected value of HT is not 0: Every possible result is 0 or positive, and the latter has nonzero probability.
E(HT) = 20*25% + 11*50% + 02*25% = 0.5 + 0 + 0.5 = 1
_{Jaap's Puzzle Page}

 Posts: 54
 Joined: Fri Sep 20, 2019 1:25 pm
 Location: Minsk
Re: Problem 298
Typo in the first sentence of the problem statement. The word 'of' doesn't belong there.
 RobertStanforth
 Administrator
 Posts: 1292
 Joined: Mon Dec 30, 2013 11:25 pm
Re: Problem 298
Thanks for flagging. This is now fixed.