pa-decidable

pa-decidable - 14b: Decidable problems of context-free lan-...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 14b: Decidable problems of context-free lan- guages The following decision problems about context-free gram- mar are decidable, i.e., there exist algorithms for solving them. 1. Given a CFG G and a string w , does G generate w ? 2. Given a CFG G , is e ∈ L ( G )? 3. Given a CFG G , is L ( G ) = ∅ ? There are no algorithms to decide 1. Given two CFGs G 1 and G 2 , is L ( G 1 ) ⊆ L ( G 2 )? 2. Given two CFGs G 1 and G 2 , is L ( G 1 ) = L ( G 2 )? 1 First, we state without proof the following theorem: Every CFG can be converted to the Chomsky normal form. Every rule of a CFG in Chomsky Normal form is of the form: X → Y Z or X → σ , where X, Y, Z are nonterminals, and σ is a terminal. There are no rules of the form X → e unless X is the start variable (i.e., e ∈ L ). Why is CNF useful? If a CFG G is in Chomsky NF, then a derivation of a string of length n is exactly 2 n − 1 steps long....
View Full Document

Page1 / 5

pa-decidable - 14b: Decidable problems of context-free lan-...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online