# Error-Correction Coding Using Polynomial Residue Number System
## 3 Theoretical Foundations of Building Redundant Codes of Polynomial Residue Number System
### Codes of Polynomial Residue Number System with Two Control Bases
Substituting this expression in (56), we obtain:  
\[S(z)=\left[\frac{D(z)}{W_{n}(z)}\right]=\left[\frac{\sum\limits_{i=1}^{n+2}d_{i}( z)B_{i}(z)-k(z)W_{n+2}(z)}{W_{n}(z)}\right] \tag{58}\]  
The analysis in works [3; 4; 5] showed that both orthogonal bases of codes of RNS containing redundant bases and those without them have the similarity property. The conducted studies have confirmed this property for codes of polynomial residue number system. Thus, we have  
\[\text{deg}p_{n+1}(z)+\text{deg}p_{n+2}(z)\geq\text{deg}p_{n}(z)+\text{deg}p_{n -1}(z) \tag{50}\]0  
where \(\vec{B}_{i}(z)\) is an orthogonal basis of PRNS using only information bases \(p_{1}(z),\ p_{2}(z),\dots,\ p_{n}(z)\), and \(B_{i}(z)\) is an orthogonal base of redundant PRNS. Hence, orthogonal bases can be presented as  
\[\text{deg}p_{n+1}(z)+\text{deg}p_{n+2}(z)\geq\text{deg}p_{n}(z)+\text{deg}p_{n -1}(z) \tag{50}\]1  
where \(L_{i}(z)=\left[\frac{B_{i}(z)}{W_{n}(z)}\right]\). At the same time, for control bases we have \(\vec{B}_{n+1}(z)=0,\ \vec{B}_{n+2}(z)=0\). Then, using (47), we obtain  
\[ \begin{split}& S(z)=\left[\frac{\sum\limits_{i=1}^{n+2}d_{i}(z)(W_{n}( z)L_{i}(z)+\vec{B}_{i}(z))-k(z)W_{n+2}(z)}{W_{n}(z)}\right]=\\ &=\left[\sum\limits_{i=1}^{n+2}d_{i}(z)L_{i}(z)+\frac{\sum \limits_{i=1}^{n}d_{i}(z)\vec{B}_{i}(z)}{W_{n}(z)}-k(z)W_{k}(z)\right].\end{split}  \tag{61}\]  
When RNS was considered, it was shown that the values of the interval \(S\) form a ring modulo \(W_{k}\). Then, based on the similarity of RNS and PRNS we can conclude that values of the polynomial interval \(S(z)\) do not exceed values modulo \(W_{k}(z)\) either. In this case, we obtain  
\[ \begin{split}& S(z)=\left|\sum\limits_{i=1}^{n+2}d_{i}(z)L_{i}(z)+ \left[\frac{\sum\limits_{i=1}^{n}d_{i}(z)\vec{B}_{i}(z)}{W_{n}(z)}\right]-k(z )W_{k}(z)\right|_{W_{k}(z)}=\\ &=\left|\sum\limits_{i=1}^{n+2}d_{i}(z)L_{i}(z)+\vec{k}(z) \right|_{W_{k}(z)},\end{split}  \tag{62}\]  
where \(\vec{k}(z)=\left[\frac{\sum\limits_{i=1}^{n}d_{i}(z)\vec{B}_{i}(z)}{W_{n}(z) }\right]\) is a rank of the polynomial in a non-redundant polynomial residue number system with bases \(p_{1}(z),\ p_{2}(z),\dots,\ p_{n}(z)\). Thus, an algorithm has been developed for calculating the positional characteristic (a polynomial interval). Only modular operations are used in this algorithm, which allows us to detect and correct errors without performing a reverse conversion from the code of PRNS to a positional code or performing a division operation. Given that the calculations in PRNS are performed in parallel and independently on bases of the code, the error that occurred during the calculations on the \(i\)-th base will lead to a distortion of the final result only in the \(i\)-th residue. Therefore, the process of error detection and correction can be performed in parallel with conversion from the code of polynomial residue number system to the positional code, which reduces time costs. **Example 4**. : _Using PRNS with three informational bases, \(p_{1}(z)=z+1\), \(p_{2}(z)=z^{2}+z+1\), and \(p_{3}(z)=z^{4}+z^{3}+z^{2}+z+1\), and two control bases, \(p_{4}(z)=z^{4}+z^{3}+1\) and \(p_{5}(z)=z^{4}+z+1\), the operating range of the code is \(W_{3}(z)=\prod\limits_{i=1}^{3}p_{i}(z)=z^{7}+z^{6}+z^{5}+z^{2}+z+1\). The product of the two control bases is \(W_{k}=p_{n+1}p_{n+2}=z^{8}+z^{7}+z^{5}+z^{4}+z^{3}+z+1\). The full range of PRNS is \(W_{5}(z)=\prod\limits_{i=1}p_{i}(z)=z^{15}+1\)._  
_As an allowed code combination of PRNS, we choose a polynomial, \(D(z)=z^{5}+z^{4}+z+1=( \begin{array}{cc}0,&z,&z^{3}+z^{2}+1,&1,&z^{2}+z\end{array} )\), which satisfies Condition (32).