Medium Problemscountinggridcombinatorics

Tile Stacking Problem

Given n tiles arranged in a row, each to be painted with one of m available colors, count the colorings in which no more than k consecutive tiles share the same color.

Do this lesson first: climbing stairs

The full breakdown and animated table for this problem are still being written. In the meantime, run the four questions on it yourself — that is the whole exercise.