Polygon Partitioning and Piled-Pile Sequences on an Equilateral Triangular Lattice

by gg582 · 2026-08-14 11:26:13 · 25 views

Table of contents

Piled-pile summation (堆垛術, Toeta-sul) is a computational method of arranging points or cells regularly on a lattice and calculating changes in their quantities as layers are added or subtracted.

Here, the single-faced triangular pile (擬長一面尖垛, Uijang-ilmyeon-cheomta) from the Gu-Su-Ryak (九數略) serves as the minimal triangular unit. We first calculate the single-faced triangular pile and the single-faced trapezoidal pile (擬長一面平垛, Uijang-ilmyeon-pyeongta), and subsequently apply them to regular octagons, regular decagons, and regular dodecagons bisected along their center lines.

A semi-polygon is determined by bisecting a regular polygon exactly. It is then superimposed onto an equilateral triangular lattice, where the width of each layer is counted and decomposed toward the center line.

At this stage, triangular piles formed near the outer boundary have greater depth, whereas triangular piles separated closer to the center line have shorter remaining depth and are therefore smaller.

Accordingly, the computational sequence proceeds as follows:

\text{Regular } 2q\text{-gon} \rightarrow \text{Center Line Bisection} \rightarrow \text{Equilateral Triangular Lattice}

\rightarrow \text{Layer-wise Counting} \rightarrow \text{Triangular Pile Decomposition} \rightarrow \text{Shared Cell Elimination}

\rightarrow \text{Finite Differences} \rightarrow \text{Tian Yuan Shu} \rightarrow \text{Series} \rightarrow \text{Division Algorithm}

Modern coordinates and summation notation (\Sigma) are utilized for concise bookkeeping, while actual state transitions are tracked via counting rods (籌策, Sanchae / 算木, Sanmok), finite differences (階差, Gyecha), and the celestial element method (天元術, Tian Yuan Shu / Cheonwonsul, an algebraic method for polynomial manipulation).


1. Coordinates of the Equilateral Triangular Lattice

Consider an equilateral triangle with side length 1.

Dropping a perpendicular from a vertex to the base divides the base into two equal segments.

Let the base (Gou / 勾) be a, the height (Gu / 股) be b, and the hypotenuse (Xian / 弦) be c:

a=\frac12

c=1

By the Gou-Gu theorem / Pythagorean theorem (勾股術, Gou-Gu-shu):

a^2+b^2=c^2

Substituting values:

\left(\frac12\right)^2+b^2=1

Thus:

\frac14+b^2=1

and

b^2=\frac34

Since length is strictly positive:

\boxed{b=\frac{\sqrt3}{2}}

Let the height of a single layer be:

h=\frac{\sqrt3}{2}

\begin{tikzpicture}[scale=1.15] \def\h{0.8660254} \draw[thick] (0,0) -- (4,0) -- (2,{4*\h}) -- cycle; \foreach \j in {0,...,4} { \pgfmathtruncatemacro{\imax}{4-\j} \foreach \i in {0,...,\imax} { \fill ({\i+0.5*\j},{\h*\j}) circle (2pt); } } \draw[dashed] (2,0) -- (2,\h); \node[below] at (1.75,0) {$a=\frac12$}; \node[right] at (2,{0.5*\h}) {$b=\frac{\sqrt3}{2}$}; \node[above left] at (1.5,{0.5*\h}) {$c=1$}; \end{tikzpicture}

The left reference point of the j-th layer is:

\left(\frac j2,hj\right)

Moving i units to the right within the same layer gives the lattice point:

L_{i,j}=\left(i+\frac j2,hj\right)

Therefore:

\boxed{L_{i,j}=\left(i+\frac j2,\frac{\sqrt3}{2}j\right)}


2. Single-Faced Triangular Pile (擬長一面尖垛)

Let the depth of the single-faced triangular pile be n.

The number of cells per layer is:

1,2,3,\ldots,n

Letting the total quantity be T(n):

T(n)=1+2+\cdots+n

Therefore:

T(n)=\sum_{k=1}^{n}k

which yields:

\boxed{ T(n)=\frac{n(n+1)}2 }

Examining several depths directly:

\begin{tikzpicture}[scale=0.7] \def\h{0.8660254} \begin{scope} \foreach \j in {0,...,2} { \pgfmathtruncatemacro{\imax}{2-\j} \foreach \i in {0,...,\imax} { \fill ({\i+0.5*\j},{\h*\j}) circle (2pt); } } \draw[thick] (0,0) -- (2,0) -- (1,{2*\h}) -- cycle; \node[below] at (1,-0.4) {$n=2$}; \end{scope} \begin{scope}[xshift=4cm] \foreach \j in {0,...,3} { \pgfmathtruncatemacro{\imax}{3-\j} \foreach \i in {0,...,\imax} { \fill ({\i+0.5*\j},{\h*\j}) circle (2pt); } } \draw[thick] (0,0) -- (3,0) -- (1.5,{3*\h}) -- cycle; \node[below] at (1.5,-0.4) {$n=3$}; \end{scope} \begin{scope}[xshift=9cm] \foreach \j in {0,...,4} { \pgfmathtruncatemacro{\imax}{4-\j} \foreach \i in {0,...,\imax} { \fill ({\i+0.5*\j},{\h*\j}) circle (2pt); } } \draw[thick] (0,0) -- (4,0) -- (2,{4*\h}) -- cycle; \node[below] at (2,-0.4) {$n=4$}; \end{scope} \end{tikzpicture}
n T(n)
1 1
2 3
3 6
4 10
5 15
6 21

