This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Theory of Algorithms. Spring 2000. Homework 10 Solutions. Section 9.1 (2) Here is a Turing Machine with only two states which is an acceptor for the language L ( a ( a + b ) * ). Notice that the design of the Turing Machine employs the idea that we don’t have to read the whole string in order to accept it. F = { q f } . δ is given by one clause: δ ( q , a ) = ( q f , a, R ). (3) Regarding the Turing Machine presented in Example 9.7: q aba ‘ xq 1 ba ‘ q 2 xya ‘ xq ya ‘ xyq 3 a ‘ HALT. Since q 3 is not an accept state, aba is rejected. q aaabbbb ‘ xq 1 aabbbb ‘ xaq 1 abbbb ‘ xaaq 1 bbbb ‘ xaq 2 aybbb ‘ xq 2 aaybbb ‘ q 2 xaaybbb ‘ xq aaybbb ‘ xxq 1 aybbb ‘ xxaq 1 ybbb ‘ xxayq 1 bbb ‘ xxaq 2 yybb ‘ xxq 2 ayybb ‘ xq 2 xayybb ‘ xxq ayybb ‘ xxxq 1 yybb ‘ xxxyq 1 ybb ‘ xxxyyq 1 bb ‘ xxxyq 2 yyb ‘ xxxq 2 yyyb ‘ xxq 2 xyyyb ‘ xxxq yyyb ‘ xxxyq 3 yyb ‘ xxxyyq 3 yb ‘ xxxyyyq 3 b ‘ HALT. Since q 3 is not an accpet state, aaabbbb is rejected. (4) No. (5) L ( ab * + bb * a ( a + b ) * ) . Notice the ( a + b ) * part. This is because in the last δclause, M reads an a and halts and accepts without looking at the rest of the input string. Compare this with the fourth δclause in which...
View
Full
Document
This note was uploaded on 07/17/2011 for the course MAD 3512 taught by Professor Staff during the Spring '07 term at University of Florida.
 Spring '07
 Staff

Click to edit the document details