0
$\begingroup$

Is is more accurate to say that in complexity theory:

$$\text{exponentiation} \leq_p \text{multiplication}$$

or

$$\text{multiplication} \leq_p \text{exponentiation}$$

I understand that if we know how to do multiplication, then we can run multiplication in a loop in polynomial time to get the answer to the exponentiation problem.

But which of the two reflects this? Do we say exponentiation reduces to multiplication (the first one), or the other way around (the second one)?

$\endgroup$
  • 2
    $\begingroup$ Since you understand how to do exponentiation once you have a method for multiplication (you know "how to reduce"), you just need to look closely at the definition for $\Rightarrow_{\text{polynomial}}$ and see how it encompasses your reduction. $\endgroup$ – phs Jan 25 '16 at 19:21
  • 1
    $\begingroup$ Related to (but maybe not a duplicate of?) this: cs.stackexchange.com/questions/24691/… $\endgroup$ – jmite Jan 25 '16 at 19:25
2
$\begingroup$

Both statements are accurate, assuming $\le_p$ refers to polynomial-time Turing reductions (i.e., Cook reductions), and assuming that in the exponentiation problem, the exponent is specified in unary (otherwise you can't exponentiate in polynomial time). Given an algorithm to multiply in polynomial time, you can use it to exponentiate in polynomial-time via a Turing reduction, since $a^k = a \times a \times \cdots \times a$. Also, given an algorithm to exponentiate in polynomial time, you can use it to multiply in polynomial time via a Turing reduction, since $ab = [(a+b)^2 - a^2 - b^2]/2$. That said, since both multiplication and exponentiation can be computed in polynomial time directly, there's really no need for such a fancy reduction: it's immediate from the definitions that any problem in P reduces to any other problem in P.

You might want to refresh your understanding of the definition of the reductions.

Note that we usually apply reductions to languages, i.e., to decision problems. So, to really understand how to apply the formal theory to your question, you'd first need to re-cast it as a question about a formal language or about a decision problem. "Multiplication" is not a decision problem. Re-casting as a decision problem will complicate things a little bit, and change the nature of the reductions (for instance, the reductions I hinted at above might no longer work), but the bottom line will still remain true: since you can reduce any problem in P to any other problem in P, there will be a reduction in both directions.

See also What is the definition of P, NP, NP-complete and NP-hard?, What are common techniques for reducing problems to each other?, What is the difference between an algorithm, a language and a problem?, and NP-completeness: Reduce to or reduce from?

$\endgroup$
  • $\begingroup$ Can't I basically remodel any of them as decision problems? For example "Is 2^8 = 64?" which is an exponentiation problem. And then I'd take advantage of the multiplication algorithm to get the answer? $\endgroup$ – Nakano Jan 25 '16 at 22:32
  • $\begingroup$ @Nakano, yes, you can remodel them as decision problem. I'll let you work through the definitions and identify what reduction strategies do and don't work. I've edited my answer to elaborate a bit further (e.g., in the 3rd paragraph), but I'm going to leave a bit for you to work through on your own, as that's usually the best way to learn. $\endgroup$ – D.W. Jan 25 '16 at 23:26
  • $\begingroup$ I'm not really sure what you are implying. I figure any reduction works as long as you can leverage one algorithm to solve the other. Or are you saying that you have to transform one yes/no problem into another yes/no problem, which is a little different than "use multiplication to solve exponentiation" in an algorithmic sense? $\endgroup$ – Nakano Jan 25 '16 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.