# Chien search

In abstract algebra, the Chien search, named after Robert Tienwen Chien, is a fast algorithm for determining roots of polynomials defined over a finite field. Chien search is commonly used to find the roots of error-locator polynomials encountered in decoding Reed-Solomon codes and BCH codes.

## Algorithm

The problem is to find the roots of the polynomial Λ(x) (over the finite field GF(q)):

${\displaystyle \ \Lambda (x)=\lambda _{0}+\lambda _{1}x+\lambda _{2}x^{2}+\cdots +\lambda _{t}x^{t}}$

The roots may be found using brute force: there are a finite number of x, so the polynomial can be evaluated for each element xi. If the polynomial evaluates to zero, then that element is a root.

For the trivial case x = 0, only the coefficient λ0 need be tested for zero. Below, the only concern will be for non-zero xi.

A straightforward evaluation of the polynomial involves O(t2) general multiplications and O(t) additions. A more efficient scheme would use Horner's method for O(t) general multiplications and O(t) additions. Both of these approaches may evaluate the elements of the finite field in any order.

Chien search improves upon the above by selecting a specific order for the non-zero elements. In particular, the finite field has a (constant) generator element α. Chien tests the elements in the generator's order α1, α2, α3, ..... Consequently, Chien search needs only O(t) multiplications by constants and O(t) additions. The multiplications by constants are less complex than general multiplications.

The Chien search is based on two observations:

• Each non-zero ${\displaystyle \beta }$ may be expressed as ${\displaystyle \alpha ^{i_{\beta }}}$ for some ${\displaystyle i_{\beta }}$, where ${\displaystyle \alpha }$ is a primitive element of ${\displaystyle \mathrm {GF} (q)}$, ${\displaystyle i_{\beta }}$ is the power number of primitive element ${\displaystyle \alpha }$. Thus the powers ${\displaystyle \alpha ^{i}}$ for ${\displaystyle 0\leq i<(q-1)}$ cover the entire field (excluding the zero element).
• The following relationship exists:
${\displaystyle {\begin{array}{lllllllllll}\Lambda (\alpha ^{i})&=&\lambda _{0}&+&\lambda _{1}(\alpha ^{i})&+&\lambda _{2}(\alpha ^{i})^{2}&+&\cdots &+&\lambda _{t}(\alpha ^{i})^{t}\\&\triangleq &\gamma _{0,i}&+&\gamma _{1,i}&+&\gamma _{2,i}&+&\cdots &+&\gamma _{t,i}\\\Lambda (\alpha ^{i+1})&=&\lambda _{0}&+&\lambda _{1}(\alpha ^{i+1})&+&\lambda _{2}(\alpha ^{i+1})^{2}&+&\cdots &+&\lambda _{t}(\alpha ^{i+1})^{t}\\&=&\lambda _{0}&+&\lambda _{1}(\alpha ^{i})\,\alpha &+&\lambda _{2}(\alpha ^{i})^{2}\,\alpha ^{2}&+&\cdots &+&\lambda _{t}(\alpha ^{i})^{t}\,\alpha ^{t}\\&=&\gamma _{0,i}&+&\gamma _{1,i}\,\alpha &+&\gamma _{2,i}\,\alpha ^{2}&+&\cdots &+&\gamma _{t,i}\,\alpha ^{t}\\&\triangleq &\gamma _{0,i+1}&+&\gamma _{1,i+1}&+&\gamma _{2,i+1}&+&\cdots &+&\gamma _{t,i+1}\end{array}}}$

In other words, we may define each ${\displaystyle \Lambda (\alpha ^{i})}$ as the sum of a set of terms ${\displaystyle \{\gamma _{j,i}|0\leq j\leq t\}}$, from which the next set of coefficients may be derived thus:

${\displaystyle \ \gamma _{j,i+1}=\gamma _{j,i}\,\alpha ^{j}}$

In this way, we may start at ${\displaystyle i=0}$ with ${\displaystyle \gamma _{j,0}=\lambda _{j}}$, and iterate through each value of ${\displaystyle i}$ up to ${\displaystyle (q-1)}$. If at any stage the resultant summation is zero, i.e.

${\displaystyle \ \sum _{j=0}^{t}\gamma _{j,i}=0,}$

then ${\displaystyle \Lambda (\alpha ^{i})=0}$ also, so ${\displaystyle \alpha ^{i}}$ is a root. In this way, we check every element in the field.

When implemented in hardware, this approach significantly reduces the complexity, as all multiplications consist of one variable and one constant, rather than two variables as in the brute-force approach.

## References

• Chien, R. T. (October 1964), "Cyclic Decoding Procedures for the Bose-Chaudhuri-Hocquenghem Codes", IEEE Transactions on Information Theory, IT-10 (4): 357–363, doi:10.1109/TIT.1964.1053699, ISSN 0018-9448
• Lin, Shu; Costello, Daniel J. (2004), Error Control Coding: Fundamentals and Applications (second ed.), Englewood Cliffs, NJ: Prentice-Hall, ISBN 978-0130426727
• Gill, John (n.d.), EE387 Notes #7, Handout #28 (PDF), Stanford University, pp. 42–45, archived from the original (PDF) on 2014-06-30, retrieved April 21, 2010