The entries in a array include all the digits from through , arranged so that the entries in every row and column are in increasing order. How many such arrays are there?
- A)
- B)
- C)
- D)
- E)
Answer
D
Key insight
1 and 9 are stuck in opposite corners. The center must be 4, 5 or 6; in each case the leftover cells split into small pieces you can count.
Solution
Name the cells with letters:
Why and go in those corners. Every cell except the top-left has a cell to its left or above it that is smaller. The digit has nothing smaller, so it must go top-left. In the same way, has nothing larger, so it must go bottom-right.
The rules left to check are: rows , , , and columns , , .
The center is the busiest cell, so start there. It is larger than , and , so it is at least . It is smaller than , and , so it is at most . So is , or .
Case .
- and are less than , so they are and in some order: ways.
- The cells get . The only rules left among them are and (all the others hold automatically). Choose which two of the four digits go to and : ways. The smaller one goes to , and the other two digits go to .
- Total: .
Case .
- and are more than , so they are and in some order: ways.
- The cells get with the rules and . Choose the two digits for and : ways.
- Total: .
Case .
- The small digits must fill , , and one more cell. That cell cannot be or (they are bigger than ), so it is or .
- Say is small. Then the top row is and is the third small digit. Choose from ( ways); the other two go to in order. The big digits fill with only the rule : choose ( ways), and the other two go to . That is arrays.
- If instead is small, flip the grid over the diagonal from to (rows become columns). This matches each array of step 8 with one here, so there are more.
- Total: .
Altogether: .
The answer is .
Why this works
When a grid has "increasing" rules, start with the cell that has the most rules on it. Here the center is larger than three cells and smaller than three others, so it has only three possible values. Fixing it splits the other digits into a small group and a big group, and each group can be counted on its own. Flipping the grid over its diagonal is a quick way to reuse a count you already did.
Alternative approach
There is a known formula for counting such grids, called the hook length formula (it goes beyond the usual school topics). For each cell, count the cells directly to its right, the cells directly below it, and the cell itself:
The number of grids is divided by the product of these numbers:
The trap
Assuming the center has to be 5. Centers 4 and 6 also work, and they give 12 arrays each.
Concise solution
Write the cell in row , column as . Clearly is at and at . The center exceeds and is below , so the center is , , or .
Center . Then fill and in ways. The digits go to with only the constraints and : choose which two digits go to the top-right pair, ways. Total .
Center . Replacing each entry by and rotating swaps this case with center : also .
Center . Three of must fill and one of the corners or ; the other corner gets a digit from . Say : then can be any of ( ways) and the other two fill row in increasing order. The digits go to with : choose the digit for , ways. That is arrays; by the transpose symmetry, gives more. Total .
Altogether .
The answer is .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.5)
- Introduction to Counting & Probability, Chapter 5: More With Combinations (§5.2)
- Introduction to Algebra, Chapter 22: Special Manipulations (§22.3)
- Introduction to Counting & Probability, Chapter 3: Correcting for Overcounting (§3.2, §3.4)
Techniques
Split into exhaustive cases and handle each · Exploit symmetry to reduce work or pair up objects