# Difference between revisions of "2005 AMC 12A Problems/Problem 25"

## Problem

Let $S$ be the set of all points with coordinates $(x,y,z)$, where $x$, $y$, and $z$ are each chosen from the set $\{0,1,2\}$. How many equilateral triangles all have their vertices in $S$?

$(\mathrm {A}) \ 72\qquad (\mathrm {B}) \ 76 \qquad (\mathrm {C})\ 80 \qquad (\mathrm {D}) \ 84 \qquad (\mathrm {E})\ 88$

## Solution

### Solution 1 (non-rigorous)

For this solution, we will just find as many solutions as possible, until it becomes intuitive that there are no more size of triangles left.

First, try to make three of its vertices form an equilateral triangle. This we find is possible by taking any vertex, and connecting the three adjacent vertices into a triangle. This triangle will have a side length of $\sqrt{2}$; a quick further examination of this cube will show us that this is the only possible side length (red triangle in diagram). Each of these triangles is determined by one vertex of the cube, so in one cube we have 8 equilateral triangles. We have 8 unit cubes, and then the entire cube (green triangle), giving us 9 cubes and $9 \cdot 8 = 72$ equilateral triangles.

$[asy] import three; unitsize(1cm); size(200); currentprojection=perspective(1/3,-1,1/2); draw((0,0,0)--(2,0,0)--(2,2,0)--(0,2,0)--cycle); draw((0,0,0)--(0,0,2)); draw((0,2,0)--(0,2,2)); draw((2,2,0)--(2,2,2)); draw((2,0,0)--(2,0,2)); draw((0,0,2)--(2,0,2)--(2,2,2)--(0,2,2)--cycle); draw((2,0,0)--(0,2,0)--(0,0,2)--cycle,green); draw((1,0,0)--(0,1,0)--(0,0,1)--cycle,red); label("x=2",(1,0,0),S); label("z=2",(2,2,1),E); label("y=2",(2,1,0),SE); [/asy]$

NOTE: Connecting the centers of the faces will actually give an octahedron, not a cube, because it only has $6$ vertices.

Now, we look for any additional equilateral triangles. Connecting the midpoints of three non-adjacent, non-parallel edges also gives us more equilateral triangles (blue triangle). Notice that picking these three edges leaves two vertices alone (labelled A and B), and that picking any two opposite vertices determine two equilateral triangles. Hence there are $\frac{8 \cdot 2}{2} = 8$ of these equilateral triangles, for a total of $\boxed{\textbf{(C) }80}$.

$[asy] import three; unitsize(1cm); size(200); currentprojection=perspective(1/3,-1,1/2); draw((0,0,0)--(2,0,0)--(2,2,0)--(0,2,0)--cycle); draw((0,0,0)--(0,0,2)); draw((0,2,0)--(0,2,2)); draw((2,2,0)--(2,2,2)); draw((2,0,0)--(2,0,2)); draw((0,0,2)--(2,0,2)--(2,2,2)--(0,2,2)--cycle); draw((1,0,0)--(2,2,1)--(0,1,2)--cycle,blue); label("x=2",(1,0,0),S); label("z=2",(2,2,1),E); label("y=2",(2,1,0),SE); label("A",(0,2,0), NW); label("B",(2,0,2), NW); [/asy]$

### Solution 2 (rigorous)

The three-dimensional distance formula shows that the lengths of the equilateral triangle must be $\sqrt{d_x^2 + d_y^2 + d_z^2}, 0 \le d_x, d_y, d_z \le 2$, which yields the possible edge lengths of

$\sqrt{0^2+0^2+1^2}=\sqrt{1},\ \sqrt{0^2+1^2+1^2}=\sqrt{2},\ \sqrt{1^2+1^2+1^2}=\sqrt{3},$ $\ \sqrt{0^2+0^2+2^2}=\sqrt{4},\ \sqrt{0^2+1^2+2^2}=\sqrt{5},\ \sqrt{1^2+1^2+2^2}=\sqrt{6},$ $\ \sqrt{0^2+2^2+2^2}=\sqrt{8},\ \sqrt{1^2+2^2+2^2}=\sqrt{9},\ \sqrt{2^2+2^2+2^2}=\sqrt{12}$

Some casework shows that $\sqrt{2},\ \sqrt{6},\ \sqrt{8}$ are the only lengths that work, from which we can use the same counting argument as above.