We use cellular automata rules to generate Pascal’s Triangle, Tetrahedron, 4D Simplex. We look at taking slices of these structures and we investigate similar constructions.

Function Definitions


Pascal’s Triangle


Pascal’s Pyramid

Pascal's triangle is well-understood. Now let us move to construct its 3-dimensional analogy, called Pascal's pyramid. We can use a similar automaton rule, but now we need to make appropriate choices.

Direct Approach

For the new automaton rule, we want every new entry to be the sum of three entries. If we think of this pyramid in a 3D lattice, then each new entry in the next layer is the sum of three entries in the 2-by-2 matrix above it.
MatrixForm[{{_,a_},{b_,c_}}]a+b+c
Out[]=

_
a_
b_
c_
a+b+c
Here we give three ways of visualizing a Pascal's pyramid. The first way writes down each layer of the pyramid as a square matrix. The second way combines every layer into one 3D plot using the MatrixPlot3D function defined above. The third way displays the shape of the pyramid without showing any numerical values.
data=CellularAutomaton[{{{_,a_},{b_,c_}}a+b+c},{{{1}},0},7];​​data//ReplaceAll[0Style["·",GrayLevel[.7]]]//Map[MatrixForm]//Row​​data//MatrixPlot3D​​data//ArrayPlot3D
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
1
1
·
·
·
·
·
·
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
1
2
1
·
·
·
·
·
2
2
·
·
·
·
·
·
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
1
3
3
1
·
·
·
·
3
6
3
·
·
·
·
·
3
3
·
·
·
·
·
·
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
​​
1
4
6
4
1
·
·
·
4
12
12
4
·
·
·
·
6
12
6
·
·
·
·
·
4
4
·
·
·
·
·
·
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
1
5
10
10
5
1
·
·
5
20
30
20
5
·
·
·
10
30
30
10
·
·
·
·
10
20
10
·
·
·
·
·
5
5
·
·
·
·
·
·
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
1
6
15
20
15
6
1
·
6
30
60
60
30
6
·
·
15
60
90
60
15
·
·
·
20
60
60
20
·
·
·
·
15
30
15
·
·
·
·
·
6
6
·
·
·
·
·
·
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
​​
1
7
21
35
35
21
7
1
7
42
105
140
105
42
7
·
21
105
210
210
105
21
·
·
35
140
210
140
35
·
·
·
35
105
105
35
·
·
·
·
21
42
21
·
·
·
·
·
7
7
·
·
·
·
·
·
1
·
·
·
·
·
·
·
Out[]=
Out[]=
For the previous pyramid, we select three entries arranged in a mirrored "L" shape. There are four ways to choose three numbers from a 2-by-2 matrix, and we do not get any new information by making the other three choices.
MatrixForm[{{a_,b_},{_,c_}}]a+b+c
Out[]=

a_
b_
_
c_
a+b+c
data=CellularAutomaton[{{{a_,b_},{_,c_}}a+b+c},{{{1}},0},7];​​data//ReplaceAll[0Style["·",GrayLevel[.7]]]//Map[MatrixForm]//Row​​data//MatrixPlot3D​​data//ArrayPlot3D
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
1
·
·
·
·
·
·
·
1
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
1
·
·
·
·
·
·
·
2
2
·
·
·
·
·
·
1
2
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
1
·
·
·
·
·
·
·
3
3
·
·
·
·
·
·
3
6
3
·
·
·
·
·
1
3
3
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
1
·
·
·
·
·
·
·
4
4
·
·
·
·
·
·
6
12
6
·
·
·
·
·
4
12
12
4
·
·
·
·
1
4
6
4
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
​​
1
·
·
·
·
·
·
·
5
5
·
·
·
·
·
·
10
20
10
·
·
·
·
·
10
30
30
10
·
·
·
·
5
20
30
20
5
·
·
·
1
5
10
10
5
1
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
1
·
·
·
·
·
·
·
6
6
·
·
·
·
·
·
15
30
15
·
·
·
·
·
20
60
60
20
·
·
·
·
15
60
90
60
15
·
·
·
6
30
60
60
30
6
·
·
1
6
15
20
15
6
1
·
·
·
·
·
·
·
·
·
1
·
·
·
·
·
·
·
7
7
·
·
·
·
·
·
21
42
21
·
·
·
·
·
35
105
105
35
·
·
·
·
35
140
210
140
35
·
·
·
21
105
210
210
105
21
·
·
7
42
105
140
105
42
7
·
1
7
21
35
35
21
7
1
Out[]=
Out[]=
Now if we sum up all four entries instead of three for the automaton rule, we do get a different configuration.