3. Tracking States of Triangular Piles via Counting Rods

Counting rods alternate between vertical (縱, Zong) and horizontal (橫, Heng) forms across positional columns.

Number Vertical Form (縱式) Horizontal Form (橫式)
1 𝍩 𝍠
2 𝍪 𝍡
3 𝍫 𝍢
4 𝍬 𝍣
5 𝍭 𝍤
6 𝍮 𝍥
7 𝍯 𝍦
8 𝍰 𝍧
9 𝍱 𝍨

An empty positional slot is denoted by ◯.

Depth Value Counting Rods
1 1 𝍩
2 3 𝍫
3 6 𝍮
4 10 𝍠◯
5 15 𝍠𝍭
6 21 𝍡𝍩

Taking finite differences (階差, Gyecha):

State n=1 n=2 n=3 n=4 n=5
Original Values (原數) 1 3 6 10 15
First Differences (一階差 / 1차 계차) - 2 3 4 5
Second Differences (二階差 / 2차 계차) - - 1 1 1

The exact arithmetic operations are:

3-1=2

6-3=3

10-6=4

15-10=5

Taking differences once more:

3-2=1

4-3=1

5-4=1

Therefore:

\boxed{ \Delta^2T(n)=1 }

A single triangular pile can be characterized as a primitive piled pile whose second finite difference is 1.


4. Single-Faced Trapezoidal Pile (擬長一面平垛)

A single-faced trapezoidal pile widens layer by layer in a trapezoidal profile.

When depth is n, layer widths are set to:

n,n+1,n+2,\ldots,2n-1

\begin{tikzpicture}[scale=0.75] \def\h{0.8660254} \foreach \i in {0,...,3} { \fill (\i,0) circle (2pt); } \foreach \i in {0,...,4} { \fill ({-0.5+\i},\h) circle (2pt); } \foreach \i in {0,...,5} { \fill ({-1+\i},{2*\h}) circle (2pt); } \foreach \i in {0,...,6} { \fill ({-1.5+\i},{3*\h}) circle (2pt); } \draw[very thick] (0,0) -- (3,0) -- (4.5,{3*\h}) -- (-1.5,{3*\h}) -- cycle; \node[left] at (-0.3,0) {$n$}; \node[left] at (-0.8,\h) {$n+1$}; \node[left] at (-1.3,{2*\h}) {$n+2$}; \node[left] at (-1.8,{3*\h}) {$n+3$}; \end{tikzpicture}

Letting the total quantity be F(n):

F(n)=\sum_{k=0}^{n-1}(n+k)

Splitting the summation:

F(n)=n^2+\sum_{k=0}^{n-1}k

Thus:

F(n)=n^2+\frac{n(n-1)}2

which simplifies to:

\boxed{ F(n)=\frac{3n^2-n}{2} }

n Layer Widths F(n)
1 1 1
2 2, 3 5
3 3, 4, 5 12
4 4, 5, 6, 7 22
5 5, 6, 7, 8, 9 35

5. Decomposing Trapezoidal Piles into Triangular Piles

The same trapezoidal pile can be enumerated as an overlap of three triangular piles: two outer large triangular piles and one smaller central triangular pile.

Their respective depths are:

n,\quad n,\quad n-1

Let the uncorrected sum prior to eliminating redundant counts be R_3(n):

R_3(n)=2T(n)+T(n-1)

Retaining the trapezoidal outer perimeter, the internal decomposition lines are indicated:

\begin{tikzpicture}[scale=0.85] \coordinate (A) at (0,0); \coordinate (B) at (4,0); \coordinate (C) at (5,3); \coordinate (D) at (-1,3); \draw[very thick] (A) -- (B) -- (C) -- (D) -- cycle; \coordinate (O1) at (1.3,1.4); \coordinate (O2) at (2.7,1.4); \draw[dashed] (A) -- (O1) -- (D); \draw[dashed] (B) -- (O2) -- (C); \draw[dashed] (O1) -- (O2); \draw[dashed] (O1) -- (B); \draw[dashed] (O2) -- (D); \node at (0.9,1.1) {$T(n)$}; \node at (3.1,1.1) {$T(n)$}; \node at (2,2.2) {$T(n-1)$}; \end{tikzpicture}

Evaluating the uncorrected sum:

R_3(n)=2\frac{n(n+1)}2+\frac{n(n-1)}2

Therefore:

R_3(n)=n(n+1)+\frac{n(n-1)}2

which yields:

\boxed{R_3(n)=\frac{3n^2+n}{2}}

However, direct layer-wise enumeration gave:

F(n)=\frac{3n^2-n}{2}

The redundant duplicate count is therefore:

E_3(n)=R_3(n)-F(n)

That is:

E_3(n)=\frac{2n}{2}

Hence:

\boxed{ E_3(n)=n }

Consequently:

\boxed{F(n)=2T(n)+T(n-1)-n}


6. Tracking Trapezoidal Piles on the Counting Board

Take n=4 as an example:

T(4)=10

T(3)=6

