Here are some diagrams that represent the possible paths of length 3n from one corner of an n-by-n-by-n lattice to the opposite corner. The number of paths can be calculated using the formula:
The first few terms are 1, 6, 90, 1680, 34650, 756756, 17153136, 399072960, ..., which are elements of the de Bruijn (3, n) sequence. (Compare this to the 2D version of the same idea.)
1 x 1 x 1 lattice, 6 paths:
2 x 2 x 2 lattice, 90 paths:
Designed and rendered using Mathematica 3.0 for the Apple Macintosh.
(With belated thanks to Steven C. Fairgrieve for the information on the de Bruijn sequence.)
© 1994-2002 The Math Forum