On a five-by-five board, place rooks at row two, column two and row two, column four. A rook attacks along its row and column. How many empty cells are attacked by neither rook? This original Math Kangaroo-style exercise counts available cells after the pieces have already been placed; it does not count ways to arrange two nonattacking pieces. The rooks in this first position share a row.
Need help choosing a next step? Scan the contact QR code below or contact Hanlin on WeChat. Send KANGAROO-S9-1129 and tell us your school year and question.
State what safe means in this problem
An empty cell is safe exactly when its row contains no rook and its column contains no rook. Every cell in the occupied row is excluded, and both occupied columns are excluded. We are not counting legal moves for a particular rook, and we are not treating a square occupied by a rook as an available empty cell.
Choose an unused row and an unused column
There are four rows without a rook because both pieces occupy the same row. There are three columns without a rook because the two pieces use different columns. Each choice of an unused row together with an unused column identifies one safe cell, so the number is four times three, or twelve. No further division for duplicate descriptions is needed.
Check by marking the attacked region
The occupied row contributes five cells to the union of occupied rows and columns. Away from that row, the two occupied columns contribute eight more cells, giving thirteen excluded cells. Two of those thirteen are occupied by the rooks themselves, so eleven empty cells are attacked. Of twenty-three empty cells altogether, twelve remain safe, confirming the product method.
Move one rook to a new row
If instead the pieces occupy two different rows and two different columns, there are three unused rows and three unused columns, so nine cells are safe. The number of pieces has stayed two, but the answer changes because the number of distinct occupied rows changed. Counting pieces alone does not tell us how many row or column restrictions have been imposed.
Generalise using distinct occupied lines
On an m-by-n board, if the fixed rooks occupy r distinct rows and c distinct columns, the same complement gives (m minus r) times (n minus c) safe cells. This counts cells attacked by none of the pieces under ordinary rook movement. Shared rows and columns must be counted once, while a different movement rule would require a different argument.
Explain why overlaps are harmless in the complement
Adding eight attacked cells per rook would count some cells more than once and would mix occupied cells with empty destinations. The complement avoids those overlaps by describing a safe cell through two simultaneous absences. Before using a formula, write whether the objects are cells, moves or arrangements; superficially similar board questions can ask for very different counts.
Continue reading: Math Kangaroo Geometry: Counting Diagonals from Every Vertex Counts Each One Twice.
Contact Hanlin
Planning a first attempt or reviewing a topic you find difficult? Scan the QR code and send KANGAROO-S9-1129. Include your school year, country or competition region, experience and the question you want to discuss.

On your phone, use the button or save the QR image and scan it within WeChat.
Official information and further reading: Source 1
