How would you go about creating a reduction algorithm that would allow you to solve prime number factorization using Hamiltonian path finding?
Context: I was reading on P vs. NP and it heavily relies on the fact that NP-complete problems can be reduced to one another. I also saw lots of discussion on RSA and other cryptography being broken if we found a polynomial time algorithm for something like Hamiltonian paths. I am wondering how one could crack RSA given a black box that determined whether a Hamiltonian path was present and what that path was.
Thanks!
Here's one approach which applies some basic definitions and long-established theory (without delving into those):
Ideally you would use this turing machine to do a binary search on the set $\{1, \ldots, n\}$ to extract a factor of $n$. Then divide $n$ by this factor and repeat until you have a full factorization.
However, you don't have a way of executing non-deterministic turing machines directly. So instead do the following:
An approach that probably leads to smaller graphs is to directly construct a boolean circuit (or formula) which is satisfiable iff $(n, k)$ is a yes-instance of the has-nontrivial-factor problem.