hwsol10 - Theory of Algorithms. Spring 2000. Homework 10...

Info iconThis preview shows pages 1–2. 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: 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 dont 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

Page1 / 3

hwsol10 - Theory of Algorithms. Spring 2000. Homework 10...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online