Placing the first triangular pile:

10

Adding the second triangular pile:

10+10=20

Adding the small triangular pile:

20+6=26

Subtracting the 4 shared cells:

26-4=22

State Operation Value Counting Rods
First Triangular Pile T(4) 10 𝍠◯
Adding Second Triangular Pile 10+10 20 𝍡◯
Adding Small Triangular Pile 20+6 26 𝍡𝍮
Eliminating Shared Cells 26-4 22 𝍡𝍪

The counting board (算盤, Sanpan) transitions across states:

10\rightarrow20\rightarrow26\rightarrow22

Direct layer-by-layer summation also gives:

4+5+6+7=22

Thus, both computational paths match identically.


7. Definition of the Semi-2q-gon

Now consider a regular 2q-gon centered at the origin with circumradius R.

Let its vertices be:

V_r=(x_r,y_r)

The angles are defined by:

\theta_r=\frac{\pi}{2}-\frac{r\pi}{q}

giving:

x_r=R\cos\theta_r

y_r=R\sin\theta_r

where r traverses:

0,1,\ldots,2q-1

Bisecting exactly along the vertical center line:

x=0

Let the right semi-polygon be H_q:

\boxed{H_q=P_{2q}\cap\{x\ge0\}}


8. Semi-Octagon

For q=4, we obtain a regular octagon:

\begin{tikzpicture}[scale=1] \foreach \k in {0,...,7} { \coordinate (P\k) at ({90-45*\k}:3); } \fill[gray!15] (P0) -- (P1) -- (P2) -- (P3) -- (P4) -- cycle; \draw[gray, thick] (P0) -- (P1) -- (P2) -- (P3) -- (P4) -- (P5) -- (P6) -- (P7) -- cycle; \draw[very thick] (P0) -- (P1) -- (P2) -- (P3) -- (P4); \draw[dashed] (P0) -- (P4); \node[right] at (1.6,0) {half octagon}; \end{tikzpicture}

Only equilateral triangular lattice points within this semi-octagon are retained.


9. Semi-Decagon

For q=5, we obtain a regular decagon:

\begin{tikzpicture}[scale=1] \foreach \k in {0,...,9} { \coordinate (P\k) at ({90-36*\k}:3); } \fill[gray!15] (P0) -- (P1) -- (P2) -- (P3) -- (P4) -- (P5) -- cycle; \draw[gray, thick] (P0) -- (P1) -- (P2) -- (P3) -- (P4) -- (P5) -- (P6) -- (P7) -- (P8) -- (P9) -- cycle; \draw[very thick] (P0) -- (P1) -- (P2) -- (P3) -- (P4) -- (P5); \draw[dashed] (P0) -- (P5); \node[right] at (1.7,0) {half decagon}; \end{tikzpicture}

The semi-decagon is intersected with the equilateral triangular lattice in the exact same manner.


10. Semi-Dodecagon

For q=6, we obtain a regular dodecagon:

\begin{tikzpicture}[scale=1] \foreach \k in {0,...,11} { \coordinate (P\k) at ({90-30*\k}:3); } \fill[gray!15] (P0) -- (P1) -- (P2) -- (P3) -- (P4) -- (P5) -- (P6) -- cycle; \draw[gray, thick] (P0) -- (P1) -- (P2) -- (P3) -- (P4) -- (P5) -- (P6) -- (P7) -- (P8) -- (P9) -- (P10) -- (P11) -- cycle; \draw[very thick] (P0) -- (P1) -- (P2) -- (P3) -- (P4) -- (P5) -- (P6); \draw[dashed] (P0) -- (P6); \node[right] at (1.6,0) {half dodecagon}; \end{tikzpicture}

As q increases, the perimeter of the semi-polygon contains more line segments. The transition points between these segments dictate the locations of triangular pile decomposition.


11. Superimposing Semi-Polygons onto the Equilateral Triangular Lattice

Let n be the depth parameter.

To scale the regular polygon proportionally with n, set the circumradius to:

R_n=nh

That is:

R_n=\frac{\sqrt3}{2}n

The horizontal lattice layers are positioned at:

y_j=hj

Let the x-coordinate of the right boundary of the semi-polygon be:

X_{q,n}(y)

For a lattice point in the j-th layer:

x=i+\frac j2

The inclusion criteria within the semi-polygon are:

0\le i+\frac j2

and

i+\frac j2 \le X_{q,n}(hj)

Therefore:

i_{\min}(j)=\left\lceil-\frac j2\right\rceil

and

i_{\max}(j)=\left\lfloor X_{q,n}(hj)-\frac j2\right\rfloor

Let w_{q,n}(j) be the cell count in the j-th layer:

w_{q,n}(j)=i_{\max}(j)-i_{\min}(j)+1

The exact layer width is determined by:

i_{\max}(j)=\left\lfloor X_{q,n}(hj)-\frac j2\right\rfloor

If a layer lies outside the polygon, w_{q,n}(j)=0.


12. Inclusion of Boundary Points

Lattice points situated directly on the cutting line or outer perimeter of the semi-polygon are included.

Hence, boundary conditions contain equality.

For instance, when a boundary line is given by f(x,y)=0, the domain is taken as:

f(x,y)\le0

Letting A and B be endpoints of a segment, the midpoint is:

M=\frac{A+B}{2}

