Understanding Dimensions

The word “dimension” in phrases like “two-dimensional” or “three-dimensional” refers to the number of coordinates needed to specify any point within some space. In the case of our two-dimensional mazes, we’ve described those points (or cells) in terms of rows and columns—two coordinates, hence, two dimensions.

If you take away all dimensions, removing all coordinates, you’ve discovered a zero-dimensional space. Such spaces seem exceedingly Zen-like, having no sense of location, but only of being. (Whoa. Dude!) In terms of our mazes, a single cell is a zero-dimensional space because without the context of other cells, it has no concept of location. You can’t go anywhere from such a free-standing cell. It’s not very exciting ...

Get Mazes for Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.