Constructive counting
In combinatorics, constructive counting is a counting method where one "constructs" a set to count it. It is a close cousin of casework, as constructive counting usually involves breaking the problem down into several smaller counting problems.
Examples
Here are some problems with solutions that utilize constructive counting.
Example 1
How many four-digit numbers are there?
Solution: We break up the problem into the number of choices each digit can be. For the first digit, it can be any number from one to nine (it cannot be zero, or else it ceases have four digits), so it has options. As for the other three digits, they can be any number from zero to ten, so they all have options. We then multiply these together to get an answer of .
This may seem like a frivolous and fruitless trick, but the technique of breaking a problem down into several "choices" is truly fundamental and appears everywhere in combinatorics.
Example 2
How many lists of seven numbers are there such that each entry is between and inclusive and no two consecutive entries are equal?
Solution: We can model this situation as row of 7 boxes, like this : 29$; the key restriction here is that no two boxes right next to each other can have the same number.
A constructive approach is the simplest way to attack this question. Let each option be a digit out of the seven numbers. The first digit can be any digit from$ (Error compiling LaTeX. Unknown error_msg)2982108 - 1 = 7$options for the second digit.
The exact same logic applies to the third digit; it can be any of the$ (Error compiling LaTeX. Unknown error_msg)872778 \cdot 7 \cdot 7 \cdot 7 \cdot 7 \cdot 7 \cdot 7 = 8 \cdot 7^6 = 941,192\square$These two examples use choices specifically based on digits, but this isn't the entire picture of constructive counting. In general, constructive techniques include any breakage of a counting problem into several smaller counting problems. The following example displays this well:
=== Example 3 === ''How many [[permutations]] of$ (Error compiling LaTeX. Unknown error_msg)AAAABBB$are there?''
'''Solution''': We can model the question as a row of seven boxes, like this: <cmath>\square \square \square \square \square \square \square,</cmath> which we have to populate with$ (Error compiling LaTeX. Unknown error_msg)4$$ (Error compiling LaTeX. Unknown error_msg)A3$$ (Error compiling LaTeX. Unknown error_msg)B$s. Using constructive counting is an idea, but there are multiple ways one might proceed with the construction. If we were to go like before and break the problem down by each box, we'd get a fairly messy solution.
Instead, one might think to break it down by first populating the$ (Error compiling LaTeX. Unknown error_msg)ABA4A_7 C_4 = 35_n C_kABABA35AAAABBB\square$.
Like in this problem, there are sometimes multiple independent ways to construct a set. Others, however, have no other methods, like in the following question:
=== Example 4 === ''[[2001 AMC 12 Problems/Problem 16 | 2001 AMC 12 Problem 16]]: A spider has one sock and one shoe for each of its eight legs. In how many different orders can the spider put on its socks and shoes, assuming that, on each leg, the sock must be put on before the shoe?
'''Solution''': Note that each leg has one designated shoe and a designated sock; each leg's shoe and sock belongs to only that leg. The question is then only asking about the order in time that it puts all 16 socks and shoes in. We can model the different orders as 16 boxes, where each box is populated with a certain sock or shoe, like this: <cmath>\square \square \square \square \square \square \square \square \square \square \square \square \square \square \square \square.</cmath> Breaking up the problem by each box leads to a dead end. Instead, we can use a similar approach to example three to solve this problem — we can first choose two boxes which each leg's sock-shoe pair is located, then we permute them. For the first leg, the location of its sock and shoe's two boxes are given by$ (Error compiling LaTeX. Unknown error_msg)_{16} C_2$; but on permuting them, we know that the sock appear first in the list, which implies that only one permutation exists.
So, there are just$ (Error compiling LaTeX. Unknown error_msg)_{16} C_2_{14} C_2_{12} C_2\frac{16!}{2^8}D\square$.
This problem was much more challenging than the others mentioned thus far, but it's a lovely illustration of just how piercing a cleverly chosen construction can be to counting problems.
=== Example 5 === ''[[2004 AIME I Problems/Problem 6 | 2004 AIME I Problem 6]]: An integer is called snakelike if its decimal representation$ (Error compiling LaTeX. Unknown error_msg) a_1a_2a_3\cdots a_k a_i<a_{i+1} i a_i>a_{i+1} i $is [[even integer | even]]. How many snakelike integers between 1000 and 9999 have four distinct digits?''
'''Solution''': We construct the set of snakelike integers. All the recursive requirement is saying is that the second digit must be greater than the first and third, and the fourth must be greater than the third. But before we start construction, we must divide our investigation into several [[casework | cases]], based on whether we allow zeroes
'''Case 1''': Snakelike integers with no zero. First, we choose the four integers. They must be between$ (Error compiling LaTeX. Unknown error_msg)19_9 C_4 = 12613575126 \cdot 5 = 630$snakelike integers with four distinct digits and no zero.
'''Case 2''': Snakelike integers with one zero. First, we choose the other three integers, which by similar logic above is$ (Error compiling LaTeX. Unknown error_msg)_9 C_3 = 8413584 \cdot 3 = 252$snakelike integers with four distinct digits and one zero.
It's easy to see that introducing a second zero would mandate them being the first and third digits. However, this breaks our requirement that our integers must be between$ (Error compiling LaTeX. Unknown error_msg)10009999630 + 252 = 882\square$.
It's worth noting that as problem-solving ability becomes more advanced, there are fewer problems that can be solved by constructive counting alone; the list of examples terminates at a late-introductory level consequentially. At the same time, there are many, many more problems at a higher level where constructive counting is a crucial intermediate step, combined with other counting strategies to reach an answer.