# Why is $\mathsf{P} \subseteq \oplus \mathsf{P}$?

I have a very basic question. $$\mathsf{P}$$ is the class of decision problems solvable in polynomial time by a Turing machine. $$\oplus \mathsf{P}$$ is the class of decision problems solvable by an NP machine such that

1. If the answer is 'yes,' then the number of accepting paths is odd.
2. If the answer is 'no,' then the number of accepting paths is even.

How do you show that $$L \in \mathsf P \implies L \in \oplus \mathsf P$$? i.e., that $$\mathsf{P} \subseteq \oplus \mathsf{P}$$.

• Ah, I see. To decide if $x \in L$ for some $L \in \oplus P$, we are deciding if there exists any nondeterministic Turing machine such that the number of accepting paths is odd. In the case that $L \in \mathsf{P}$ we can just give the deterministic one which has one accepting path iff $x \in L$. And, $x \not\in L$ iff there are zero accepting paths (if that weren't the case, then the deterministic TM would have accepted). Thanks, your original answer makes perfect sense now. Commented Feb 24, 2022 at 17:07