Problem 213
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.
-
Harleqin
- Posts: 6
- Joined: Sat Oct 18, 2008 1:19 pm
Problem 213
Regarding Problem 213, is it correct that a single ring of bell for a 4x4 grid would produce 5.037 empty fields? I hope that I do not give away too many hints with this question.
-
Harleqin
- Posts: 6
- Joined: Sat Oct 18, 2008 1:19 pm
Re: fleas
OK, i check and double check but find no fault.
Can someone verify the following numbers?
Can someone verify the following numbers?
grid bells empty fields 4x4 1 4.7 4x4 2 4.832873369857695 4x4 3 4.879353255023087 6x6 1 10.9600694 6x6 2 11.012615125394921 6x6 3 11.091047817241131Do I perhaps have a precision problem?
-
David F
- Posts: 23
- Joined: Sun Jul 20, 2008 11:03 pm
Re: fleas
I hope this isn't regarded as giving too much away:
You might want to do the following conceptual check:
After a large number of iterations (>900, say), Is it possible for your algorithm to decide the probability of a cell containing over 900 fleas is greater than 0?
(If so, there's a problem, obviously).
You might want to do the following conceptual check:
After a large number of iterations (>900, say), Is it possible for your algorithm to decide the probability of a cell containing over 900 fleas is greater than 0?
(If so, there's a problem, obviously).
-
bearface
- Posts: 5
- Joined: Wed Oct 22, 2008 7:50 pm
Re: fleas
While I believe I understand the problem, my inability to produce the correct answer to the original problem and the simpler 4x4 problem lead me to conclude I am fundamentally misinterpreting the problem.
For the 4x4 problem, I get the following distribution of fleas after one bell:
0.666666667 1.083333333 1.083333333 0.666666667
1.083333333 1.166666667 1.166666667 1.083333333
1.083333333 1.166666667 1.166666667 1.083333333
0.666666667 1.083333333 1.083333333 0.666666667
There are no empty cells, and even if you allow for the possibility of fleas in the corner cells and on the edge of the field jumping off of the field, there wouldn't be any empty cells after one bell.
I'm hoping somebody can nudge me towards the correct understanding of the problem. Thank you.
For the 4x4 problem, I get the following distribution of fleas after one bell:
0.666666667 1.083333333 1.083333333 0.666666667
1.083333333 1.166666667 1.166666667 1.083333333
1.083333333 1.166666667 1.166666667 1.083333333
0.666666667 1.083333333 1.083333333 0.666666667
There are no empty cells, and even if you allow for the possibility of fleas in the corner cells and on the edge of the field jumping off of the field, there wouldn't be any empty cells after one bell.
I'm hoping somebody can nudge me towards the correct understanding of the problem. Thank you.
- stijn263
- Posts: 1505
- Joined: Sat Sep 15, 2007 11:57 pm
- Location: Netherlands
Re: fleas
The problem does not ask for the expected number of fleas on each square (which you computed), but the average number of empty squares on the entire grid.
Let me write out the 2x2 problem. All fleas can jump to one of the 2 adjacent squares, giving the following 16 possible outcomes:
Giving an expected number of empty squares:
[frac]2,16[/frac]+[frac]1,16[/frac]+[frac]1,16[/frac]+...+[frac]2,16[/frac] = [frac]6,16[/frac]+[frac]2,16[/frac]+[frac]2,16[/frac]+[frac]6,16[/frac] = 1
Thus after 1 bell ring, the expected number of empty squares is 1.
Let me write out the 2x2 problem. All fleas can jump to one of the 2 adjacent squares, giving the following 16 possible outcomes:
22 21 21 20 00 10 10 20
12 11 11 10 01 11 11 21
12 11 11 10 01 11 11 21
02 01 01 00 02 12 12 22
[frac]2,16[/frac]+[frac]1,16[/frac]+[frac]1,16[/frac]+...+[frac]2,16[/frac] = [frac]6,16[/frac]+[frac]2,16[/frac]+[frac]2,16[/frac]+[frac]6,16[/frac] = 1
Thus after 1 bell ring, the expected number of empty squares is 1.
-
Harleqin
- Posts: 6
- Joined: Sat Oct 18, 2008 1:19 pm
Re: fleas
No. In fact, I check that the overall number of fleas remains constant over all iterations.David F wrote:I hope this isn't regarded as giving too much away:
After a large number of iterations (>900, say), Is it possible for your algorithm to decide the probability of a cell containing over 900 fleas is greater than 0?
-
quilan
- Posts: 182
- Joined: Fri Aug 03, 2007 11:08 pm
Prob 213
Problem 213 (View Problem)
So, this is the first PE problem in a long long long time that has me completely & utterly flummoxed. I've spent long hours each day thinking of methods to solve this, and each ended up being O(ax^2) or something silly like that. That being said, it turns out even my methods of testing random iterations is off. Can anyone confirm on which of the two a 20x20 grid with 50 bell rings is closer to: ~147, or ~166? I'm inclined to believe ~147.
Also, can this problem be done just based on self-knowledge & inference, or does it need (like for example Problem 199 (View Problem)) a bit of outside information / background knowledge to easily do it?
So, this is the first PE problem in a long long long time that has me completely & utterly flummoxed. I've spent long hours each day thinking of methods to solve this, and each ended up being O(ax^2) or something silly like that. That being said, it turns out even my methods of testing random iterations is off. Can anyone confirm on which of the two a 20x20 grid with 50 bell rings is closer to: ~147, or ~166? I'm inclined to believe ~147.
Also, can this problem be done just based on self-knowledge & inference, or does it need (like for example Problem 199 (View Problem)) a bit of outside information / background knowledge to easily do it?
ex ~100%'er... until the gf came along.


- hk
- Administrator
- Posts: 12831
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Prob 213
Closer to 147.
No outside information needed.
No outside information needed.

War ruins the life and health of untold numbers of innocent children.
-
David F
- Posts: 23
- Joined: Sun Jul 20, 2008 11:03 pm
Re: Prob 213
Without giving much away, this is one of those problems where finding the right approach is pretty much the entire battle. Almost every solution posted has been essentially the same.
With the right approach, it's not a particularly hard problem. (Nowhere near the difficulty of, say, P198).
With the right approach, it's not a particularly hard problem. (Nowhere near the difficulty of, say, P198).
-
JohnMorris
- Posts: 64
- Joined: Sun Dec 23, 2007 6:38 am
Re: Prob 213
You're not alone: it took me a while to get my head round Problem 213 (View Problem) too.
What helped me was writing a Monte-Carlo simulation and running it a few hundred thousand times. It was never (in my lifetime) going to give the right answer to the precision needed, but it did give me a feel for the magnitude of the answer and let me sanity check some of my calculated intermediate results.
(I shall gloss over the fact that I lost two days searching for a bug in my calculation which gave answers about 5% different from the simulation, then to find that the error was in the simulation itself...)
What helped me was writing a Monte-Carlo simulation and running it a few hundred thousand times. It was never (in my lifetime) going to give the right answer to the precision needed, but it did give me a feel for the magnitude of the answer and let me sanity check some of my calculated intermediate results.
(I shall gloss over the fact that I lost two days searching for a bug in my calculation which gave answers about 5% different from the simulation, then to find that the error was in the simulation itself...)

- stijn263
- Posts: 1505
- Joined: Sat Sep 15, 2007 11:57 pm
- Location: Netherlands
Re: Prob 213
Even closer to 147.1 

Well you do need to know something about expected valuesquilan wrote:Also, can this problem be done just based on self-knowledge & inference, or does it need (like for example Problem 199 (View Problem)) a bit of outside information / background knowledge to easily do it?
-
albert
- Posts: 61
- Joined: Sat Aug 02, 2008 12:36 pm
Problem 213 clarification
The flea problem request "6 decimal places".
Do the numbers before the decimal point count?
i.e. ##.####
or is it
##.######
Thanks
Do the numbers before the decimal point count?
i.e. ##.####
or is it
##.######
Thanks
- Tommy137
- Posts: 238
- Joined: Sun Feb 24, 2008 6:02 pm
- Location: Cologne, Germany
- Contact:
-
tjgillies
- Posts: 1
- Joined: Mon Nov 10, 2008 6:59 pm
Re: Prob 213
skip
Edit by hk:
all code skipped. (nothing remains)
If you want to make a contribution you can do so in the problem forum
Edit by hk:
all code skipped. (nothing remains)
If you want to make a contribution you can do so in the problem forum
-
LarryC
Problem 213
Hi!
I'm finding Problem 213 awfully tough to get round but I think I have a correct method now... except I get the answer wrong! Below are a list of expected values with bell rings and grid size:
Thanks,
Lster
I'm finding Problem 213 awfully tough to get round but I think I have a correct method now... except I get the answer wrong! Below are a list of expected values with bell rings and grid size:
Grid Size Bell Rings Expected Value 4 1 4.778 4 2 5.338 4 3 5.639Would it be possible to have them checked?
Thanks,
Lster