There are 5 yellow pegs, 4 red pegs, 3 green pegs, 2 blue pegs, and 1 orange peg to be placed on a triangular peg board. In how many ways can the pegs be placed so that no (horizontal) row or (vertical) column contains two pegs of the same color?

- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
Five yellow pegs need five different rows and five different columns, and the board has exactly five of each. That forces their places, and every other color's too.
Solution
- Look at the board. It has rows with holes, and columns with holes. That is holes for pegs, so every hole gets a peg.
- Start with the color that has the most pegs, because it is the hardest to fit. There are yellow pegs and they need different rows and different columns. With only rows and columns, every row and every column gets exactly one yellow peg.
- Take the column with only hole. It needs a yellow peg, and there is only one place for it. That also uses up the yellow peg for that hole's row.
- Now take the column with holes. One of its holes is in the row already used, so its yellow peg has only one place left. Keep going column by column: each time exactly one spot is left. The yellow pegs end up along the long slanted edge of the triangle, and there was only one way to place them.
- Cover up those holes. What is left is a smaller triangle with rows of holes and columns of holes. The red pegs are now in exactly the same situation, so they are forced too.
- Repeat for green ( pegs), blue () and orange (). Each color is forced.
So there is exactly one way to place the pegs.
The answer is .
Why this works
When you have as many identical pegs as there are rows and as there are columns, "one in each row and column" leaves no freedom on a triangle-shaped board. Start with the tightest condition. Each forced step leaves the same shape one size smaller, so the same argument repeats all the way down.
The trap
Treating pegs of the same color as different from each other and multiplying factorials, which leads to choice (C) or (E).
Concise solution
The board has rows (lengths ) and columns (lengths ), fifteen holes in all, one per peg.
Start with the most constrained color. The five yellow pegs must occupy five different rows and five different columns. The single-hole column has one spot, so a yellow peg goes there; that uses its row too. The two-hole column now has one spot left outside that row, so its yellow peg is forced; and so on. Yellow is placed in exactly one way, along the "long diagonal."
Remove those holes. What remains is a board with rows of lengths and columns of lengths , and the four red pegs face the identical situation, so they are forced as well. Repeating for green, blue and orange fills the board uniquely.
The answer is .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.5)
- Introduction to Counting & Probability, Chapter 3: Correcting for Overcounting (§3.2, §3.4)
Techniques
Consider the largest/smallest element or boundary case · Use an invariant, parity, or coloring argument