降维递推关系式
降维递推关系式
void view(){
int array[2][3][4];
int i, j, k, p, q, r;
p = 2;
q = 3;
r = 4;
for (int i = 0; i < p; ++i) {
for (int j = 0; j < q; ++j) {
for (int k = 0; k < r; ++k) {
cout << i << "," << j << "," << k << " :"
<< &array[i][j][k] << " "<
0,0,1 :0x73fcf4
0,0,2 :0x73fcf8
0,0,3 :0x73fcfc
0,1,0 :0x73fd00
0,1,1 :0x73fd04
0,1,2 :0x73fd08
0,1,3 :0x73fd0c
0,2,0 :0x73fd10
0,2,1 :0x73fd14
0,2,2 :0x73fd18
0,2,3 :0x73fd1c
1,0,0 :0x73fd20
1,0,1 :0x73fd24
1,0,2 :0x73fd28
1,0,3 :0x73fd2c
1,1,0 :0x73fd30
1,1,1 :0x73fd34
1,1,2 :0x73fd38
1,1,3 :0x73fd3c
1,2,0 :0x73fd40
1,2,1 :0x73fd44
1,2,2 :0x73fd48
1,2,3 :0x73fd4c
\[ \begin{aligned} if:&\\ &\exist Array[i][j][k],\\ &\exist p,q,r>0,\\ &0\leq i \leq p,\\ &0\leq j \leq q,\\ &0\leq k \leq r,\\ &split\space sequence:i\rightarrow j\rightarrow k,\\ St:&\\ S&=k*p*q+j*p+i*1\\ \Rightarrow &\space expanding\space n\sim dim\\ if:&\\ &\exist Array[i_1][i_2]\dots[i_{n-1}][i_n],\\ &\exist r_1, r_2, \dots, r_{n-1}, r_n>0,\\ &0\leq i_k \leq r_k\space(k=0\sim n),\\ &split\space sequence:i_1\rightarrow i_2 \rightarrow ... \rightarrow i_{n-1} \rightarrow i_n,\\ St:&\\ S&=i_n*r_{n-1}*\dots*r_2*r_1\\ &+i_{n-1}*r_{n-2}*\dots*r_2*r_1\\ &+\dots+i_3*r_2*r_1+i_2*r_1+i_1\\ &=\sum_{k=1}^{n}i_n(R_{n-1}!) \end{aligned} \]