1
$\begingroup$

Question: Is language $L \in \mathbf{P}$ also $\mathbf{P}$-complete with respect to polynomial-time reduction?

My thoughts: Given a language $L \in \mathbf{P}$, we want to show that for any other language $L' \in \mathbf{P}: L' \leq_p L$. To do this, given any input $w' \in \Sigma^*$, we can check in polynomial time if $w' \in L'$. If:

  • $w' \in L'$: construct a word $w \in L$.
  • $w' \notin L'$: construct a word $w \notin L$.

This construction would satisfy the existence of $f\colon \Sigma^* \to \Sigma^*, w' \in L' \iff f(w') \in L$.

This is where I stuck: Given a language $L$, how can we find a word $w \in L$ or a word $w \notin L$.

Addendum: I think I understood the problem. Since $L' \leq_p L$ only requires existence of $f\colon \Sigma^* \to \Sigma^*$, I don't need construct $f$.

$\endgroup$
1
  • $\begingroup$ I'd like to give you a hint: For any polynomials $p, q$, it holds true that $p + q$, $p\cdot q$, $p-q$ are also polynomials. $\endgroup$
    – Algebruh
    Commented Feb 28, 2022 at 11:55

1 Answer 1

1
$\begingroup$

I think you almost got it right, here is what you are missing: if $L$ is not trivial (i.e, not empty and not $\Sigma^*$) then there are words $w_1\in L,w_2\notin L$. You can use them to construct $f$.

$\endgroup$
2
  • $\begingroup$ Actually, while one word w1 in L and one word w2 not in L are required to meet the definition of "P-complete", you can completely ignore that word (if L' is in P then you can prove that w' in L' or that w' is not in L' in polynomial time, without using w1 or w2 at all). $\endgroup$
    – gnasher729
    Commented Mar 1, 2022 at 10:47
  • $\begingroup$ @gnasher729 thats correct, but for the syntax in the definiton of those reductions - this actually matters (since you cant find a word in $\emptyset$ so $L'$ reduces to $\emptyset$ $\iff L'=\emptyset$) $\endgroup$
    – nir shahar
    Commented Mar 1, 2022 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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