Given a 8x8 chessboard, what is the probability of randomly placing two queens on the board without them being able to attack each other?
Instruction: Calculate the probability that two queens placed on a 8x8 chessboard at random positions do not threaten each other.
Updated
Example Answer
Assuming two distinct squares are chosen uniformly on an empty board, the probability is 23/36, about 63.9%. I would count all unordered pairs of squares and subtract the attacking pairs. There are C(64, 2), or 2,016, possible pairs. Each of the eight rows contributes C(8, 2), so there are 224 same-row pairs, and another 224 same-column pairs.
For diagonals, the lengths in one direction are 1 through 8 and back down to 1. Summing C(length, 2) gives 140 pairs per direction, or 280 altogether. Two distinct squares cannot share more than one of these attack directions, so these counts do not overlap. Subtracting 728 attacking pairs leaves 1,288 safe pairs.
Worked example
P(nonattacking) = (2016 − 224 − 224 − 280) / 2016 = 1288 / 2016 = 23 / 36.
Why this works
The exact diagonal sum avoids treating edge squares like center squares. Counting unordered pairs also avoids an unnecessary factor of two.
Related Questions
-
easy
-
easy
-
hard