# 2001 AIME I Problems/Problem 10

## Problem

Let $S$ be the set of points whose coordinates $x,$ $y,$ and $z$ are integers that satisfy $0\le x\le2,$ $0\le y\le3,$ and $0\le z\le4.$ Two distinct points are randomly chosen from $S.$ The probability that the midpoint of the segment they determine also belongs to $S$ is $m/n,$ where $m$ and $n$ are relatively prime positive integers. Find $m + n.$

## Solutions

### Solution 1

The distance between the $x$, $y$, and $z$ coordinates must be even so that the midpoint can have integer coordinates. Therefore,

• For $x$, we have the possibilities $(0,0)$, $(1,1)$, $(2,2)$, $(0,2)$, and $(2,0)$, $5$ possibilities.
• For $y$, we have the possibilities $(0,0)$, $(1,1)$, $(2,2)$, $(3,3)$, $(0,2)$, $(2,0)$, $(1,3)$, and $(3,1)$, $8$ possibilities.
• For $z$, we have the possibilities $(0,0)$, $(1,1)$, $(2,2)$, $(3,3)$, $(4,4)$, $(0,2)$, $(0,4)$, $(2,0)$, $(4,0)$, $(2,4)$, $(4,2)$, $(1,3)$, and $(3,1)$, $13$ possibilities.

However, we have $3\cdot 4\cdot 5 = 60$ cases where we have simply taken the same point twice, so we subtract those. Therefore, our answer is $\frac {5\cdot 8\cdot 13 - 60}{60\cdot 59} = \frac {23}{177}\Longrightarrow m+n = \boxed{200}$.

### Solution 2

There are $(2 + 1)(3 + 1)(4 + 1) = 60$ points in total. We group the points by parity of each individual coordinate -- that is, if $x$ is even or odd, $y$ is even or odd, and $z$ is even or odd. Note that to have something that works, the two points must have this same type of classification (otherwise, if one doesn't match, the resulting sum for the coordinates will be odd at that particular spot).

There are $12$ EEEs (the first position denotes the parity of $x,$ the second $y,$ and the third $z.$), $8$ EEOs, $12$ EOEs, $6$ OEEs, $8$ EOOs, $4$ OEOs, $6$ OOEs, and $4$ OOOs. Doing a sanity check, $12 + 8 + 12 + 6 + 8 + 4 + 6 + 4 = 60,$ which is the total number of points.

Now, we can see that there are $12 \cdot 11$ to choose two EEEs (respective to order), $8 \cdot 7$ ways to choose two EEOs, and so on. Therefore, we get $$12\cdot11 + 8\cdot7 + 12\cdot11 + 6\cdot5 + 8\cdot7 + 4\cdot3 + 6\cdot5 + 4\cdot3 = 460$$ ways to choose two points where order matters. There are $60 \cdot 59$ total ways to do this, so we get a final answer of $$\dfrac{460}{60 \cdot 59} = \dfrac{23}{3 \cdot 59} = \dfrac{23}{177},$$ for our answer of $23 + 177 = \boxed{200}.$

Solution by Ilikeapos