If M is a lattice point, it is retained.

\begin{tikzpicture}[scale=1] \coordinate (A) at (0,0); \coordinate (M) at (2,1); \coordinate (B) at (4,2); \draw[thick] (A) -- (B); \fill (A) circle (2.3pt); \fill (M) circle (3pt); \fill (B) circle (2.3pt); \node[below left] at (A) {$A$}; \node[above] at (M) {$M$}; \node[above right] at (B) {$B$}; \node[below] at (2,-0.45) {included}; \end{tikzpicture}

13. Linear Boundary Functions per Polygon Edge

Let consecutive vertices be:

V_r=(x_r,y_r)

and

V_{r+1}=(x_{r+1},y_{r+1})

Define the reciprocal slope:

\lambda_r=\frac{x_{r+1}-x_r}{y_{r+1}-y_r}

The boundary segment between these vertices is expressed as:

X_r(y)=x_r+\lambda_r(y-y_r)

which takes the linear form:

\boxed{ X_r(y)=a_ry+b_r }

A single linear expression applies along each edge, switching to another linear form past each vertex. Consequently, the rate of increase of layer widths alters near vertices.


14. Superimposed Lattice Geometries

Superimposing the triangular lattice onto the semi-octagon:

\begin{tikzpicture}[scale=0.8] \def\h{0.8660254} \begin{scope} \clip (0,3) -- ({3/sqrt(2)},{3/sqrt(2)}) -- (3,0) -- ({3/sqrt(2)},{-3/sqrt(2)}) -- (0,-3) -- cycle; \foreach \j in {-4,...,4} { \draw[gray!35] (-1,{\j*\h}) -- (4,{\j*\h}); } \foreach \k in {-5,...,5} { \draw[gray!35] ({\k-3},-3) -- ({\k+3},{3*\h}); \draw[gray!35] ({\k+3},-3) -- ({\k-3},{3*\h}); } \end{scope} \draw[very thick] (0,3) -- ({3/sqrt(2)},{3/sqrt(2)}) -- (3,0) -- ({3/sqrt(2)},{-3/sqrt(2)}) -- (0,-3) -- cycle; \draw[dashed] (0,3) -- (0,-3); \end{tikzpicture}

Superimposing the lattice onto the semi-decagon:

\begin{tikzpicture}[scale=0.8] \def\h{0.8660254} \begin{scope} \clip (0,3) -- ({3*cos(54)},{3*sin(54)}) -- ({3*cos(18)},{3*sin(18)}) -- ({3*cos(-18)},{3*sin(-18)}) -- ({3*cos(-54)},{3*sin(-54)}) -- (0,-3) -- cycle; \foreach \j in {-4,...,4} { \draw[gray!35] (-1,{\j*\h}) -- (4,{\j*\h}); } \foreach \k in {-5,...,5} { \draw[gray!35] ({\k-3},-3) -- ({\k+3},{3*\h}); \draw[gray!35] ({\k+3},-3) -- ({\k-3},{3*\h}); } \end{scope} \draw[very thick] (0,3) -- ({3*cos(54)},{3*sin(54)}) -- ({3*cos(18)},{3*sin(18)}) -- ({3*cos(-18)},{3*sin(-18)}) -- ({3*cos(-54)},{3*sin(-54)}) -- (0,-3) -- cycle; \draw[dashed] (0,3) -- (0,-3); \end{tikzpicture}

15. Origin of Floor Functions in Octagons and Decagons

The three primary axes of the equilateral triangular lattice are separated by 60^\circ.

However, edges of a regular octagon change direction at 45^\circ increments, and those of a regular decagon at 36^\circ increments.

Because edges do not consistently align with lattice directions, boundary lines do not pass through lattice points on every layer. A point just inside the boundary in one layer may fall outside in the next layer, necessitating:

\lfloor x\rfloor \quad \text{and} \quad \lceil x\rceil

These floor and ceiling functions arise naturally when exact regular polygons and exact triangular lattices are simultaneously maintained.


16. Total Exact Cell Counts of Semi-Polygons

Summing across all included layers from minimum index j_- to maximum index j_+:

\boxed{P_q(n)=\sum_{j=j_-}^{j_+}w_{q,n}(j)}

Specifically, for the semi-octagon:

P_4(n)=\sum_jw_{4,n}(j)

For the semi-decagon:

P_5(n)=\sum_jw_{5,n}(j)

For the semi-dodecagon:

P_6(n)=\sum_jw_{6,n}(j)

In general:

\boxed{P_q(n)=\sum_jw_{q,n}(j)}


17. Identifying Triangular Piles from Layer Widths

Placing layer widths on the counting board from top to bottom:

w_0,w_1,w_2,\ldots,w_N

Setting initial boundary conditions w_{-2}=w_{-1}=0.

The first finite difference (一階差) is:

d_r=w_r-w_{r-1} \quad (d_{-1}=0)

The second finite difference (二階差) is:

\gamma_r=d_r-d_{r-1}

Thus:

\boxed{ \gamma_r=\Delta^2w_r }

\gamma_r indicates how the rate of change in layer width alters at layer r.


18. Finite Difference Transitions vs. Polygon Vertices

Along a single edge, the boundary function is linear and the width increase follows a uniform rule.

Passing a vertex alters the boundary slope, shifting the pattern of d_r.

