This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 154 Intro. to Automata and Complexity Theory Handout 32 Autumn 2009 David Dill December 1, 2009 Solution Set 7 Problem 1 (a). S → AC A → aAbb  ǫ C → Cc  ǫ S → AB A → Aa  ǫ B → bBcc  ǫ (b). L 1 ∩ L 2 = { a i b 2 i c 4 i  i ≥ } . Let h be the homomorphism that maps 0 mapsto→ a , 1 mapsto→ bb and 2 mapsto→ cccc . Then h − 1 ( { a i b 2 i c 4 i  i ≥ } ) = { i 1 i 2 i } which was shown in lecture (by the CFPL) not to be contextfree. The CFLs are closed under inverse homomorphisms, so L 1 ∩ L 2 must not be contextfree, either. Problem 2 (a). { S,C } { A,S,C } { S,C } − { A,C,S } { B } { A,S } { B } { B } { S,C } { B } { A,C } { A,C } { A,C } { B } b a a a b (b). { S,C } { S,A,C } { B } { B } { B } { S,C } { B } { S,C } { A,S } { S,C } { A,C } { A,C } { B } { A,C } { B } a a b a b Problem 3 • FALSESAT is in NP: Guess a notallfalse truth assignment and check that it satisfies E in polynomial time. This problem is NPhard, by reduction from SAT. Let E be any propo sitional logic formula. The reduction is: First, check whether E is satisfied by the allfalse 1 assignment. If so, announce that E is satisfiable. Otherwise, E is not satisfied by allfalse. We convert E to E ′ by ANDing it with all its variables ORed with each other: E ′ = ¬ E ∨ ( V 1 ∧ V 2 ··· ) First observe that that E ′ is false if all of its variables V 1 ,V 2 ,... are false. Therefore, if we had a FALSESAT decider, we could input E ′ into the FALSESAT decider....
View
Full
Document
This note was uploaded on 01/12/2010 for the course CS 154 at Stanford.
 '08
 Motwani,R

Click to edit the document details