Arjun Suresh (talk | contribs) |
Arjun Suresh (talk | contribs) |
||
Line 71: | Line 71: | ||
==Other Undecidable Problems == | ==Other Undecidable Problems == | ||
− | + | [http://www.cis.upenn.edu/~jean/gbooks/PCPh04.pdf Proofs] | |
===For arbitrary CFGs <math>G</math>, <math>G_1</math> and <math>G_2</math> and an arbitrary regular expression <math>R</math>=== | ===For arbitrary CFGs <math>G</math>, <math>G_1</math> and <math>G_2</math> and an arbitrary regular expression <math>R</math>=== | ||
The following problems are '''undecidable''': | The following problems are '''undecidable''': | ||
Line 95: | Line 95: | ||
# Whether <math>L(G)</math> is a CFL? (trivial) | # Whether <math>L(G)</math> is a CFL? (trivial) | ||
+ | For any $TM$ $M$, $\Zigma^*-L(M)$ is a $CFL$ | ||
Grammar | <math>w \in L(G)</math> | <math>L(G) = \phi</math> | <math>L(G) = \Sigma^*</math> | <math>L(G_1) \subseteq L(G_2)</math> | <math>L(G_1) = L(G_2)</math> | <math>L(G_1) \cap L(G_2) = \phi</math> | <math>L(G)</math> is finite |
---|---|---|---|---|---|---|---|
Regular Grammar | D | D | D | D | D | D | D |
Det. Context Free | D | D | D | UD | ? | UD | D |
Context Free | D | D | UD | UD | UD | UD | D |
Context Sensitive | D | UD | UD | UD | UD | UD | UD |
Recursive | D | UD | UD | UD | UD | UD | UD |
Recursively Enumerable | UD | UD | UD | UD | UD | UD | UD |
Checking if <math>L(CFG)</math> is finite is decidable because we just need to see if <math>L(CFG)</math> contains any string with length between <math>n</math> and <math>2n-1</math>, where <math>n</math> is the pumping lemma constant. If so, <math>L(CFG)</math> is infinite otherwise its finite.
Proofs
The following problems are undecidable:
But whether <math>L(G) \subseteq L(R)</math> is decidable. (We can test if <math>L(G) \cap compl(L(R))</math> is <math>\phi</math>)
The following problems are decidable:
For any $TM$ $M$, $\Zigma^*-L(M)$ is a $CFL$
Grammar | <math>w \in L(G)</math> | <math>L(G) = \phi</math> | <math>L(G) = \Sigma^*</math> | <math>L(G_1) \subseteq L(G_2)</math> | <math>L(G_1) = L(G_2)</math> | <math>L(G_1) \cap L(G_2) = \phi</math> | <math>L(G)</math> is finite |
---|---|---|---|---|---|---|---|
Regular Grammar | D | D | D | D | D | D | D |
Det. Context Free | D | D | D | UD | ? | UD | D |
Context Free | D | D | UD | UD | UD | UD | D |
Context Sensitive | D | UD | UD | UD | UD | UD | UD |
Recursive | D | UD | UD | UD | UD | UD | UD |
Recursively Enumerable | UD | UD | UD | UD | UD | UD | UD |
Checking if <math>L(CFG)</math> is finite is decidable because we just need to see if <math>L(CFG)</math> contains any string with length between <math>n</math> and <math>2n-1</math>, where <math>n</math> is the pumping lemma constant. If so, <math>L(CFG)</math> is infinite otherwise its finite.
The following problems are undecidable:
But whether <math>L(G) \subseteq L(R)</math> is decidable. (We can test if <math>L(G) \cap compl(L(R))</math> is <math>\phi</math>)
The following problems are decidable: