I use this blog as a soap box to preach (ahem... to talk :-) about subjects that interest me.

Thursday, August 25, 2011

Giza-IQ Test - Solution 18


We have to consider corners, sides and middles separately.  Out of a total of 5*4 = 20 positions, there are 4 corners, (3+2)*2 = 10 sides, and 20-4-10 = 6 middles.

Therefore, the probabilities of hitting a particular type of position by choosing a position at random are:
  Pc = 4/20 = 1/5
  Ps = 10/20 = 1/2
  Pm = 6/20 = 3/10

=== Corners
A corner position is adjacent to 3 positions.  In order for all 3 to be occupied by mines, it is necessary that the remaining 7 mines are distributed in the remaining 20-4 = 16 positions.  The number of ways in which this can be done is given by:

Nc3 = 16! / [(16-7)! * 7!] =
    = 16*15*14*13*12*11*10 / (7*6*5*4*3*2) =
    = 11440

The total number of ways in which 10 mines can be placed in 20 positions is given by:

N = 20! / [(20-10)! * 10!] =
  = 20*19*18*17*16*15*14*13*12*11 / (10*9*8*7*6*5*4*3*2) =
  = 184756

Therefore, the probability of being surrounded by mines in a corner position is given by:

Pc3 = Nc3/N = 11440 / 184756 = 0.061919504643963

=== Sides

A side position is adjacent to 5 positions.  In order for all 5 to be occupied by mines, it is necessary that the remaining 5 mines are distributed in the remaining 20-6 = 14 positions.  The number of ways in which this can be done is given by:

Ns5 = 14! / [(14-5)! * 5!] =
    = 14*13*12*11*10 / (5*4*3*2) =
    = 2002

Therefore, the probability of being surrounded by mines in a side position is given by:

Ps5 = Ns5/N = 2002 / 184756 = 0.010835913312693

=== Middles

A middle position is adjacent to 8 positions.  In order for all 8 to be occupied by mines, it is necessary that the remaining 2 mines are distributed in the remaining 20-9 = 11 positions.  The number of ways in which this can be done is given by:

Nm8 = 11! / [(11-2)! * 2!] =
    = 11*10 / 2 =
    = 55

Therefore, the probability of being surrounded by mines in a middle position is given by:

Pm8 = Nm8/N = 55 / 184756 = 0.000297689926173

=== Result

P = Pc*Pc3 + Ps*Ps5 + Pm*Pm8 =
  = 1/5 * 0.061919504643963 + 1/2 * 0.010835913312693 +
    + 3/10 * 0.000297689926173 =
  = 0.012383900928793 + 0.005417956656347 + 0.000089306977852 =
  = 0.017891164562991 =
  = 1.789%

No comments:

Post a Comment