1

I've been asked to solve this problem, but I'm completely stuck now.

Is the set $\{G \in\text{CFG} \mid L(G)\supseteq L(A) \}$ where A is DFA fixed beforehand decidable?

I know I've to find a reduction, and as a hint they told me that it is related to Acceptance Problem or Post Correspondence Problem, or probably with Non-empty Intersection problem ( $\{\langle G1, G2\rangle \in \text{CFG} \times \text{CFG} \mid L(G1) \cap L(G2) \not= \emptyset\}$), which are undecidable.

I've been reading about these problems for hours, and reading about reductions from these problems to others trying to find any idea, but I'm stuck.

I'd really appreciate any help, whether some hints or the answer.

John L.
  • 39,205
  • 4
  • 34
  • 93
sajunt4
  • 13
  • 1
  • 3

2 Answers2

1

Indeed, it is undecidable whether a context-free grammar generates all strings over its alphabet. But I guess you want to know how such a result is obtained.

The classical result "undecidable $L(G) = \Delta^*$ for CFG $G$" was obtained by Bar-Hillel, Perles and Shamir in 1961 using a coding of Turing Machine computations. They showed that the set of strings that where not codings of valid TM computations form a context-free language. Of course if there are no valid computations then that language is $\Delta^*$.

You can do the same with codings of solutions of the Post Correspondence Problem. Given set of pairs $(u_1,v_1), \dots, (u_n,v_n)$ you can code PCP "solutions" as strings $u_{i_1}\dots u_{i_k}\#v^R_{i_k}\dots v^R_{i_1}$ such that both sides are equal (or rather, mirror image).

Argue that the non-solutions form a context-free language.

Hendrik Jan
  • 31,459
  • 1
  • 54
  • 109
0

It depends on $A$.

As Hendrik pointed out, it is undecidable whether $L(G)\supseteq\Delta^∗$ for a context-free grammar $G$ with alphabet $\Delta$, $|\Delta|>1$: Is equivalence of a CFG and an RG undecidable?".

When the alphabet is unary, it is always decidable since a context-free language defined over a one-letter alphabet is regular and the problem of containment of regular languages is decidable.

It is trivially decidable whether $L(G)\supseteq\emptyset$ since the answer is always yes. In fact, it is decidable whether $L(G)$ contains a given finite language since the membership question for a context-free language is decidable because of CYK algorithm or any CFL parsing algorithm.

John L.
  • 39,205
  • 4
  • 34
  • 93