# Counting Reconsidered

In our section on Ways of Counting, we noticed that there are 2^9 ways to color a 9-block with two colors, and in general there are 2^n ways to color a grid with n blocks (where n is any number).  On the Tree page, we explained this by showing how the possible colorings can "branch out" by considering possibilities for one block at a time.  There are two possible colorings for the first square--either green or blue.

For each of those possibilities, there are two possible colorings of the second square, so there are four possible ways to color the first two squares.  As we continue the tree, we keep doubling the total number of possibilities, so we get a general formula of 2^n for n blocks.

For die, there are six possible outcomes for a particular roll.  For each of these six outcomes, there are six possible outcomes for the second roll.  So, for two rolls in a row, we saw there were 6*6=36 possible rolls.  If we rolled a third time, there would be 6*6*6=6^3 possible outcomes.  In general, there would be 6^n outcomes for n rolls.