To construct a Soma cube

puzzle, begin with 27 small

cubes. Using
no more than four cubes at a time, construct every non-

convex shape
that you can by gluing cubes face-to-face. This will use up all 27
cubes, and the shapes produced will look like the diagram below. (A "1"
is a single cube, while a "2" represents two cubes stacked on top of each
other.)

1 1 1 11 1 1 1
11 111 111 11 12 21 21

This is the original Soma puzzle invented in 1936 by Danish author

Piet Hein.
The puzzle was named after the addictive drug Soma which appears in

Aldous
Huxley's novel

Brave New World.
Hein came up with the idea for the puzzle while sitting in a physics
lecture given by

Heisenberg, and by doodling on paper quickly found that
these seven pieces can be used to construct a 3x3x3 cube.
In 1962

Conway and Guy established that there are 240 distinct ways in which
this cube may be assembled; here is one solution:

Begin with this piece:

1
1
11

and hook this piece over the short arm of the L:

11
11

so that this configuration is reached:

11
12
12

As above, a "2" in the diagram shows that the figure is two cubes deep
at that point. The rest of the solution is shown below; it should be
easy to find which piece to add to reach each step in the construction:

11 221 221 221 321 333
12 --> 112 --> 212 --> 212 --> 332 --> 333
12 12 312 333 333 333

An interesting feature of the above solution is that in this configuration
the finished cube may be balanced on a support which only touches the middle
square of its base.

Various visually pleasing figures can be constructed from a set of
Soma cubes, and these are often given as puzzles (the question being
how to construct them from the seven original pieces). For example, here is one
which, for obvious reasons, is sometimes called "the pyramid":

111
11211
12321
11211
111

Other variations on the puzzle include assembling larger figures from
two sets of Soma cubes, and constructing a double-size version of the
piece containing three cubes (the small "L") using the remaining six
pieces.