# 1997 AIME Problems/Problem 10

## Problem

Every card in a deck has a picture of one shape - circle, square, or triangle, which is painted in one of the three colors - red, blue, or green. Furthermore, each color is applied in one of three shades - light, medium, or dark. The deck has 27 cards, with every shape-color-shade combination represented. A set of three cards from the deck is called complementary if all of the following statements are true:

i. Either each of the three cards has a different shape or all three of the card have the same shape.

ii. Either each of the three cards has a different color or all three of the cards have the same color.

iii. Either each of the three cards has a different shade or all three of the cards have the same shade.

How many different complementary three-card sets are there?

## Solution

We call these three types of complementary sets $A,B,C$ respectively. What we are trying to find is $\[n(A\cup B\cup C)\]$

We know this is equivalent to $\[n(A)+n(B)+n(C)-n(A\cap B)-n(B\cap C)-n(A\cap C)+n(A\cap B \cap C)\]$

Now, $n(A)=\binom{9}{3}+9^3=813$. Obviously, $n(B)$ and $n(C)$ are the same. Thus, we have $\[2439-n(A\cap B)-n(B\cap C)-n(A\cap C)+n(A\cap B \cap C)\]$