1
$\begingroup$

How to solve a complex equation of the form:

$z^n \equiv c~mod~p$, where $z, c$ are Gaussian integers, $n\in \mathbb{Z}^+$ and p is a prime.

1- Are there pre-conditions that need to be satisfied? 2- Is there any computer algebra software that can solve it? 3- Is there an efficient algorithm to solve it?

  • 0
    Have you tried using the Chinese remainder theorem to simplify your problem?2017-01-16
  • 0
    I forgot to add that p is a prime.2017-01-16

1 Answers 1

0

If $p$ is prime in $\mathbb{Z}[i]$, then the quotient is a finite field $\mathbb{F}$ and then your question basically asks given $c\in \mathbb{F}$ and some natural number $n$ to find $z\in \mathbb{F}$ such that $z^n=c$. The multiplicative group of a finite field is cyclic of order $m=|\mathbb{F}|-1$, so that the element which are $n$-th power are exactly the elements in $\mathbb{F}^{\times n}$ which is the unique subgroup of order $d=\frac{m}{gcd(n,m)}$. It follows that you have such a solution iff $c^d=1$ (This is a well known trick when talking about $n$-th power residues).

If $p$ is an integer prime, then either it is a prime in $\mathbb{Z}[i]$ so that you can use the argument above, or it is a product of two distinct primes so that you can use the Chinese remainder theorem, or $p=2$ and in this case the quotient is isomorphic to $\mathbb{Z}_2[x]/x^2$ which is easy to understand.

In general, I think that finding a $z$ which satisfies the equation $z^n=c$ is not easy (i.e. can not be done quickly by a computer). Clearly, if you can find a generator for the multiplicative group, then you can find such a solution. There are some cases where this can be done easily, for example, if $n$ is coprime to the order of the multiplicative group, then taking the $n$-th power is an invertible map and you can find its inverse (standard cyclic group exercise).

EXAMPLE For $p=8191$, we know that it is a prime in $\mathbb{Z}$ and it is 3 mod 4, so it remains prime in $\mathbb{Z}[i]$, so we get that $\mathbb{Z}[i]/p\cong \mathbb{F}_p[i]$ where $\mathbb{F}_p$ is the finite field with p elements. The field $\mathbb{F}_p[i]$ has $p^2$ elements so that its multiplicative group $<\zeta>$ is cyclic of order $p^2-1=67092480$. If we take $n=16 \mid 67092480$, and suppose that an element $c\in<\zeta>$ is an $n$-th power, so we can write $(\zeta^k)^n=c$. It then follows that $c^{\frac{p^2-1}{n}}=\zeta^{(p^2-1)k}=1^k=1$. On the other hand, if $\zeta^m$ is any element that satisfies $1=(\zeta^k)^{\frac{p^2-1}{n}}=\zeta^{k\cdot\frac{p^2-1}{n}}$, then since $\zeta$ has order $p^2-1$ we must have that $p^2-1\mid k\cdot\frac{p^2-1}{n}$, which is equivalent to $n\mid k$, namely $\zeta^k$ is an $n$-th power. For example, taking $c=i$ we get that $i^{\frac{p^2-1}{n}}=i^{4193280}=1$ because $i^4=1$, thus $i$ is a 16-th power of some element.

  • 0
    Number theory is not quite my profession. I would appreciate a concrete example for the sake of clarity. Let's say p=8191, n = 16, c=0+i. Could you show how to solve this case.2017-01-17
  • 0
    @caesar added an example2017-01-17
  • 0
    Thanks @Ofir. That was very helpful.2017-01-17
  • 0
    you mentioned that if a generator of the multiplicative group is given, then a solution to the equation can be found. Could you elaborate more on that? If you can also use the same example above that would be easier for me to understand.2017-01-20
  • 0
    @caesar Suppose that you give me a generator $\zeta$ of order $p^2-1$ and you write $i$ as a power of this generator. In this case, since $\pm i$ are the unique elements of order 4, you can assume that $i=\zeta^{\frac{p^2-1}{4}}$. So, one of its 16-th root is $a=\zeta^{\frac{p^2-1}{16*4}}$.2017-01-20
  • 0
    Do you have an idea how to find a generator in the Gaussian integer group I am working in?2017-01-20
  • 0
    Dear @Ofir. Thanks much for your help. I found a way to find the generator. Your algorithms works fine to find the root. Finding the generator and hence the root is extremely easy given the fact we work with Merssene prime or a prime that supports Gaussian integer arithmetic, i.e. $p\equiv 1 \pmod{4}$. Unfortunately, doing so while working with a prime $\equiv 1 \pmod{4}$ is not straightforward. One has to brute force search for the root.2017-01-20
  • 0
    Ops. I meant i.e. $p \equiv 3 \pmod{4}$ in my comment above.2017-01-20