Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

For any two problems A and B, if A is in P(complexity) then A is reducible to B.

Could anyone explain why this is true?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

I'll assume you're using this definition of reduction: $A$ is reducible to $B$ just if there exists a Turing machine running in time polynomial in the length of input that takes an instance $x$ of $A$ and halts with an instance $x'$ of $B$ such that $x\in L(A)$ if and only if $x' \in L(B)$, where $L(A), L(B)$ are the languages for which $A$ and $B$ are decision problems. This is the most standard defintion, but for precision should really be referred to as polynomial-time reducibility, which would probably have helped you out with the problem.

So, the problem statement being true depends on there being strings $y\in B$ and $y' \notin L(B)$ as long as there are strings both in and not in $L(A)$. If so, all we need to do is run a polynomial-time machine deciding whether $x \in L(A)$, then write $y$ at the end if $x \in L(A)$ and $y'$ if not. This last step only adds constant time, so it's certainly a polynomial reduction.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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