Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives
_____________________________________________
Associated Topics || Dr. Math Home || Search Dr. Math
_____________________________________________

Higher-Dimensional Cubes

Date: 07/04/2003 at 19:55:13
From: Paul Lynch
Subject: Higher-Dimensional Cubes

I've written a program that draws cubes in any number of dimensions 
between 0 and 15. It's really a simple one; it only shows perspective 
in our three natural dimensions. I've noticed, however, that the 
resulting cubes actually do have the properties that a 3-dimensional 
cube does compared to a square. 

I've been expanding on this program to have it count the number of 
edges each cube has, which is as simple as counting the number of 
lines the computer draws for each cube. What I want to do now though 
is have it display how many faces and cells of each dimension each 
cube has; right now it only shows how many cubes of each dimension it 
*draws*, not how many actually exist. I've noticed, for example, that 
a hypercube actually has eight cubic cells - I think. There's almost 
no way of telling how many 2-dimensional faces it has.

Finally, I would like to know if there is any way I can make my 
program accurately display how many cells of each dimension actually 
exist in each higher-dimensional cube. possibly in a progressive way 
so it can count them (or seem as though it is). Are there any formulas 
I can use?


Date: 07/05/2003 at 10:32:12
From: Doctor Jacques
Subject: Re: Higher-Dimensional Cubes

Hi Paul,

If you have an n-dimensional cube ("n-cube"), you can put it into a 
coordinate system:

* Pick one vertex as the origin.

* Select axes in each of the n dimensions, along the edges adjacent
  to the vertex in question.

* Choose the unit of length equal to the length of the side of the
  cube.

In this way, each vertex of the n-cube is represented by a set of n 
coordinates, and each of those coordinates is equal to either 0 or 1. 
For example, for a 2-cube (a square), we have:

  (0,1)      (1,1)
   +---------+
   |         |
   |         |
   |         |
   |         |
   |         |
   +---------+
  (0,0)      (1,0)

This shows that the number of vertices is equal to the number of 
ordered sets of n numbers, each equal to 0 or 1. As you have two 
possibilities for each coordinate, and there are n coordinates, this 
gives a total of 2^n vertices.

Note that we have to extend the definition for n = 0 and 1:

* A 0-cube is a single vertex
* A 1-cube is a line segment

Let us now consider the number of k-cells in an n-cube. A k-cell is a 
k-cube, so it will consist of 2^k vertices. A k-cell is defined by:

* A set of k coordinates, that define the "orientation" of the cell.

* A set of values for the remaining coordinates, that define the
  position of the cell compared to other "parallel" cells.

For example, consider the 1-cells (edges) in a 3-cube. As an edge is 
one-dimensional, you define its orientation by selecting one of the 
three dimensions, for example, x (if the three directions are x,y,z). 
The edge will contain two vertices, corresponding to x = 0 and x = 1. 
To select a particular edge in the x direction, you need to specify y 
and z; each of these can be either 0 and 1, for a total of 4 
possibilities - you have 4 edges in the x direction. As there are 
three possible directions, you find a total of 12 edges.

Let now consider the 2-cells (faces) in a 3-cube. A 2-cell has 2 
dimensions, so you must select two of the axes to define its 
orientation - let us choose x and y. The face will contain vertices 
where x and y each takes the values 0 and 1, for a total of 4 
vertices. For a given orientation, the position of the face is given 
by the z coordinate, which can be 0 or 1: there are two faces in any 
given orientation. You can select the two axes of the cell in 3 ways, 
giving a total of 6 faces.

In general, to define a k-cell in an n-cube:

* You select an orientation, by choosing k coordinates from the n
  available - you can do this in C(n,k) ways.

* You assign values to the remaining (n-k) coordinates - you can do
  this in 2^(n-k) ways.

So the total number of k-cells is given by:

  T(k,n) = C(n,k)*2^(n-k)

Notice that this is the term in 2^(n-k) in the binomial expansion of:

  (1 + 2)^n = 3^n

and this gives you a nice identity: the total number of cells (of 
all dimensions from 0 to n) in an n-cube is 3^n.

For example, with n = 3 (a cube):

* There are 8 0-cells (vertices)
* There are 12 1-cells (edges)
* There are 6 2-cells (faces)
* There is 1 3-cell (the cube itself)

for a total of 3^3 = 27.

Does this help?  Write back if you'd like to talk about this 
some more, or if you have any other questions.

- Doctor Jacques, The Math Forum
  http://mathforum.org/dr.math/ 
Associated Topics:
College Polyhedra

Search the Dr. Math Library:


Find items containing (put spaces between keywords):
 
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

_____________________________________
Math Forum Home || Math Library || Quick Reference || Math Forum Search
_____________________________________

Ask Dr. MathTM
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/