On a macro scale, this yields the correspondence:

\boxed{ \text{Vertices} \longleftrightarrow \text{Transition Points of Finite Differences} }

A semi-octagon boundary comprises 4 edges, partitioning the macro-geometry into 4 major segments. A semi-decagon has 5 segments, and a semi-dodecagon has 6.

Here, q denotes the number of major geometric segments formed by the q boundary edges. When edges do not align with lattice vectors, floor/ceiling functions introduce additional micro-fluctuations in finite differences within a segment.

Thus, non-zero terms in the second finite differences are not strictly limited to q. We first isolate q primary geometric triangular pile components, handling secondary fluctuations via separate lattice correction piles.


19. Decreasing Size of Triangular Piles Toward the Center Line

Decomposing from the outer perimeter toward the center line, let remaining lattice depth from the r-th division point to the center line be D_r.

Because outer partitions occur further from the center line:

D_1>D_2>D_3>\cdots

Since cell count scales with depth as T(D_r)=\frac{D_r(D_r+1)}2:

T(D_1)>T(D_2)>T(D_3)>\cdots

Triangular piles separated closer to the center line are strictly smaller.

\begin{tikzpicture}[scale=0.85] \draw[very thick] (0,3) -- (2.1,2.1) -- (3,0) -- (2.1,-2.1) -- (0,-3) -- cycle; \draw[dashed] (0,3) -- (0,-3); \draw[dashed] (2.1,2.1) -- (0,0); \draw[dashed] (3,0) -- (0,0); \draw[dashed] (2.1,-2.1) -- (0,0); \node at (1.8,0.7) {$T(D_1)$}; \node at (1.1,1.8) {$T(D_2)$}; \node at (0.55,2.45) {$T(D_3)$}; \node[left] at (0,0) {center line}; \end{tikzpicture}

This strict monotonic ordering arises directly from remaining depth geometry.


20. Signature of a Triangular Pile in Finite Differences

If the increment in width increases by +1 at a given layer and the remaining depth is D, additional cells accumulate across subsequent layers as:

1,2,3,\ldots,D

The total added quantity is:

1+2+\cdots+D

which is:

\boxed{T(D)=\frac{D(D+1)}2}

A +1 in the second finite difference marks the inception of a new triangular pile. A value of +2 corresponds to two co-originating triangular piles of that depth, and +3 corresponds to three.


21. Exact Reconstruction of Triangular Piles from Finite Differences

For N+1 total layers, separate positive and negative components of \gamma_r:

\gamma_r^+=\max(\gamma_r,0)

\gamma_r^-=\max(-\gamma_r,0)

Let the remaining depth past the r-th transition be D_r=N-r+1.

The uncorrected sum of instantiated triangular piles is:

R=\sum_r\gamma_r^+T(D_r)

The triangular correction term to subtract is:

E=\sum_r\gamma_r^-T(D_r)

The exact total sum is:

\boxed{ P=R-E }

or equivalently:

\boxed{P=\sum_r\gamma_rT(D_r)}

This identity follows from double accumulation. Since d_{-1}=0 and \gamma_r=d_r-d_{r-1}:

d_k=\sum_{r=0}^{k}\gamma_r \quad (0\le k\le N)

Since w_{-1}=0 and d_k=w_k-w_{k-1}:

w_k=\sum_{s=0}^{k}d_s=\sum_{s=0}^{k}\sum_{r=0}^{s}\gamma_r

Reversing summation order:

\boxed{w_k=\sum_{r=0}^{k}(k-r+1)\gamma_r}

Summing total pile count P=\sum_{k=0}^{N}w_k:

P=\sum_{k=0}^{N}\sum_{r=0}^{k}(k-r+1)\gamma_r=\sum_{r=0}^{N}\gamma_r\sum_{k=r}^{N}(k-r+1)

With D_r=N-r+1, the inner sum evaluates to 1+2+\cdots+D_r=T(D_r), establishing:

\boxed{P=\sum_{r=0}^{N}\gamma_rT(D_r)}

Decomposing \gamma_r=\gamma_r^+-\gamma_r^-:

P=\sum_r\gamma_r^+T(D_r)-\sum_r\gamma_r^-T(D_r)=R-E

Positive second differences represent added triangular piles; negative second differences represent subtracted correction piles.


22. Triangular Pile Decomposition on the Counting Board

Consider a sample layer width sequence on the counting board:

Layer 0 1 2 3 4 5
Original Values (原數) 1 2 4 7 9 10
First Differences (一階差 / 1차 계차) - 1 2 3 2 1
Second Differences (二階差 / 2차 계차) - - 1 1 -1 -1

The initial +1,+1 sequence indicates sequential instantiation of triangular piles. The subsequent -1,-1 sequence denotes subtraction of overlapping redundant counts.

The counting board tracks:

\text{Original Values (原數)} \rightarrow \text{First Differences (一階差)} \rightarrow \text{Second Differences (二階差)}

to identify pile generation and subtraction directly.


23. Frequency of Shared Cells

Let the constituent triangular piles be A_1,A_2,\ldots,A_m.

Let \mu(c) denote the multiplicity of cell c:

\mu(c)=\sum_{r=1}^{m}\mathbf{1}_{A_r}(c)

