Context-free and regular language decidability

1.1k Views Asked by At

If L is some context-free language and R is a regular language, I am pretty sure that L ⊆ R is decidable (while R ⊆ L is not) but I am having some difficulty giving an algorithm to prove that it is decidable. Am I right to believe this?

2

There are 2 best solutions below

0
On

What are your tools for proving this? What are the characteristics of a regular or a context free language? Try to use the machine characterization of regularity and context freeness to build a Turing machine which decides the inclusion you want to prove is decidable. Can you see how to do this?

0
On

HINT: $R$ is regular, so its complement $\overline{R}$ is regular, and thus it’s decidable whether $L\cap\overline{R}=\varnothing$.