I wonder whether any prime numbers require arbitrarily large number of steps to verify them when they are arbitrarily large. Is it enough to show that arbitrarily large number of primes cannot divide them?
The proof of having infinite steps for any TM
-
0...what? ...what? I mean, you can verify primes in polynomial time by the AKS algorithm...? – 2017-01-16
-
0Polynomials grow arbitrarily large :P – 2017-01-16
-
0Thank you. I have considered the speculation similar to your answer. I guess that the task is not very wrong. – 2017-01-16
1 Answers
I'll fix the Turing machine scheme to be working on a tape which is infinite in exactly one direction and which has symbols $0$, $1$ and $\emptyset$. I don't care what head-instructions are allowed, as long as the head never moves more than one space left or right during an instruction.
Your question has a few different interpretations.
Show that no TM decides primality in a uniformly bounded number of steps
You just need to show that you can't determine primality by looking at a bounded number of bits of the input. To do this, it's enough to show the following lemma:
If $x$ is prime, then some $2^n + x$ is not prime for $2^n > x$ [hint: reduce mod 3], so for every prime there is a larger composite number such that we must look at more-significant bits than those of $x$ to determine compositeness.
Indeed, suppose that we could determine primality or compositeness uniformly in $n$ steps using Turing machine $\mathcal{M}$. Now, let $p$ be a prime greater than $2^n$, and let $c$ be a composite number as guaranteed by the lemma above. Then let $\mathcal{M}$ try to discover the compositeness of $c$.
In $n$ instructions, the machine's head can't have moved outside the first $n$ bits of $c$'s binary representation; but those first $n$ bits are identical to those of $p$, so $\mathcal{M}$ hasn't had enough time to even tell that $c \not = p$, so it must return the same value for both of them. This contradicts that $\mathcal{M}$ can decide primality in $n$ steps: we have found a composite number for which $\mathcal{M}$ returns "prime".
Show that no TM can verify a primality certificate in a uniformly bounded number of steps
To do this, we need to show that certificates of primality must grow arbitrarily large. If we're working with a scheme such that every prime needs a different certificate, then this is easy by the pigeonhole principle. I also don't immediately see how to apply the previous proof to this, since given a certificate, we might not have to access the whole prime number.
-
0Thank you for making sense out of the question (IMHO the only sensible interpretation). I am not sure the question will survive on our site for a long period of time. Just giving my nod of approval :-) – 2017-01-31