Bonjour à tous,
Il s'agit, si je ne m'abuse, d'une question d'algèbre linéaire dans l'anneau (non intègre !) $\mathbb{Z}/26 \mathbb{Z}$.
En posant A=1, B=2, ... Z=0 modulo 26, on peut écrire le codage sous forme matricielle :
$
\begin{pmatrix}
1 & 1 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 1 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 & 1 & 0 \\
0 & 0 & 0 & 0 & 0 & 1 & 1 \\
1 & 0 & 0 & 0 & 0 & 0 & 1
\end{pmatrix}
\begin{pmatrix}
B \\
O \\
N \\
J \\
O \\
U \\
R
\end{pmatrix}
\equiv
\begin{pmatrix}
1 & 1 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 1 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 & 1 & 0 \\
0 & 0 & 0 & 0 & 0 & 1 & 1 \\
1 & 0 & 0 & 0 & 0 & 0 & 1
\end{pmatrix}
\begin{pmatrix}
2 \\
15 \\
14 \\
10 \\
15 \\
21 \\
18
\end{pmatrix}
\equiv
\begin{pmatrix}
17 \\
3 \\
24 \\
25 \\
10 \\
13 \\
20
\end{pmatrix}
\equiv
\begin{pmatrix}
Q \\
C \\
X \\
Y \\
J \\
M \\
T
\end{pmatrix}
$
Ce système de codage est donc lié aux matrices $K_n$ ($n\geqslant 2$) :
$$K_{n}\equiv \begin{pmatrix}
1 & 1 & 0 & 0 & \cdots & 0 \\
0 & 1 & 1 & 0 & \cdots & 0 \\
0 & 0 & \ddots & \ddots & & \vdots \\
\vdots & \vdots & & \ddots & \ddots & \vdots \\
0 & 0 & & & 1 & 1 \\
1 & 0 & & & 0 & 1
\end{pmatrix}$$
Ces matrices sont singulières. On peut vérifier (démonstration laissée au lecteur) :
$$\det (K_n)\equiv \left\{
\begin{array}{l}
0\text{ si }n \text{ pair} \\
2\text{ si }n \text{ impair}
\end{array}
\right. $$
Puisque ni $0$ ni $2$ ne sont inversibles dans $\mathbb{Z}/26 \mathbb{Z}$ (les éléments inversibles sont les entiers premiers avec 26), les matrices $K_n$ n'ont pas d'inverses.
Le codage n'est donc pas bijectif, ni injectif, ni surjectif puisque ces trois propriétés sont équivalentes pour un endomorphisme d'un
espace vectoriel module libre de dimension finie.
C'est curieux, mais en codant un mot par ce procédé on perd de l'information et l'on ne peut pas retrouver avec certitude le mot dont on est parti.
[Je complète... :-) ]
Le rang de $K_n$ est $n-1$, autrement dit le noyau de $K_n$ est un sous-module de $(\mathbb{Z}/26\mathbb{Z})^n$ de dimension $1$.
Si $n$ est pair, $ker(K_n)$ est le sous-module engendré par le vecteur $\begin{pmatrix}
1 \\
25 \\
1 \\
25 \\
\vdots\\
1 \\
25
\end{pmatrix}$
Par exemple, tous les mots qui se codent comme 'BONJOU' sont $\begin{pmatrix}
B+k \\
O+25k \\
N+k \\
J+25k \\
O+k \\
U+25k
\end{pmatrix}$ pour $k \in \mathbb{Z}/26\mathbb{Z}$
Ce qui donne les 26 mots :
BONJOU, CNOIPT, DMPHQS, ELQGRR, FKRFSQ, GJSETP, HITDUO, IHUCVN,
JGVBWM, KFWAXL, LEXZYK, MDYYZJ, NCZXAI, OBAWBH, PABVCG, QZCUDF,
RYDTEE, SXESFD, TWFRGC, UVGQHB, VUHPIA, WTIOJZ, XSJNKY, YRKMLX
ZQLLMW, APMKNV
Si $n$ est impair, $ker(K_n)$ est le sous-module engendré par le vecteur $\begin{pmatrix}
13 \\
13 \\
\vdots\\
13
\end{pmatrix}$
Ce qui est amusant, c'est que ce sous-module ne comprend que deux vecteurs : $\begin{pmatrix}
13 \\
13 \\
\vdots\\
13
\end{pmatrix}$ et $\begin{pmatrix}
0 \\
0 \\
\vdots\\
0
\end{pmatrix}$
Il n'y a que deux mots qui se codent comme 'BONJOUR' : $\begin{pmatrix}
B+0 \\
O+0 \\
N+0 \\
J+0 \\
O+0 \\
U+0 \\
R+0
\end{pmatrix} \equiv
\begin{pmatrix}
B \\
O \\
N \\
J \\
O \\
U \\
R
\end{pmatrix}$ et $\begin{pmatrix}
B+13 \\
O+13 \\
N+13 \\
J+13 \\
O+13 \\
U+13 \\
R+13
\end{pmatrix} \equiv
\begin{pmatrix}
O \\
B \\
A \\
W \\
B \\
H \\
E
\end{pmatrix}$
Tout serait bien plus simple avec des matrices inversibles :-)) Voir le
chiffrement de Hill