All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
Hide and destroy (Posted on 2006-02-15) Difficulty: 3 of 5
You must randomly place a destroyer (a 1x2 sized ship) on a 5x5 grid such that if I searched in any single square, my probability of finding the destroyer there is exactly 2/25. Is such a probability distribution possible? You cannot simply choose randomly one of the 40 possible positions of a destroyer because corners would have a 1/20 chance to contain the destroyer, while the center would have 1/10 chance.

Generalize to a 1xN sized ship in a MxM grid. When is it possible to place the ship with an even probability distribution in each square?

See The Solution Submitted by Tristan    
Rating: 3.4000 (5 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts A solution | Comment 3 of 14 |

I have found a simple "random" way of doing it for a 5x5 grid with a 1x2 ship. I have yet to see if it will work for a larger grid or bigger ships.
First, create a distribution that balances out the chances of the ship being in a given square. Using recursion in Excel (GO EXCEL!) I found that a checker-board pattern will work.
X 0 X 0 X
0 X 0 X 0
X 0 X 0 X
0 X 0 X 0
X 0 X 0 X

If you place the anchor point of the ship on one of the "X"s (randomly) and then randomly let the ship swing to one of the available directions the probability that the ship will be in each square is as follows:

The probability of an X being full is 1:13. 

The probability of a 0 on the edge being full is one-half of the corner's possibility plus one-third the center edge's possibility plus one-fourth the interiror spots possibility.

P=(1/2 + 1/3 + 1/4)*1/13 = 13/12 * 1/13 = 1/12

The probability of a 0 near the center being full is:

P=(1/4 + 1/4 + 1/4 +1/3)*1/13 = 1/12

This gives:


1/13  1/12  1/13  1/12  1/13
1/12  1/13  1/12  1/13  1/12
1/13  1/12  1/13  1/12  1/13
1/12  1/13  1/12  1/13  1/12
1/13  1/12  1/13  1/12  1/13

Now firing a random shot there is a 13/25 chance of hitting a 1/13 spot or a 12/25 chance in hitting a 1/12 spot. This equals to a 1/25 + 1/25 for a total of 2/25 chance of the ship being hit.


  Posted by Leming on 2006-02-15 16:24:16
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (24)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information