现在介绍循环码的又一种刻画方式。
定义 1 设 \(C\) 是以 \(g(x)\) 为生成式的 \(q\) 元循环码, 则 \(g(x)\) (在 \(\mathrm{F}_q\) 的扩域中)的根也叫作循环码 \(C\) 的根。
以下设 \(C\) 的码长 \(n\) 与 \(q\) 互素。这时, \(g(x) \mid x^n-1 \in \mathrm{F}_q[x]\),而 \(x^n-1\) 在 \(\mathrm{F}_q\) 的扩域中没有重根, 从而 \(g(x)\) 也是如此, 记 \(R\) 为 \(g(x)\) 的全部根所成的集合, \(|R|=\) \(\operatorname{deg} g(x)\), 则对每个多项式 \(c(x) \in \mathrm{F}_q[x]\),
\(c(x)\) 为 \(C\) 中码字 \(\Leftrightarrow g(x) \mid c(x) \Leftrightarrow c(\gamma)=0\), 对每个 \(\gamma \in R\) 。
所以给出循环码的如下刻画:
\[C=\left\{c(x) \in \mathrm{F}_q[x] \mid \operatorname{deg}(c(x)) \leqslant n-1, c(\gamma)=0 (对每个 \gamma \in R ) \right\} \tag{1}
\]
现在设 \(g(x)=p_1(x) \cdots p_g(x)\), 其中 \(p_1(x), \cdots, p_g(x)\) 是 \(\mathrm{F}_q[x]\) 中彼此不同的首 \(1\) 不可约多项式, \(\operatorname{deg} p_i(x)=d_i(1 \leqslant i \leqslant g)\) 。设 \(\gamma_i\) 是 \(p_i(x)\) 在 \(\mathrm{F}_q\) 的扩域中的一个根, 则 \(\mathrm{F}_q\left(\gamma_i\right)=\mathrm{F}_{ q^{d_i}}\), 并且全部根为 \(\gamma_i^{q^\lambda}\left(0 \leqslant \lambda \leqslant d_i-1\right)\) 。对每个 \(c(x) \in \mathrm{F}_q[x]\),由于 \(p_i(x)\) 不可约, 只要 \(c\left(\gamma_i\right)=0, p_i(x)\) 的全部根均为 \(c(x)\) 的根(也可以利用根的形式的特殊性直接验证)。所以
\[c(x) \in C \Leftrightarrow g(x)\left|c(x) \Leftrightarrow p_i(x)\right| c(x) \quad(1 \leqslant i \leqslant g) \Leftrightarrow c\left(\gamma_i\right)=0 \quad(1 \leqslant i \leqslant g) .
\]
因此可以用 \(C\) 的一部分根 \(\left(\right.\) 每个 \(p_i(x)\) 取一个根 \(\left.\gamma_i\right)\) 来刻画 \(C\) :
\[C=\left\{c(x) \in \mathrm{F}_q[x] \mid \operatorname{deg} c(x) \leqslant n-1, c\left(\gamma_i\right)=0 \quad(1 \leqslant i \leqslant g)\right\} \tag{2}
\]
注意经过我们的分析 \((2)\) 式比 \((1)\) 式要简洁不少。
用这种根刻画方式可以给出循环码的一个校验阵, 设 \(c(x)=c_0+c_1 x+\cdots+c_{n-1} x^{n-1}\), 它等同于 \(\boldsymbol{c}=(c_0, \cdots, c_{n-1}) \in \mathrm{F}_q^n\), 则
\[\begin{aligned}
c(x) \in C & \Leftrightarrow c\left(\gamma_i\right)=\omega_0+c_1 \gamma_i+\cdots+c_{n-1} \gamma_i^{n-1}=0 \quad(1 \leqslant i \leqslant g) \\
& \Leftrightarrow \widetilde{\boldsymbol{H}}\left(\begin{array}{c}
c_0 \\
\cdots \\
c_{n-1}
\end{array}\right)=\mathbf{0} (长为 g 的零向量) ,
\end{aligned}
\]
其中
\[\widetilde{\boldsymbol{H}}=\left(\begin{array}{cccc}
1 & \gamma_1 & \cdots & \gamma_1^{n-1} \\
1 & \gamma_2 & \cdots & \gamma_2^{n-1} \\
\cdots & \cdots & \cdots & \cdots \\
1 & \gamma_g & \cdots & \gamma_g^{n-1}
\end{array}\right),
\]
其中 \(\gamma_i^j\) 是 \(\mathrm{F}_{q^{d_i}}\) 中元素, 取 \(\mathrm{F}_{q^{d_i}}\) 的一组 \(\mathrm{F}_q\)-基 \(\left\{v_1^{(i)}, \cdots, v_{d_i}^{(i)}\right\}\) (比如取为 \(\{1, \gamma_i, \cdots \gamma_i^{d_i-1}\}\)), 则 \(\gamma_i^j\) 可惟一表示成
\[\gamma_i^j=a_{1_j}^{(i)}v_1^{(i)}+\cdots+a_{d_{i_j}}^{(i)} v_{d_i}^{(i)} \quad\left(a_{\lambda_j}^{(i)} \in \mathrm{F}_q\right) 。
\]
这时
\[c\left(\gamma_i\right)=\sum_{j=0}^{n-1} c_j \gamma_i^j=\sum_{j=0}^{n-1} c_j \sum_{\lambda=1}^{d_i} a_{\lambda_j}^{(i)} v_\lambda^{(i)}=\sum_{\lambda=1}^{d_i}\left(\sum_{j=0}^{n-1} a_{\lambda_j}^{(i)} c_j\right) v_\lambda^{(i)}
\]
所以
\[c\left(\gamma_i\right)=0 \Leftrightarrow \sum_{j=0}^{n-1} a_{\lambda_j}^{(i)} c_j=0 \quad\left(1 \leqslant \lambda \leqslant d_i\right) \Leftrightarrow \boldsymbol{H}_i \boldsymbol{c}^{\mathrm{T}}=\mathbf{0}
\]
其中
\[\boldsymbol{H}_i=\left(\begin{array}{cccc}
a_{1_0}^{(i)} & a_{1_1}^{(i)} & \cdots & a_{1_{n-1}}^{(i)} \\
\cdots & \cdots & \cdots & \cdots \\
a_{d_{i_0}}^{(i)} & a_{d_{i_1}}^{(i)} & \cdots & a_{d_{i_n-1}}^{(i)}
\end{array}\right) \quad\left(\mathrm{F}_q \text { 上 } d_i \text { 行 } n\right. \text { 列矩阵)。 }
\]
而
\[c(x) \in C \Leftrightarrow c\left(\gamma_i\right)=0 \quad(1 \leqslant i \leqslant g) \Leftrightarrow \boldsymbol{H c}^{\mathrm{T}}=\mathbf{0},
\]
其中
\[\boldsymbol{H}=\left(\begin{array}{c}
\boldsymbol{H}_1 \\
\cdots \\
\boldsymbol{H}_g
\end{array}\right)
\]
为 \(\mathrm{F}_q\) 上 \(n\) 列的矩阵, 行数为 \(d_1+\cdots+d_g=\operatorname{deg} p_1(x)+\cdots+\operatorname{deg} p_g(x)=\operatorname{deg} g(x)\),所以 \(\boldsymbol{H}\) 就是线性码 \(C\) 的一个校验阵, 但是今后把更紧凑的 \(g \times n\) 的矩阵 \(\widetilde{\boldsymbol{H}}\) (系数属于 \(\mathrm{F}_q\) 的有限扩域)也叫作 \(C\) 的校验阵。
例 2 \(x^3+x^2+x+2\) 是 \(\mathrm{F}_3[x]\) 中不可约多项式, 周期为 13 , 设 \(\gamma\) 是此多项式的一个根, \(\mathrm{F}_3(\gamma)=\mathrm{F}_{27},\left\{1, \gamma, \gamma^2\right\}\) 为 \(\mathrm{F}_{27}\) 的一组 \(\mathrm{F}_3\)-基。
设 \(C\) 是以 \(g(x)=(x-1)\left(x^3+x^2+x+2\right)\) 为生成式, 并且码长为 13 的三元循环码, 则
\[C=\left\{c(x)=\sum_{i=0}^{12} c_i x^i \in \mathrm{F}_3[x] \mid c(1)=c(\gamma)=0\right\} .
\]