I have found a simpler solution, but not as simple, as I hoped.
I had hoped, that it would be possible, to find some pattern, how the number of squares depend on the dimenions of the cube.
The problem is, that there are too few cases, to find a pattern. We can only use following sequence:
- one point
- one segment with length 1
- one square, which side length is 1
- one cube, which edges have the length 1
At dimension 2 there is 1 square ( 4 corners )
At dimension 3 there are 6 squares ( 8 corners )
That is not enough information, to derive an equation for the number of squares, depending on the dimension or the number of corners.
Therefore we have to do some other calculations:
- we know, that each square has 2 diagonals, each 1.414 long.
- therefore we just calculate for each cube the number of diagonals of length 1.414 and divide it by 2. That must give us the number of squares for each cube of n dimensions.
We know the number of corners and the coordinates for each cube of dimension n.
- with that information we calculate the distances between all points and will find:
- number of edges
- number of diagonals in squares
- number of diagonals in cubes of dimension n and in less dimensions ( Hypercubes )
The calculations are quite easy, but there are needed many of them.
Example for a cube of dimension 4:
distance between P11(1,0,1,1) and P9(1,1,0,1) is
Squareroot ( 1+1+1 ) = 1.73,
which is a diagonal in a 3 dimensional Hypercube. ( Hypercubes are all cubes, which have a lower dimension than the space, in which they are embedded.
We will create a table, in which all points are in the first row and the first column and then we calculate the distances between them. ( only for the triangular list above the diagonal ). There are needed (16*16-16)/2 = 16(16-1)/2 = 8*15 = 120 calculations, what is still manually manageable.
That is a good opportunity, to use the spreadsheet calculation in StarOffice:
- in the cells of the first row and first column Point 0 to point 15 is ( P0 to P15 ) written.
- in the cells of the second row and the second column, the coordinates of these points are written.
- in the cells above the diagonal all distances between the 16 points are written.
Here is some part of the spreadsheet, to demonstrate, how the table looks like. The calculations themselves are easy, mistakes can happen, which we will find out, when the table is complete, because then we will see some patterns, which are interrupted, when we made a mistake.