In the target polygon, each cell must be counted exactly once. The excess usage is \mu(c)-1, giving total redundant subtraction:

\boxed{E=\sum_{\mu(c)\ge2}[\mu(c)-1]}

This expression accounts for double, triple, and higher-order overlaps simultaneously.


24. Tracking Redundant Subtraction with Counting Rods

Assume an uncorrected pile sum of 48 with sequential excess overlaps of 5,3,2:

48-5=43

43-3=40

40-2=38

State Value
Uncorrected Pile Sum 48
After 1st Subtraction 43
After 2nd Subtraction 40
Final Reconciled Value 38

Step-by-step subtraction preserves intermediate states for validation.


25. Computational Procedure for the Semi-Octagon

  1. Compute w_{4,n}(j) across all layers and place values on the counting board.
  2. Compute \Delta w_{4,n} followed by \Delta^2w_{4,n}.
  3. Decompose the semi-octagon into 4 primary geometric triangular pile components based on major second-difference inflection points, reserving micro-variations as lattice correction piles.
  4. Arrange triangular piles inward toward the center line:

D_1>D_2>D_3>D_4

  1. Compute total count:

P_4(n)=R_4(n)-E_4(n)

where

R_4(n)=\sum_r\gamma_{4,r}^+T(D_{4,r}), \quad E_4(n)=\sum_r\gamma_{4,r}^-T(D_{4,r})


26. Computational Procedure for the Semi-Decagon

Following the identical procedure for q=5:

  1. Compute w_{5,n}(j), \Delta w_{5,n}, and \Delta^2w_{5,n}.
  2. Five primary geometric edges produce 5 primary triangular pile components, with boundary floor functions producing secondary correction terms.
  3. Ordered depths satisfy:

D_1>D_2>D_3>D_4>D_5

  1. Evaluate:

P_5(n)=R_5(n)-E_5(n)


27. Computational Procedure for the Semi-Dodecagon

For q=6:

  1. Compute w_{6,n}(j), obtaining 6 primary geometric triangular pile components alongside lattice cut corrections.
  2. Ordered depths satisfy:

D_1>D_2>\cdots>D_6

  1. Evaluate:

P_6(n)=R_6(n)-E_6(n)


28. General Semi-2q-gon Formulation

For an arbitrary semi-2q-gon:

\boxed{w_{q,n}(j)=i_{\max}(j)-i_{\min}(j)+1}

where

i_{\min}(j)=\left\lceil-\frac j2\right\rceil, \quad i_{\max}(j)=\left\lfloor X_{q,n}(hj)-\frac j2\right\rfloor

The total cell count is:

\boxed{P_q(n)=\sum_jw_{q,n}(j)}

Expressed via triangular pile decomposition:

\boxed{P_q(n)=R_q(n)-E_q(n)}

where

R_q(n)=\sum_r\gamma_{q,r}^+T(D_{q,r}), \quad E_q(n)=\sum_r\gamma_{q,r}^-T(D_{q,r})


29. Invariant Structure Across Generalization

The structural steps remain invariant across all q:

Step Operation
1 Bisect the regular 2q-gon
2 Intersect with the triangular lattice
3 Count layer widths w_{q,n}
4 Compute first differences (\Delta w)
5 Compute second differences (\Delta^2 w)
6 Identify triangular pile origin points
7 Compute remaining depth to the center line
8 Decompose from large to small triangular piles
9 Eliminate shared redundant cells
10 Obtain total piled-pile sum (P_q)

30. Case of Alignment with Lattice Vectors

When polygon edges align precisely with triangular lattice vectors, floor functions simplify. Pile depths reduce to integer linear polynomials:

D_r(n)=a_rn+b_r

T(D_r(n)) is quadratic in n, rendering the overall piled-pile sum a pure quadratic polynomial with constant second differences.


31. Case of Misalignment with Lattice Vectors

When edge orientations deviate from lattice vectors (as in octagons and decagons), pile depths take the form:

D_r(n)=\lfloor\alpha_rn+\beta_r\rfloor

P_q(n) splits into a macro quadratic growth term and an oscillatory lattice correction:

P_q(n)=Q_q(n)+C_q(n)


32. Tracking Floor Function Transitions on the Counting Board

Let d(n)=\lfloor\alpha n+\beta\rfloor. The single-step increment is:

\delta(n)=d(n+1)-d(n)

For 0 < \alpha < 1, \delta(n)\in\{0,1\}, producing binary shift patterns (0,1,0,1,1,0,\ldots) on the board that govern layer-by-layer depth additions.


33. Analyzing Boundary Differences via Continued Fractions

Expanding slope \alpha as a continued fraction:

\alpha=[a_0;a_1,a_2,a_3,\ldots]

Its convergents satisfy:

\frac{p_r}{s_r}\rightarrow\alpha

Convergents provide optimal rational approximations, determining the precise periodic intervals at which the boundary acquires or sheds lattice points.


34. Slopes in the Semi-Octagon

Regular octagons introduce 45^\circ-derived slopes involving:

\tan\frac{\pi}{8}=\sqrt2-1, \quad \tan\frac{3\pi}{8}=\sqrt2+1

The continued fraction for \sqrt2 is:

\boxed{ \sqrt2=[1;2,2,2,\ldots] }

generating periodic rational approximations for the boundary corrections.


35. Slopes in the Semi-Decagon

