(Note)
 
(10 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
! <math>L(G_1) = 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_1) \cap L(G_2) = \phi</math>
! <math>L(G)</math> is finite
+
! <math>L(G)</math> is regular?
 +
! $L(G)$ is finite?
 
|-
 
|-
 
|Regular Grammar
 
|Regular Grammar
 +
| {{D}}
 
| {{D}}
 
| {{D}}
 
| {{D}}
 
| {{D}}
Line 27: Line 29:
 
| {{D}}
 
| {{D}}
 
| {{UD}}
 
| {{UD}}
| {{?}}
+
| {{D}}
 
| {{UD}}
 
| {{UD}}
 +
| {{D}}
 
| {{D}}
 
| {{D}}
 
|-
 
|-
Line 34: Line 37:
 
| {{D}}
 
| {{D}}
 
| {{D}}
 
| {{D}}
 +
| {{UD}}
 
| {{UD}}
 
| {{UD}}
 
| {{UD}}
 
| {{UD}}
Line 42: Line 46:
 
|Context Sensitive  
 
|Context Sensitive  
 
| {{D}}
 
| {{D}}
 +
| {{UD}}
 
| {{UD}}
 
| {{UD}}
 
| {{UD}}
 
| {{UD}}
Line 51: Line 56:
 
|Recursive
 
|Recursive
 
| {{D}}
 
| {{D}}
 +
| {{UD}}
 
| {{UD}}
 
| {{UD}}
 
| {{UD}}
 
| {{UD}}
Line 59: Line 65:
 
|-
 
|-
 
|Recursively Enumerable
 
|Recursively Enumerable
 +
| {{UD}}
 
| {{UD}}
 
| {{UD}}
 
| {{UD}}
 
| {{UD}}
Line 71: Line 78:
  
 
==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 82: Line 89:
 
# Whether <math>G</math> is ambiguous?
 
# Whether <math>G</math> is ambiguous?
 
# Whether <math>L(G)</math> is a DCFL?
 
# Whether <math>L(G)</math> is a DCFL?
 +
# Whether <math>L(G)</math> is a regular language?
  
 
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>)
 
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>)
Line 98: Line 106:
 
{{Template:FBD}}
 
{{Template:FBD}}
  
[[Category: Automata Theory]]
+
[[Category: Automata Theory Notes]]
 
 
[[Category:Notes & Ebooks for GATE Preparation]]
 
  
 
[[Category: Compact Notes for Reference of Understanding]]
 
[[Category: Compact Notes for Reference of Understanding]]

Latest revision as of 16:01, 9 January 2016

Heads Up! Please don't byheart this table. This is just to check your understanding
Grammar: Decidable and 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 regular? $L(G)$ is finite?
Regular Grammar D D D D D D D D
Det. Context Free D D D UD D UD D D
Context Free D D UD UD UD UD UD D
Context Sensitive D UD UD UD UD UD UD UD
Recursive D UD UD UD UD UD UD UD
Recursively Enumerable UD 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.

Other Undecidable Problems

Proofs

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:

  1. Whether <math>(L(G_1))^\complement</math> is a CFL?
  2. Whether <math>L(G_1) \cap L(G2)</math> is a CFL? (undecidable for DCFG also)
  3. Whether <math>L(G_1) \cap L(G2)</math> is empty? (undecidable for DCFG also)
  4. Whether <math>L(G) = L(R)</math>?
  5. Whether <math>L(R) \subseteq L(G)</math>?
  6. Whether <math>G</math> is ambiguous?
  7. Whether <math>L(G)</math> is a DCFL?
  8. Whether <math>L(G)</math> is a regular language?

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>)

For arbitrary DCFGs <math>G</math>, <math>G_1</math> and <math>G_2</math> and an arbitrary regular expression <math>R</math>

The following problems are decidable:

  1. Whether <math>(L(G_1))^\complement</math> is a DCFL? (trivial)
  2. Whether <math>L(G) = L(R)</math>?
  3. Whether <math>L(G) \subseteq (R)</math>?
  4. Whether <math>L(R) \subseteq L(G)</math>?
  5. Whether <math>L(G)</math> is a CFL? (trivial)





blog comments powered by Disqus
Heads Up! Please don't byheart this table. This is just to check your understanding
Grammar: Decidable and 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 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.

Other Undecidable Problems[edit]

For arbitrary CFGs <math>G</math>, <math>G_1</math> and <math>G_2</math> and an arbitrary regular expression <math>R</math>[edit]

The following problems are undecidable:

  1. Whether <math>(L(G_1))^\complement</math> is a CFL?
  2. Whether <math>L(G_1) \cap L(G2)</math> is a CFL? (undecidable for DCFG also)
  3. Whether <math>L(G_1) \cap L(G2)</math> is empty? (undecidable for DCFG also)
  4. Whether <math>L(G) = L(R)</math>?
  5. Whether <math>L(R) \subseteq L(G)</math>?
  6. Whether <math>G</math> is ambiguous?
  7. Whether <math>L(G)</math> is a DCFL?

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>)

For arbitrary DCFGs <math>G</math>, <math>G_1</math> and <math>G_2</math> and an arbitrary regular expression <math>R</math>[edit]

The following problems are decidable:

  1. Whether <math>(L(G_1))^\complement</math> is a DCFL? (trivial)
  2. Whether <math>L(G) = L(R)</math>?
  3. Whether <math>L(G) \subseteq (R)</math>?
  4. Whether <math>L(R) \subseteq L(G)</math>?
  5. Whether <math>L(G)</math> is a CFL? (trivial)





blog comments powered by Disqus