HW7Soln

# HW7Soln - 2 calls a decider. Also, M accepts <R,S>...

This preview shows page 1. Sign up to view the full content.

CSCI 2670 Hw 7 4.4.1 Consider the following Turing machine M = “ on input <A>, where A is a DFA 1. Create a DFA B such that L(B) = Σ* 2. Submit <A,B> to the decider for EQ DFA 3. If it accepts, accept 4. If it reject, reject. M is clearly a decider since steps 1, 3, and 4 will not create an infinite loop and step 2 calls a decider. Furthermore, M will accept those DFA’s whose language is the same as B’s language – i.e. DFA’s whose language is Σ* -- and will reject all other languages. Therefore, M is a decider for ALL DFA so ALL DFA is decidable. 4.12 Consider the following Turing machine M = “On input <R,S> where R and S are regular expressions 1. Convert R to DFA A and S to DFA B 2. Construct DFA C such that L(C) = L(B) ∩ L(A) 3. Submit <A,C> to the decider for EQ DFA 4. If it accepts, accept 5. If it rejects, reject .” M is a decider since steps 1, 2, 4, and 5 will not create and infinite loops and step
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2 calls a decider. Also, M accepts <R,S> iff L(R) = L(R) L(S) i.e., iff L(R) L(S). Therefore, M is a decider for A so A is decidable. 4.19.1 Note that if the DFA accepts w R whenever it accepts w, then L(M) = L(M R ), where M R is the DFA that accepts the reverse of strings accepted by M. In a previous homework, we proved that if M is a regular language, then so is M R . Consider the following Turing machine T = On input <M>, where M is a DFA 1. Construct DFA N that accept the reverse of strings accepted by M 2. Submit <M,N> to the decider for EQ DFA 3. If it accepts, accept 4. If it rejects, reject. T is a decider since 1, 3, and 4 will not create an infinite loop and step 2 calls a decider. Also, T accept M iff L(M) = L(M R ). Therefore T decides S so S is decidable....
View Full Document

## This note was uploaded on 02/07/2011 for the course CS 501 taught by Professor Sm during the Spring '11 term at Indiana.

Ask a homework question - tutors are online