combination problem on Lego blocks Working on some interesting combination problems related to Lego blocks. For example, this one. Confusion is, I often see two dimensions (e.g. height and width in below problem) mentioned to calculate the number of combinations, so length needed to mention in such problems?
https://www.hackerrank.com/challenges/lego-blocks
You have 4 types of lego blocks, of sizes (1 x 1 x 1), (1 x 1 x 2), (1 x 1 x 3), and (1 x 1 x 4). Assume that you have an infinite number of blocks of each type.
Using these blocks, you want to make a wall of height N and width M. The wall should not have any holes in it. The wall you build should be one solid structure. A solid structure can be interpreted in one of the following ways:


*

*It should not be possible to separate the wall along any vertical line without cutting any lego block used to build the wall.

*You cannot make a vertical cut from top to bottom without cutting one or more lego blocks.


The blocks can only be placed horizontally. In how many ways can the wall be built?
regards,
Lin
 A: I made some changes (marked boldface) and I hope the text is now clearer.

You have 4 types of lego blocks, of sizes given in (length x width x height) as (1 x 1 x 1), (2 x 1 x 1), (3 x 1 x 1), and (4 x 1 x 1). Assume that you have an infinite number of blocks of each type.
Using these blocks, you want to make a wall that is rectangular parallelepiped of height N and length M and width 1 without any holes and notches. The wall you build should be one solid structure. A solid structure can be interpreted in one of the following ways: 
  
  
*
  
*It should not be possible to separate the wall along any vertical cut without cutting any lego block used to build the wall. 
  
*You cannot make a vertical cut from top to bottom without cutting one or more lego blocks.
  
  
  The blocks can only be placed in such a way that the lenght, width and height of a block are  parallel to the length, width and height of the wall. In how many ways can the wall be built?

From this follows that the third dimension of the wall is 1 because it is explicitly mentioned. I think one cannot get this from the original text if one does not make some assumptions based on the experience  with building lego walls in the childhood.
Because the problem is not affected by the width it can be view as a two dimensional tiling problem, And because height dimension of the blocks also does not affect the problem, it can be viewed as one dimensional problem.
