2

So, let's say we have two languages $L$ (which is any context-free language) and $M$ which is the basic CFL $\{0^n1^n: n\geq 0\}$.

Can $L \le_p M$ ? Why or why not? How do polynomial time reductions even work with CFLs in general?

David Richerby
  • 82,470
  • 26
  • 145
  • 239
Trap123
  • 23
  • 2

1 Answers1

2

Since context-free languages are in P and $M$ is non-trivial, there is an easy polynomial time reduction from every context-free language $L$ to $M$. The reduction decides whether the input is in $L$ or not, and according to that outputs either $\epsilon$ or $0$, say.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514