# 1989 AHSME Problems/Problem 22

## Problem

A child has a set of $96$ distinct blocks. Each block is one of $2$ materials (plastic, wood), $3$ sizes (small, medium, large), $4$ colors (blue, green, red, yellow), and $4$ shapes (circle, hexagon, square, triangle). How many blocks in the set differ from the 'plastic medium red circle' in exactly $2$ ways? (The 'wood medium red square' is such a block)

(A) 29 (B) 39 (C) 48 (D) 56 (E) 62

## Solution 1

The process of choosing a block can be represented by a generating function. Each choice we make can match the 'plastic medium red circle' in one of its qualities $(1)$ or differ from it in $k$ different ways $(kx)$. Choosing the material is represented by the factor $(1+1x)$, choosing the size by the factor $(1+2x)$, etc: $$(1+x)(1+2x)(1+3x)^2$$ Expanding out the first two factors and the square: $$(1+3x+2x^2)(1+6x+9x^2)$$ By expanding further we can find the coefficient of $x^2$, which represents the number of blocks differing from the original block in exactly two ways. We don't have to expand it completely, but choose the terms which will be multiplied together to result in a constant multiple of $x^2$: $$1\cdot9+3\cdot6+2\cdot1=\boxed{29}$$

## Solution 2

The blocks can be sorted into two identical $3\times4\times4$ cuboids, one wood and the other plastic, so that in each cuboid the z axis represents the size, the x axis the color, and the y axis the shape.

Suppose the reference block is in position $(0,0,0)$ in the plastic cuboid.

The wooden blocks already differ from the reference block in one way, so if $(0,0,0)$ in the wooden cuboid represents 'wood medium red circle' then any wooden block with two zero coordinates satisfies the requirements. These form the edges of the cuboid which adjoin $(0,0,0)$, so there are $2+3+3=8$.

The required plastic blocks must have two non-zero coordinates, so we count the blocks on the three faces around $(0,0,0)$ but not on the adjoining edges. There are $2\cdot3+2\cdot3+3\cdot3=21$.

In total there are $29$ blocks meeting the requirements. $[asy] import three; currentprojection=perspective((7.5,5,5),up=Z); currentlight=nolight; viewportmargin=(1mm,1mm); real c=.5; size(8cm,0); draw((0,0,0)--(0,0,4),Arrow3); draw((0,0,0)--(0,5,0),Arrow3); draw((0,0,0)--(5,0,0),Arrow3); for(int z=0 ; z<3 ; ++z) { for(int x=0 ; x<4 ; ++x) { for(int y=0 ; y<4 ; ++y) { if (((x==0)&&(y*z!=0))||((y==0)&&(x*z!=0))||((z==0)&&(x*y!=0))) {c=.5;} else {c=.75;} if (x*y*z>0) {c=1;} draw(shift(x,y,z)*unitcube,gray(c)+opacity(.6),.5bp+black); }}} [/asy]$

## Solution 3 (Fastest)

The amount of ways we can differ in the material, sizes, colors, and shapes category is 1, 2, 3, and 3 respectively (we take away one because we cannot choose the characteristic already chosen). We can choose to differ two of these characteristics, so our answer is $1\cdot2 + 1\cdot3 + 1\cdot3 + 2\cdot3 + 2\cdot3 + 3\cdot3 = \boxed{29}$.

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. 