# Error-Correction Coding Using Polynomial Residue Number System
## 3 Theoretical Foundations of Building Redundant Codes of Polynomial Residue Number System
### PRNS Codes with One Control Base
For other polynomials, those with deg\(D(z)\geq\) deg\(P_{i}(z)\), we have \(\left[\frac{D(z)}{P_{i}(z)}\right]\
eq 0\)._  
The theorems and examples presented above demonstrate the potential possibility of constructing redundant codes of polynomial residue number system that are capable of detecting and correcting errors that distort residues in the code combination. In order to do this, it is necessary to choose bases \(p_{j}\)(z) in such a way that a polynomial of the form  
\[\left[\frac{D_{iR}(z)}{P_{i}(z)}\right]\
eq\left[\frac{D_{iV}(z)}{P_{i}(z)}\right] \tag{24}\]4is obtained such that its degree is greater than the degree of the polynomial \(D(2)\), on the basis of which allowed the code combinations of PRNS can be constructed. Then, the remaining polynomials presented in the code of polynomial residue number system that satisfy the condition \((\deg\!C(z)\geq\deg\!P_{i}(z))\ \cap\ (\deg\!C(z)<\deg\!W_{n}(z))\) form a subset of prohibited code combinations of PRNS. It is necessary to determine minimal number of control bases introduced into the modular code in order to solve the problem of constructing a code of PRNS capable of detecting and correcting errors that occur in the residues of the code combination of PRNS. This will allow for the development of algorithms for correcting erroneous residues in the code of polynomial residue number system, which can arise due to failures in the calculation process, while introducing a minimal amount of necessary redundancy. Minimal redundancy of the code of polynomial residue number system is achieved by introducing one control base. For an ordered bases system used in PRNS, the redundant base \(p_{n+1}(z)\) must satisfy the following condition:  
\[\left[\frac{D_{iR}(z)}{P_{i}(z)}\right]\
eq\left[\frac{D_{iV}(z)}{P_{i}(z)}\right] \tag{24}\]5  
In this case, the range of the code is changed to the value  
\[\left[\frac{D_{iR}(z)}{P_{i}(z)}\right]\
eq\left[\frac{D_{iV}(z)}{P_{i}(z)}\right] \tag{24}\]6  
In this case, \(W_{n}(z)\) is considered the operating range of the code and \(W_{n+1}(z)\) is the full range. The following rule is adopted in order to detect and correct errors in the code of polynomial residue number system. Consider polynomials represented as \(A(z)=(\alpha_{1}(z),\ \alpha_{2}(z),\ldots,\alpha_{n+1}(z))\) and \(C(z)=(c_{1}(z),\ c_{2}(z),\ldots,c_{n+1}(z))\) for which the following conditions are met:  
\[\left[\frac{D_{iR}(z)}{P_{i}(z)}\right]\
eq\left[\frac{D_{iV}(z)}{P_{i}(z)}\right] \tag{24}\]7  
If the degree of the result of performing modular arithmetic operations (modular addition and multiplication) in PRNS, namely,  
\[\left[\frac{D_{iR}(z)}{P_{i}(z)}\right]\
eq\left[\frac{D_{iV}(z)}{P_{i}(z)}\right] \tag{24}\]8  
does not exceed the degree of the operating range  
\[\left[\frac{D_{iR}(z)}{P_{i}(z)}\right]\
eq\left[\frac{D_{iV}(z)}{P_{i}(z)}\right] \tag{24}\]9  
then the original code combinations and the result do not contain errors. Otherwise, the code combination of PRNS contains errors and is prohibited. **Theorem 3**. : _If the condition_  
\[R_{i}(z)\
eq V_{i}(z){\rm mod}p_{i}(z) \tag{25}\]0  
_is satisfied for a polynomial \(D^{*}(z)\) that corresponds to a code combination of the ordered code of polynomial residue number system with bases \(p_{1}(z),\ \ldots,\ p_{n}(z),\ p_{n+1}(z)\), then the code combination for such a polynomial in PRNS contains at least one error. In other words, \(D^{*}(z)\) represents a prohibited code combination._  
**Proof of Theorem 3. ** Let a single error in the code combination of PRNS occur on the \(i\)-th base, where \(i=1,\ 2,\ldots,\ n+1\). This leads to a distortion of the residue, as follows:  
\[R_{i}(z)\
eq V_{i}(z){\rm mod}p_{i}(z) \tag{25}\]1  
where \(\Delta d_{i}(z)\) is an error depth and \(\deg(\Delta d_{i}(z))<\deg\!p_{i}(z)\). Then, the erroneous combination of PRNS has the form  
\[R_{i}(z)\
eq V_{i}(z){\rm mod}p_{i}(z) \tag{25}\]2  
By way of contradiction, assume that the polynomial \(D^{*}(z)\) presented in the code of polynomial residue number system does not contain an error.