52 Slides--Decidability, Reductions

52 Slides--Decidability, Reductions - CS103 HO#52...

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

View Full Document Right Arrow Icon
CS103 HO#52 Slides--Decidability, Reductions May 19, 2010 1 Theorem: 4.5 – Equivalence Testing Language: EQ DFA = { A, B | A and B are DFAs and L(A) = L(B) } Result: DECIDABLE Proof idea: Construct a DFA for (L(A) L(B)) (L(A) L(B)). Accept if T accepts; otherwise reject. Note that regular languages are closed under union, intersection, and complementation. Machine name: F (L(A) L(B)) (L(A) L(B)) = Ø (L(A) L(B)) = Ø and (L(A) L(B)) = Ø x ((x L(A) x L(B)) and (x L(B) x L(A))) L(A) = L(B) Other Problems for Regular Languages A B AB B A L(A) L(B) (L(A) L(B) Theorem: 4.7 – Does a CFG generate a string? Language: A CFG = { G, w | G is a CFG that generates w } Result: DECIDABLE Proof idea: Convert to Chomsky Normal Form. Where n = |w|, try all derivations up to 2n – 1 steps, or if n = 0, 1 step. Machine name: S Theorem: 4.8 – Emptiness Testing for L(CFG) Language: E CFG = { G | G is a CFG and L(G) = Ø } Result: DECIDABLE Proof idea: Mark terminals. Mark A if A generates a sequence of marked symbols. If the start variable is not marked, accept; else reject. Machine name: R Theorem: 4.9 –CFLs are decidable Language: A CFL = { A, w | A is a CFL and w A } Result: DECIDABLE Proof idea: Let G be a CFG for A. Run S on G, w . Machine name: M G Decidability Problems for Context-Free Languages Decidability Problems for Context-Free Languages Note that EQ CFG = { G, H | G and H are CFGs and L(G) = L(H) } is not decidable. CFGs are not closed under complementation or intersection. Regular Context-Free Decidable Turing-recognizable A DFA A NFA A REX E DFA EQ DFA A CFG A CFL E CFG Anything out here? Theorem 4.17: R is not countable. Corollary 4.18: Some languages are not Turing-recognizable For any alphabet , the set of strings * is countable, since there are a finite number of strings of any length. The set of Turing machines is countable since each TM has an encoding as a string.
Background image of page 1

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

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

This document was uploaded on 02/08/2011.

Page1 / 4

52 Slides--Decidability, Reductions - CS103 HO#52...

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

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