hw11a - Copy (2)

hw11a - Copy (2) - Homework Assignment 11 Due Sample...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
MCS4653, Theory of Computation Homework Assignment 11, Due 11/26/03 Sample Answers Page 1 (Sudkamp 9.3 pages 291-2) Construct a Turing machine with the input alphabet { a,b } to perform each of the following operations. Note that the tape head is scanning position zero in state q f whenever the computation terminates. a) Move the input one space to the right. Input configuration q 0 BuB , result q f BBuB . q 0 j q 1 j q f j q 3 j q 4 j q 5 j B/B R a/a R b/b R B/B L a/B R B/a L b/B R B/b L B/B L b) Concatentate a copy of the reversed input string to the input. Input configuration q 0 BuB , result q f Buu R B . q 0 j q 1 j q 2 j q 3 j q 4 j q 5 j q 6 j q f j B/B R a/a R b/b R B/B L a/X R B/a L X/X L Y/Y L X/X R Y/Y R a/a R b/b R a/a L b/b L X/X R Y/Y R a/a R b/b R X/a R Y/b R a/a L b/b L b/Y R B/b L X/X L Y/Y L B/B R B/B L a/a L b/b L or q 0 j q 1 j q f j q 3 j q 4 j B/B R a/X R b/Y R B/B L X/a R B/a L Y/b R B/b L a/a R b/b R a/a R b/b R a/a L b/b L
Background image of page 1

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

View Full DocumentRight Arrow Icon
MCS4653, Theory of Computation
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Homework Assignment 11, Due 11/26/03 Sample Answers Page 2 c) Insert a blank between each of the input symbols. For example, input configuration q BabaB , result q f BaBbBaB . q j q 1 j q 2 j q 3 j q 4 j q 5 j q 6 j q 7 j q f j B/B R a/X R b/Y R B/B L B/B L a/a R b/b R B/B L a/Z R B/a L Z/a L b/Z R B/b L Z/b L Z/Z L X/X R Y/Y R Z/Z R X/a L Y/b L Z/B L d) Erase the b ’s from the input. For example, input configuration q BbabaababB , result q f BaaaaB . q j q s j q f j q 6 j q 5 j q 1 j q 2 j q 3 j q 4 j B/B R a/a R B/B L a/a L b/b R a/a L a,b/X R b/b L a,b/Y R a/a R b/b R B/B L a,b/B L X/a L Y/b L a/a R b/b R B/B R...
View Full Document

This note was uploaded on 09/26/2011 for the course TOC 1345 taught by Professor Joe during the Spring '11 term at HDM Stuttgart.

Page1 / 2

hw11a - Copy (2) - Homework Assignment 11 Due Sample...

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