Stacked Pyramid

If we add spacing similar to the 2D case, we obtain the same pyramid but arranged more symmetrically. It generates a better visualization.
Again, as long as we only add three entries not colinear, the resulting shapes are all isomorphic.
On the other hand, if we add four entries instead of three, we get something different.
If, moreover, we also include the central element of the matrix in the sum, we generate a totally different pattern.

Pascal’s 4-Simplex

Due to its simplicity, our automaton rule can be generalized to higher dimensions. In that case, we construct Pascal's n-simplex in dimension n. In this notebook, we explore Pascal's 4-simplex.

Direct Approach

Since it is hard to visualize 4D objects, we create a plot for each of the tetrahedron "layers" of the 4-simplex.
From a general fact in basic geometry, we can divide a cube into five tetrahedra, one sitting in the center and the other four positioned around it. The previous 4-simplex uses the tetrahedron around the central one. The other three tetrahedra generate an isomorphic configuration. If we use the central tetrahedron, we get a totally different distribution of numbers.

Stacked Tetrahedra

Similarly, we can add space by stacking tetrahedra for a better visualization. We include these two cases below.
Again, if we use more numbers in the automaton rule, we obtain something different.

Take Slices

Now that we can easily generate Pascal's simplexes, we want to explore their distribution of numbers by looking at "slices" of these simplexes.

Slices of a Triangle

We start with a Pascal's triangle, whose structure is well understood.
We first take a vertical cut. Due to the symmetric nature of the triangle, its entries are the same as those from a subdiagonal cut.
Now we take a horizontal cut, whose entries correspond to the coefficients of binomial expansion.

Slice of a Pyramid

For a Pascal's pyramid, it has four sides. Similarly, due to its symmetric nature, it suffices to consider its horizontal, vertical and possibly diagonal slices.

Vertical Cut

The outermost vertical cut is just a copy of the Pascal's triangle.
Whereas any indented slice gives something symmetric but different.

Diagonal Cut

If we look at the diagonal or antidiagonal entries in each layer of this pyramid, we also get a new configuration.

Slice of a 4-Simplex

We can continue our exploration into a Pascal's 4-simplex, but its slices are more difficult to visualize or analyze.

Vertical Cut

Future Work

Now that we can easily generate a Pascal's n-simplex, the next step is to recognize its configuration. We can use different cut on Pascal's simplex, i.e. with customized gradient and customized shape. It produces shapes different from a Pascal's (n-1)-simplex and can possibly show new insight on the distribution of numbers or numerical identities. Moreover, we can use different automaton rules in the number generation. For instance, we can use affine actions instead of a simple addition. We can even include negative numbers to see if the simplex is bounded as the number of layer goes to infinity. There are much more to explore. With those computational results, we can further prove them using rigid mathematics.

Acknowledgement

I sincerely thank Dugan Hammock for his invaluable guidance in improving my code on cellular automata and 3D visualization, as well as for answering my questions. I am deeply grateful to Xerxes Arsiwalla for introducing me to the Winter School and inspiring me with fascinating topics and examples that have fueled my work over the past weeks. I greatly appreciate every speaker and staff member at the Winter School for creating such an enriching environment for learning. Finally, many thanks to Stephen Wolfram for his vision, leadership, and his contributions to the world of computation!

CITE THIS NOTEBOOK

Pascal's simplexes using cellular automata rules​
by Haoyu Li​
Wolfram Community, January 16, 2025
​https://community.wolfram.com/groups/-/m/t/3358433