Arnold Transform
AKA cat map
.
The classic Arnold Transform
is a two-dimensional reversible map. The discrete form of the Arnold Transform
is periodic and changes with the size of the image.
Special Arnold Transform
Def.1
$$
\begin{bmatrix}
x’\\
y’
\end{bmatrix}
=
A
\begin{bmatrix}
x\\
y
\end{bmatrix}
\mod N, A =
\begin{bmatrix}
1 & 1 \\
1 & 2
\end{bmatrix}
, 0\le x, y \le 1, 0\le x’, y’ \le 1
$$
$$
\Longrightarrow
\left\{
\begin{array}{lr}
x’ = (x + y) \mod N \\
y’ = (x + 2y) \mod N
\end{array}
\right.
$$
Two-dimensional Arnold Transform.
Def.2
$$
\begin{bmatrix}
x\\
y
\end{bmatrix}
=
A^{-1}
\begin{bmatrix}
x’\\
y’
\end{bmatrix}
\mod N, A^{-1} =
\begin{bmatrix}
2 & -1 \\
-1 & 1
\end{bmatrix}
, 0\le x, y \le 1, 0\le x’, y’ \le 1
$$
$$
\Longrightarrow
\left\{
\begin{array}{lr}
x = (2x’ - y’) \mod N \\
y = (-x’ + y’) \mod N
\end{array}
\right.
$$
Two-dimensional Arnold inverse transformation.
General Arnold Transform
Def.1
$$
\begin{bmatrix}
x’\\
y’
\end{bmatrix}
=
\begin{bmatrix}
1 & a \\
b & ab + 1
\end{bmatrix}
\begin{bmatrix}
x\\
y
\end{bmatrix}
\mod N
$$
$$
\Longrightarrow
\left\{
\begin{array}{lr}
x’ = (x + ay) \mod N \\
y’ = (bx + (ab + 1)y) \mod N
\end{array}
\right.
$$
Def.2
$$
\begin{bmatrix}
x\\
y
\end{bmatrix}
=
\begin{bmatrix}
ab + 1 & -a \\
-b & 1
\end{bmatrix}
\begin{bmatrix}
x’\\
y’
\end{bmatrix}
\mod N
$$
$$
\Longrightarrow
\left\{
\begin{array}{lr}
x = ((ab + 1)x’ - ay’) \mod N \\
y = (-bx’ + y’) \mod N
\end{array}
\right.
$$
Accomplish
1 | import numpy as np |