next up previous
Next: Efficient implementation Up: Computing primitive n mathend000#-th roots Previous: Primitive n mathend000#-th roots of

A Probabilistic Approach

We explain in this section a simple probabilistic approach for computing primitive n mathend000#-roots of unity in $ \mbox{${\mathbb Z}$}$/p$ \mbox{${\mathbb Z}$}$ mathend000#. Of course, we assume that n mathend000# divides p - 1 mathend000#. Hence, there exists an integer q mathend000# such that p = qn + 1 mathend000# holds. According to little Fermat's theorem, for all $ \alpha$ $ \in$ $ \mbox{${\mathbb K}$}$ mathend000#, with $ \alpha$ $ \neq$ 0 mathend000# and $ \alpha$ $ \neq$ 1 mathend000#, we have

$\displaystyle \alpha^{{{p-1}}}_{{}}$ = 1. (53)

Therefore, we obtain

$\displaystyle \alpha^{{{q n}}}_{{}}$ = 1. (54)

It follows that $ \alpha^{{{q}}}_{{}}$ mathend000# is a candidate for being a primitive n mathend000#-th root of unity. If $ \alpha^{{{q}}}_{{}}$ mathend000# is not a primitive n mathend000#-root root of unity then: Since $ \alpha^{{{q n /2 }}}_{{}}$ mathend000# equals either 1 mathend000# or -1 mathend000#, we have the following.

Proposition 5   Let p > 2 mathend000# be a prime number and let n, q mathend000# be integers such that n mathend000# is a power of 2 such that we have p = nq + 1 mathend000#. Let $ \alpha$ $ \in$ $ \mbox{${\mathbb Z}$}$/p$ \mbox{${\mathbb Z}$}$ mathend000# different from 0 mathend000# and 1 mathend000#. Then, $ \alpha^{{{q}}}_{{}}$ mathend000# is a primitive n mathend000#-th root of unity if and only if $ \alpha^{{{q n /2 }}}_{{}}$ = - 1 mathend000# holds.

This proposition is very easy to implement and provides an efficient way to compute primitive roots of unity in practice. It avoids the construction of tables of primitive roots of unity, which was a usual approach as detailed above.


next up previous
Next: Efficient implementation Up: Computing primitive n mathend000#-th roots Previous: Primitive n mathend000#-th roots of
Marc Moreno Maza
2007-01-10