notes18 Closure Properties and Grammars

# notes18 Closure Properties and Grammars - CS 373: Theory of...

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 373: Theory of Computation Gul Agha Mahesh Viswanathan Fall 2010 1 1 Closure Properties 1.1 Decidable Languages Boolean Operators Proposition 1. Decidable languages are closed under union, intersection, and complementation. Proof. Given TMs M 1 , M 2 that decide languages L 1 , and L 2 • A TM that decides L 1 ∪ L 2 : on input x , run M 1 and M 2 on x , and accept iff either accepts. (Similarly for intersection.) • A TM that decides L 1 : On input x , run M 1 on x , and accept if M 1 rejects, and reject if M 1 accepts. Regular Operators Proposition 2. Decidable languages are closed under concatenation and Kleene Closure. Proof. Given TMs M 1 and M 2 that decide languages L 1 and L 2 . • A TM to decide L 1 L 2 : On input x , for each of the | x | + 1 ways to divide x as yz : run M 1 on y and M 2 on z , and accept if both accept. Else reject. • A TM to decide L * 1 : On input x , if x = accept. Else, for each of the 2 | x |- 1 ways to divide x as w 1 ...w k ( w i 6 = ): run M 1 on each w i and accept if M 1 accepts all. Else reject. Inverse Homomorphisms Proposition 3. Decidable languages are closed under inverse homomorphisms. Proof. Given TM M 1 that decides L 1 , a TM to decide h- 1 ( L 1 ) is: On input x , compute h ( x ) and run M 1 on h ( x ); accept iff M 1 accepts. Homomorphisms Proposition 4. Decidable languages are not closed under homomorphism Proof. We will show a decidable language L and a homomorphism h such that h ( L ) is undecidable • Let L = { xy | x ∈ { , 1 } * ,y ∈ { a,b } * ,x = h M,w i , and y encodes an integer n such that the TM M on input w will halt in n steps } • L is decidable: can simply simulate M on input w for n steps • Consider homomorphism h : h (0) = 0, h (1) = 1, h ( a ) = h ( b ) = . • h ( L ) = HALT which is undecidable....
View Full Document

## This note was uploaded on 10/04/2011 for the course CS 373 taught by Professor Viswanathan,m during the Fall '08 term at University of Illinois, Urbana Champaign.

### Page1 / 8

notes18 Closure Properties and Grammars - CS 373: Theory of...

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

View Full Document
Ask a homework question - tutors are online