Assuming you're talking about polynomial-time reductions, since PRIME is in $P$, you can reduce it to any non-trivial decision problem (for which there is at least one instance with answer YES and at least one instance with answer NO). Moreover, any problem in $P$ can be reduced to PRIME.
To reduce an instance $I$ of PRIME to an instance $I_Q$ of non trivial decision problem $Q$, let $Y_Q$ and $N_Q$ be a YES and a NO instance for $Q$, respectively. The reduction is as follows: solve $I$ using a polynomial-time algorithm for PRIME. Then, let
$$I_Q = \begin{cases}Y_Q & \mbox{if $I$ is a YES instance}, \\ N_Q & \mbox{if $I$ is a NO instance}.\end{cases}$$
To reduce an instance $I_Q$ of a problem $Q \in P$ to an instance $I$ of PRIME, solve $I_Q$ using a polynomial-time algorithm for $Q$ and define
$$I = \begin{cases}2 & \mbox{if $I_Q$ is a YES instance}, \\ 1 & \mbox{if $I_Q$ is a NO instance.}\end{cases}$$
PRIME
– wannik Mar 28 '20 at 07:07PRIME
. I see a lot of reduction example in NP complete proof. But I thinkPRIME
is an easy to understand. So I would like to see it in a reduction example. – wannik Mar 28 '20 at 08:32PRIME
because it is easy to be explained in term of language L = {10, 11, 101, 111, 1011, ...} Are there any other problem that can be easily explained in term of language and is more suitable to reduction? – wannik Mar 28 '20 at 08:52