Regular decagons introduce slopes derived from 36^\circ and 72^\circ (\tan 36^\circ, \tan 72^\circ). Continued fractions provide exact rational approximations to track non-lattice slope steps on the integer grid.


36. Reconstructing Polynomial Parts via Tian Yuan Shu (天元術)

Let the macro quadratic component be:

Q(n)=An^2+Bn+C

With constant second difference c:

2A=c \implies A=\frac c2

Place A on the square position (平方, Pingfang):

Position Coefficient
Constant (太極 / 0차)
Linear (天元 / 1차)
Square (平方 / 2차) \frac c2

Subtract the first difference generated by \frac c2 n^2 from the actual first difference; place the residual on the linear position (天元, Tianyuan).

Finally, place the difference between the actual initial term and the evaluated quadratic expression on the constant position (太極, Taiji):

\text{Second Difference (二階差)} \rightarrow \text{Square (平方)}

\text{First Difference (一階差)} \rightarrow \text{Linear (天元)}

\text{Initial Term (初項)} \rightarrow \text{Constant (太極)}


37. Example of Tian Yuan Shu Reconstruction

Given sequence: 4, 11, 22, 37, \ldots

State n=2 n=3 n=4 n=5
Original Values (原數) 4 11 22 37
First Differences (一階差 / 1차 계차) - 7 11 15
Second Differences (二階差 / 2차 계차) - - 4 4

Since \Delta^2 = 4:

2A=4 \implies A=2

Place 2 on the square position:

Position Coefficient
Constant (太極)
Linear (天元)
Square (平方) 2

Difference of 2n^2 from n=2 to n=3 is 18-8=10. The actual difference is 7. Place 7-10=-3 on the linear position:

Position Coefficient
Constant (太極)
Linear (天元) -3
Square (平方) 2

Current expression: 2n^2-3n. At n=2, this gives 8-6=2. Since actual value is 4, place 4-2=2 on the constant position:

Position Coefficient
Constant (太極) 2
Linear (天元) -3
Square (平方) 2

Yielding:

\boxed{ Q(n)=2n^2-3n+2 }

Subtracting Q(n) from P(n) isolates the correction sequence C(n).


38. Separating Polynomial and Correction Sequences

Setting C(n)=P(n)-Q(n):

n P(n) Q(n) C(n)
1 Exact Value Polynomial Value Difference
2 Exact Value Polynomial Value Difference
3 Exact Value Polynomial Value Difference
4 Exact Value Polynomial Value Difference

39. Generating Function of Triangular Piles

Expressing the triangular pile sequence as a formal power series:

\mathcal T(z)=z+3z^2+6z^3+10z^4+\cdots

Multiplying by (1-z):

(1-z)\mathcal T(z)=z+2z^2+3z^3+4z^4+\cdots

Multiplying by (1-z)^2:

(1-z)^2\mathcal T(z)=z+z^2+z^3+\cdots

Multiplying by (1-z)^3:

(1-z)^3\mathcal T(z)=z

Thus:

\boxed{\mathcal T(z)=\frac{z}{(1-z)^3}}


40. Differences and Accumulations in Series

For A(z)=a_0+a_1z+a_2z^2+\cdots:

(1-z)A(z)=a_0+(a_1-a_0)z+(a_2-a_1)z^2+\cdots

Hence:

\boxed{\text{Single Finite Difference} \longleftrightarrow 1-z}

\boxed{\text{Single Accumulation} \longleftrightarrow \frac{1}{1-z}}


41. Generating Functions for Semi-Polygons

Let G_q(z)=\sum_{n\ge1}P_q(n)z^n. Decomposing into uncorrected and correction sums:

\boxed{G_q(z)=\mathcal R_q(z)-\mathcal E_q(z)}

where \mathcal R_q(z)=\sum_{n\ge1}R_q(n)z^n and \mathcal E_q(z)=\sum_{n\ge1}E_q(n)z^n.


42. Rational Generating Functions for Linear Depths

When depth D(n)=an+b is strictly linear, T(D(n)) is quadratic, producing a denominator factor of (1-z)^3. The total generating function is a rational function, allowing direct polynomial division.


43. Series with Floor Terms

When D(n)=\lfloor\alpha n+\beta\rfloor, the series splits:

G_q(z)=G_q^{\mathrm{main}}(z)+G_q^{\mathrm{corr}}(z)


44. Finite Partial Sums

For cumulative pile sums S_q(N)=\sum_{n=1}^{N}P_q(n):

\boxed{\mathcal S_q(z)=\frac{G_q(z)}{1-z}}


45. Expansion of Rational Functions via Division Algorithm (除法)

Given rational generating function G(z)=\frac{N(z)}{D(z)}, designate D(z) as dividend (實, Shi) and N(z) as divisor (法, Fa):

D(z)=Q_0(z)N(z)+R_1(z)

with quotient Q_0 (商, Shang) and remainder R_1 (餘, Yu). Iterating Euclidean division:

N(z)=Q_1(z)R_1(z)+R_2(z)

R_1(z)=Q_2(z)R_2(z)+R_3(z)

Step Dividend (實) Divisor (法) Quotient (商) Remainder (餘)
1 D N Q_0 R_1
2 N R_1 Q_1 R_2
3 R_1 R_2 Q_2 R_3
4 R_2 R_3 Q_3 R_4

Transition: (\text{Dividend},\text{Divisor})\rightarrow(\text{Divisor},\text{Remainder}).


46. Division Algorithm and Continued Fractions

From D=Q_0N+R_1:

\frac{D}{N}=Q_0+\frac{R_1}{N} \implies \frac{N}{D}=\frac{1}{Q_0+\frac{R_1}{N}}

Successive substitution yields:

\boxed{\frac{N}{D}=\cfrac{1}{Q_0+\cfrac{1}{Q_1+\cfrac{1}{Q_2+\cdots}}}}


47. Prior Application of Continued Fractions to Non-Lattice Slopes

For non-lattice boundaries, continued fractions are applied first to the boundary slope \alpha=[a_0;a_1,a_2,\ldots] to track \lfloor\alpha n+\beta\rfloor via rational convergents \frac{p_r}{s_r}, and second to the resulting rational generating functions via the division algorithm.


48. Synthesis: Counting Board, Tian Yuan Shu, and Series

  1. Place exact cell counts P(1), P(2), P(3), \ldots
  2. Compute differences \Delta P(n) and \Delta^2 P(n).
  3. Reconstruct polynomial parts via Tian Yuan Shu (天元術); isolate boundary corrections.
  4. In formal series, differences map to multiplication by (1-z) and accumulations map to \frac{1}{1-z}.
  5. Apply the division algorithm (除法) to reduce rational functions into continued fractions.

49. Structural Roles of Mathematical Methods

Method Functional Role
Gou-Gu Method (勾股術) Determines layer height of the equilateral triangular lattice
Cartesian Coordinates Maps lattice points to regular polygon boundaries
Counting Rods (籌策 / 算木) Tracks discrete accumulation and elimination states
Finite Differences (階差) Identifies inception points of new triangular piles
Triangular Pile (尖垛) Decomposes layer growth into minimal triangular units
Tian Yuan Shu (天元術) Reconstructs polynomial components from constant differences
Summation (\Sigma) Compact algebraic notation for layers and piles
Continued Fractions (連分數) Resolves periodic rational approximations for non-grid slopes
Generating Functions (母函數 / 級數) Transforms piled-pile sums into algebraic series operations
Division Algorithm (除法) Computes successive quotients and remainders of rational series

50. General Theorem

Bisect a regular 2q-gon along its center line and superimpose it on an equilateral triangular lattice.

Let the layer cell counts be w_{q,n}(j). The exact piled-pile sum is:

\boxed{P_q(n)=\sum_jw_{q,n}(j)}

Taking second differences \gamma_{q,r}=\Delta^2w_{q,n}(r) with remaining depth D_{q,r}:

\boxed{P_q(n)=\sum_r\gamma_{q,r}T(D_{q,r})}

Splitting positive and negative terms:

P_q(n)=R_q(n)-E_q(n)

where

\boxed{R_q(n)=\sum_r\gamma_{q,r}^+T(D_{q,r})}

\boxed{E_q(n)=\sum_r\gamma_{q,r}^-T(D_{q,r})}

Remaining depth strictly decreases toward the center line:

D_1>D_2>\cdots>D_q

T(D_1)>T(D_2)>\cdots>T(D_q)

A semi-octagon decomposes into 4 major geometric pile components, a semi-decagon into 5, a semi-dodecagon into 6, and a general semi-2q-gon into q major geometric components. Secondary boundary fluctuations are resolved via signed correction piles.


51. Conclusion

The single-faced triangular pile (擬長一面尖垛) is the primitive triangular piled pile:

\boxed{ T(n)=\frac{n(n+1)}2 }

A single-faced trapezoidal pile (擬長一面平垛) is evaluated by superimposing two large triangular piles and one smaller central triangular pile, followed by subtracting shared cells.

For semi-octagons, semi-decagons, and semi-dodecagons, regular polygons are bisected along the center line and mapped onto the triangular lattice. Transition points in layer differences identify where smaller triangular piles originate.

The core computational sequence proceeds:

\boxed{ \text{Polygon} \rightarrow \text{Layer Widths} \rightarrow \text{Finite Differences} \rightarrow \text{Triangular Piles} }

\boxed{ \rightarrow \text{Uncorrected Pile Sum} \rightarrow \text{Shared Cell Elimination} \rightarrow \text{Board Verification} }

Polynomial terms are reconstructed via Tian Yuan Shu (天元術), differences map to (1-z) in series, non-grid slopes are resolved via continued fractions, and rational generating functions are expanded via the division algorithm (除法):

\boxed{ \text{Gou-Gu Method (勾股術)} \rightarrow \text{Equilateral Lattice} \rightarrow \text{Polygon Bisection} }

\boxed{ \rightarrow \text{Rod Counting (籌策)} \rightarrow \text{Finite Differences (階差)} \rightarrow \text{Pile Decomposition (尖垛)} }

\boxed{ \rightarrow \text{Tian Yuan Shu (天元術)} \rightarrow \text{Series (級數)} \rightarrow \text{Division Algorithm (除法)} }

This generalization establishes a unified computational framework wherein bisecting any regular 2q-gon systematically yields an inward hierarchy of decreasing triangular piles computable via finite differences and counting board arithmetic for arbitrary q.

Back

Comments

No comments yet.