Arjun Suresh (talk | contribs) (→For arbitrary DCFGs G, G1 and G2 and an arbitrary regular set R) |
Arjun Suresh (talk | contribs) |
||
| Line 66: | Line 66: | ||
|} | |} | ||
| + | Checking if L(CFG) is finite is decidable because we just need to see if L(CFG) contains any string with length between n and 2n-1 where n is the pumping lemma constant. If so, L(CFG) is infinite otherwise its finite. | ||
==Other Undecidable Problems == | ==Other Undecidable Problems == | ||
| 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 | D | UD | UD | UD | UD | UD | UD |
Checking if L(CFG) is finite is decidable because we just need to see if L(CFG) contains any string with length between n and 2n-1 where n is the pumping lemma constant. If so, L(CFG) is infinite otherwise its finite.
The following problems are undecidable:
But whether <math>R \subseteq L(G)</math> is decidable
The following problems are decidable:
| 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 | D | UD | UD | UD | UD | UD | UD |
Checking if L(CFG) is finite is decidable because we just need to see if L(CFG) contains any string with length between n and 2n-1 where n is the pumping lemma constant. If so, L(CFG) is infinite otherwise its finite.
The following problems are undecidable:
But whether <math>R \subseteq L(G)</math> is decidable
The following problems are decidable: