Recursive block arrangement pattern.

98 Views Asked by At

I'm allowed to only use three blocks (these ones) and only use the corner pieces together, to build different shapes of height $3$ and variable width.

I'm tasked with finding a recursive pattern for the number of arrangements of width $1, 2, 3, 4. . .$.

I've drawn out the number of arrangements for the first 4 widths:(here) but I cannot seem to figure out the pattern.

I realize that:

  • Starting with all the shapes of width $1$, you can combine shapes of width $3$ in $17$ different ways to build the shapes of width $4$,
  • Starting with all the shapes of width $2$, you can make all the shapes of width $4$ (which is $21$)
  • Starting with all the shapes of width $3$, it's the same as all the shapes as width $1$.

I do not see a specific (recursive) pattern here, can someone help me out? Thanks.

1

There are 1 best solutions below

0
On

Using this information, you can define base cases $f(1) = 1, f(2) = 3, f(3) = 10$, and then the number of arrangements of width $n \ge 4$, $=f(n) = f(n-1) + 2f(n-2) + 5f(n-3)$.