How can we show $1<\gcd(b^s-1,N)<N$ here? (well-definedness of Shor's algorithm)

39 Views Asked by At

Let $N\in\mathbb N$ be odd, $b\in\{1,\ldots,N-1\}$ with $\gcd(b,N)=1$ and $$r:=\operatorname{ord}_N(b):=\min\{m\in\mathbb N:b^m\operatorname{mod}N=1\}\in2\mathbb N;$$ i.e. $r=2s$ for some $s\in\mathbb N$.

How can we show that $1<\gcd(b^s-1,N)<N$?

Okay, by definition of $r$, $$b^r\operatorname{mod}N=1\tag1$$ and hence $$\underbrace{(b^s-1)(b^s+1)}_{=\:b^r-1}\operatorname{mod}N=0\tag2;$$ i.e. $$N\mid(b^s-1)(b^s+1)\tag3.$$ If $\gcd(b^s+1,N)=1$, then $b^s+1$ and $N$ are coprime and hence $$N\mid b^s-1\tag4$$ by $(3)$; i.e. $$b^s\operatorname{mod}N=1\tag5;$$ in contradiction to $$s<r=\operatorname{ord}_N(b)\tag6.$$ Thus, $$1<d:=\gcd(b^s+1,N)<N.\tag7$$

But how do we conclude $1<\gcd(b^s-1,N)<N$ from this?

1

There are 1 best solutions below

7
On

You always have $1\leq \gcd(m,n) \leq \min\{m,n\}$ for all $m,n\in\Bbb N$. So $1\leq \gcd(b^s-1, N) \leq N$.

If $\gcd(b^s-1, N) = 1$ you get $b^s+1\equiv 0\pmod{N}$ by $(3)$, what contradicts $\gcd(b^s+1,N)<N$.

If $\gcd(b^s-1, N) = N$ you get $b^s\equiv 1\pmod{N}$ which contradicts $(6)$.

Edit: The statement $\gcd(b^s+1, N)<N$ is not proven in OP's post. I think it is due to the definition of Shor's algorithm, which calls for using a different $b$ in the case $\gcd(b^s+1, N)=N$ and restart the algorithm (see Step 6 in the classic part in Shor's algorithm).