The **Soma cube** is a solid dissection puzzle invented by Piet Hein in 1933^{[1]} during a lecture on quantum mechanics conducted by Werner Heisenberg. Seven pieces made out of unit cubes must be assembled into a 3Ã—3Ã—3 cube. The pieces can also be used to make a variety of other 3D shapes.

The pieces of the Soma cube consist of all possible combinations of three or four unit cubes, joined at their faces, such that at least one inside corner is formed. There is one combination of three cubes that satisfies this condition, and six combinations of four cubes that satisfy this condition, of which two are mirror images of each other (see Chirality). Thus, 3 + (6 Ã— 4) is 27, which is exactly the number of cells in a 3Ã—3Ã—3 cube.

The Soma cube has been discussed in detail by Martin Gardner and John Horton Conway, and the book *Winning Ways for your Mathematical Plays* contains a detailed analysis of the Soma cube problem. There are 240 distinct solutions of the Soma cube puzzle, excluding rotations and reflections: these are easily generated by a simple recursive backtracking search computer program similar to that used for the eight queens puzzle.

The seven Soma pieces are six polycubes of order four and one of order three:

- Piece 1, or “V”.
- Piece 2, or “L”: a row of three blocks with one added below the left side.
- Piece 3, or “T”: a row of three blocks with one added below the center.
- Piece 4, or “Z”: bent triomino with block placed on outside of clockwise side.
- Piece 5, or “A”: unit cube placed on top of clockwise side. Chiral in 3D.
- Piece 6, or “B”: unit cube placed on top of anticlockwise side. Chiral in 3D.
- Piece 7, or “P”: unit cube placed on bend. Not chiral in 3D.
^{[2]}