Proving context free language membership is $P$ complete with respect to log-space reductions

937 Views Asked by At

This is exercise from Introduction to Automata theory, Languages and Computation, by Hopcrof, Ullman (first edition). I found example of polynomial reduction to some problems in logic, or graph theory, but I'm interested is it possible to prove this using fact that problem if CFG G is empty is $P$ complete with respect to log-space reductions? (let $L_{CFE}$ be set of all context free empty languages)

Is this ok or I need something more:

Checking if $x\in L$ is same as checking if $L^\mathsf{c}\cap\{x\}$ is empty. Class $\cal{P}$ is closed on complement and intersection so $L^\mathsf{c}\cap\{x\}$ is in $\cal{P}$. For reduction we construct TM $M$ with just on stage: for input $x$ check if $L^\mathsf{c}\cap\{x\}$ is empty, and if it is return $L^\mathsf{c}\cap\{x\}$ and accept, else return$\{x\}$ and decline.

This machine accepts only if result is empty language. But I'm not sure if this is log-space reduction and how to prove it if it is?