Элементы дискретной математики. Часть I - 117 стр.

UptoLike

π =(π
1
2
,...,π
n
), p =(p
1
,p
2
,...,p
n
)
d
i
i 1
+1
π
π
for i =1to n do
π
i
= p
i
= i;
d
i
= 1;
d
1
=0;
π
0
= π
n+1
= m = n +1; { }
while m =1do
print π =(π
1
2
,...,π
n
);
m = n;
while π
p
m
+d
m
>mdo
d
m
= d
m
;
m = m 1;
π
p
m
π
p
m
+d
m
; { π}
p
π
p
m
p
m
. { p = π
1
p
m
+d
m
= m}
π
0
π
5
d
i
= ±1 +
i d p π m
d
1
d
2
d
3
d
4
p
1
p
2
p
3
p
4
π
1
π
2
π
3
π
4
1 0 −−−123412344
2 0 −−−124312434
3 0 −−−134214234
4 0 −−−234141234
5 0 −−+ 243141323
6 0 −−+ 143214324
7 0 −−+ 142313424
8 0 −−+ 132413244