hw9f03-sol-post - CS 373 Fall 2003 * solution * * November...

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

View Full Document Right Arrow Icon
CS 373 – Fall 2003 – ********** solution ***** ********** November 12, 2003 Homework Assignment 9 - Turing Machines Due 11/21/03 (Friday) Problems related to chapter 9 1. Consider the Turing Machine: M = ( {q 0 , q 1 , q 2 , q 3 }, {a, b}, {a, b, #, }, δ , q 0 , , { q 3 } ), where δ is given by: δ (q 0 , a) = (q 1 , a, L) δ (q 0 , b) = (q 0 , b, R) δ (q 0 , ) = (q 0 , , R) δ (q 0 , #) = (q 0 , #, R) δ (q 1 , a) = (q 1 , a, L) δ (q 1 , b) = (q 2 , b, R) δ (q 1 , ) = (q 1 , , L) δ (q 1 , #) = (q 1 , #, R) //typo fixed δ (q 2 , a) = (q 2 , a, R) δ (q 2 , b) = (q 2 , b, R) δ (q 2 , ) = (q 3 , , L) δ (q 2 , #) = (q 2 , #, R) (a) Trace the computation of M (until it halts if it halts) starting with the instantaneous description: #a q 0 bbbbaba (b) Give an informal description of what M does when started in state q 0 at any position on the entire tape . Assume the initial tape content is a random sequence of symbols from Γ = {a, b, #, }, and there may be an arbitrary and unbounded number of these symbols on the tape. 2. Design a Turing machine which accepts the language: L = {a n b m a n+m : n 0, m 1}. Use pseudo code or very clear English to give an overview or description of the algorithm. Finally you must give a “low level” delta function implementation of this TM. The transition functions must be clearly commented. Remember that in addition to writing the code for the path to accepting a string, you must account for all the ways a string could be rejected. There should be three reasons for rejection to be accounted for by your code: (1) the suffix of “a’s” is too long (too many a’s: larger than n+m), (2) the suffix of a’s is too short (not enough a’s, less than n+m), (3) the over all format is wrong: string does not have a distinct prefix of a’s, a mid field of b’s and a suffix of a’s. 3. Design a turing machine which would accept the language: L = { ww : w (a, b) + } Instead of using a low level delta function implementation, you may use a high level outline of the algorithm for the design. The outline must be clear enough to allow a person to unambiguously write the transitions functions for this automaton.
Background image of page 1

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

View Full DocumentRight Arrow Icon
You just “solved” a problem previously unsolvable without the power of a Turing Machine. If this language is not context free (see example 8.2), then what is it? What are the implications of this problem in the theory of languages? Do you think there are languages even beyond the TM? – I thought that TM’s were supposed to be the supermen of the automata world. 4.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/07/2010 for the course COMPUTER S 138 taught by Professor Icamarra during the Spring '10 term at UCLA.

Page1 / 10

hw9f03-sol-post - CS 373 Fall 2003 * solution * * November...

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

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