# 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  
The basis of the construction of error-correction codes is the introduction of redundancy, which allows us to increase the total number of all possible combinations and obtain two disjointed subsets. The first subset contains allowed code combinations, and the second contains prohibited code combinations. We will use this approach for construction of error-correction codes of polynomial residue number system. A similar result can be achieved if the set of allowed code combinations of PRNS is reduced [2; 3; 4]. In this case, \(j\) bases are chosen from \(n\) bases of the code of PRNS, which will be considered redundant. Thus, there is a decrease in the number of allowed code combinations. Then, the new range of allowed code combinations of PRNS will be determined as  
\[P_{j}(z)=\frac{W_{n}(z)}{\prod\limits_{j}p_{j}(z)} \tag{8}\]  
where \(j=1,\ldots,\ n\). It can be concluded based on this equality that an increase in the number of redundant bases leads to a decrease in the subset of allowed code combinations for which \(\deg\!D_{1}(z)<\deg\!P_{j}(z)\). The remaining code combinations of the code of PRNS will belong to prohibited code combinations for which \(\deg\!D_{2}(z)\geq\deg\!P_{j}(z)\). This can be illustrated by an example. **Example 1**. : _Let four bases of the code of PRNS be given as \(p_{1}(z)=z^{5}+z^{4}+z^{3}+z^{2}+1\), \(p_{2}(z)=z^{5}+z^{3}+z^{2}+z+1\), \(p_{3}(z)=z^{5}+z^{2}+1\), \(p_{4}(z)=z^{5}+z^{3}+1\). Then, the operating range of the code of polynomial residue number system is determined by Expression (6), and is equal to_  
\[W_{4}(z)=\prod\limits_{i=1}^{4}p_{i}(z)=z^{20}+z^{19}+z^{18}+z^{17}+z^{15}+z^{ 12}+z^{9}+z^{8}+z^{5}+z^{3}+z^{2}+z+1\]  
_Take one base, \(p_{4}(z)=z^{5}+z^{3}+1\), and divide the operating range \(W_{4}(z)\) by it. As a result, the original operating range, \(W_{4}(z)\), will be divided into two subsets, namely, allowed code combinations and prohibited code combinations, and the range of allowed code combinations will be equal to_  
\[P_{4}(z)=\frac{W_{4}(z)}{p_{4}(z)}=z^{15}+z^{14}+z^{9}+z^{6}+z^{5}+z^{4}+z^{2} +z+1\]  
_Thus, allowed code combinations of PRNS will be those that satisfy the condition \(\deg\!D_{1}(z)<\deg\!P_{4}(z)\), while the condition \(\deg\!D_{2}(z)\geq\deg\!P_{4}(z)\) will be valid for prohibited code combinations of PRNS._  
_Take two bases, \(p_{4}(z)=z^{5}+z^{3}+1\) and \(p_{3}(z)=z^{5}+z^{2}+1\). This will reduce the subset of allowed code combinations:_  
\[P_{3,4}(z)=\frac{W_{4}(z)}{p_{3}(z)p_{4}(z)}=z^{10}+z^{9}+z^{7}+z^{6}+z^{5}+z^ {4}+z^{3}+z+1\]  
_Then, allowed code combinations of PRNS will be those that satisfy the condition \(\deg\!D_{1}(z)<\deg\!P_{3,4}(z)\), while the condition \(\deg\!D_{2}(z)\geq\deg\!P_{3,4}(z)\) will be valid for prohibited code combinations of PRNS._  
The following conclusion can be drawn based on the above example: we can set a value \(P_{j}(z)\) by choosing an appropriate set of \(j\) bases of the modular code to determine all allowed code combinations of PRNS, and usage of \(j\) redundant bases allows us to detect and correct errors that occur in code combinations of PRNS. At the same time, it is obvious that if the condition \(\deg\!D_{1}(z)<\deg\!P_{j}(z)\) is met, then \(\left[\frac{D_{j}(z)}{P_{j}(z)}\right]=0\), and if the condition \(\deg\!D_{2}(z)\geq\deg\!P_{j}(z)\) is met, then \(\left[\frac{D_{j}(z)}{P_{j}(z)}\right]>0\), where \(\left[\frac{f(z)}{g(z)}\right]\) is the quotient obtained from the result of polynomial long division of polynomial \(f(z)\) by polynomial \(g(z)\). Consider a special case in which only one base, \(p_{i}(z)\), of the code of polynomial residue number system is used. Then,  
\[P_{i}(z)=\frac{W_{n}(z)}{p_{i}(z)} \tag{9}\]  
Using the last equality, we obtain a set of code combinations in which residue modulo \(p_{i}(z)\) is being changed.