sol07 - CS 154 Intro to Automata and Complexity Theory...

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: 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 context-free. The CFLs are closed under inverse homomorphisms, so L 1 ∩ L 2 must not be context-free, 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 • FALSE-SAT is in NP: Guess a not-all-false truth assignment and check that it satisfies E in polynomial time. This problem is NP-hard, by reduction from SAT. Let E be any propo- sitional logic formula. The reduction is: First, check whether E is satisfied by the all-false 1 assignment. If so, announce that E is satisfiable. Otherwise, E is not satisfied by all-false. 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 FALSE-SAT decider, we could input E ′ into the FALSE-SAT decider....
View Full Document

This note was uploaded on 01/12/2010 for the course CS 154 at Stanford.

Page1 / 3

sol07 - CS 154 Intro to Automata and Complexity Theory...

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