Sixteen distinct positive integers from 1 to 16 are placed in the cells of a 4x4 grid in a random order, with each number occurring in a cell exactly once.
Determine the probability that the absolute difference between an integer and any of its neighbors (including diagonally) is more than 2 but less than 13.
As a bonus, determine the probability that the absolute difference between an integer and any of its neighbors (including diagonally) is more than 2, but less than or equal to 16.
As I interpret the problem we are randomly picking a number and we want the probability that none of its neighbors differs by 1.
A number can be positioned in a corner (p=1/4), along an edge (p=2/4), or in the center (p=1/4)
If the number is a 1 [or 16] and if
 it is in a corner it has 3 neighbors and a 12/15 chance it doesnt border a 2 [or 15]
 it is on an edge is has 5 neighbor so a 10/15 chance
 in the center is has 8 so a 7/15 chance
If the number is 2 through 15 there are two numbers that differ by 1 and if
it is in a corner there is a 13/15*12/14*11/13 = 132/210 chance of bordering neither
 it is on and edge there is a 90/210 chance
 it is in the center there is a 42/210 chance
For a grand total of
2/16*(1/4*12/15 + 2/4*10/15 + 1/4*7/15) + 14/16*(1/4*132/210 + 2/4*90/210 + 1/4*42/210) = 189/320
Assuming I made no mistakes.
Edited on October 27, 2009, 4:43 pm

Posted by Jer
on 20091027 16:29:25 