Prove that if L is decidable then half(L) is decidable too

automatacomputer sciencedecidabilityregular-languageturing-machines

Let L be decidable language, and let half(L) be: half(L)={u∣uv∈L s.t.|u|=|v|}. Prove that if L is decidable then half(L) is decidable too.

I tried to build a Turing Machine to decide half(L) but none of them seems to work.

Could anyone explain this to me, please?

Thanks!

Best Answer

Hint: Note that in order to check whether $u\in\text{half}({\mathscr L})$ the search space for the other 'half' $v$ is bounded in length.

Also, note the similarity between this and the relation between the complexity classes ${\mathsf P}$ and ${\mathsf N}{\mathsf P}$.

Related Question