Assignment 10

Contents:

  • Overview
  • Internet Requirements
  • Practice Problems
  • Problems to be Submitted
  • Extra Credit

  • Overview

    Topic: Theory of Computation
    Related Reading: Mod. 8 of [DH].
    Due: 8pm Monday, 3 December 2001

    Internet Requirements

    You will need an internet connection at time of submission, and either the text's CD-ROM or an internet connection while working on the assignment.

    Warning about the software. I seem to be having a bit of trouble with the software, and have noticed a few things.

  • If you are trying to load a data file which you have already saved to your computer, you use the "Open" button. After doing this, it seems that you have to click on the "Reset" button at the bottom-left to get the newly loaded rules to appear on the screen and to reset the state of the machine.

  • Practice Problems

  • Lab 8.1 of [DH].
  • Lab 8.2 of [DH] (the datafiles "TM4.dat" and so on are on the CD which came with the book)
  • Exercise 4 on pp. 291-292 of [DH].

  • Problems to be Submitted (20 points)

    We will play a version of the game "What's My Line" similar to the practice problems of Lab 8.2 of [DH]. However, we will be providing four different Turing Machines for you to study. With each machine, we will give an expected "format" for the initial tape configuration. Your goal, for each of the four Turing Machines, is to determine the purpose and inter-workings. Each of the four will be worth 5 points on this assignment.

    To get full credit for each, you must do all of the following:

  • (1 point)
    Give at least two examples of input strings and the respective output strings.

  • (2 points)
    Give a general explanation, in English, of the "black-box" nature of the TM. That is, without discussing the internals, explain the mapping between input and output.
    (e.g. give a statement such as "if the input string contains n consecutive 1's, then the output will contain 2n consecutive 1's")

  • (2 points)
    Provide part of a "clear-box" explanation discussing how the machine accomplishes the overall goal.

    You do not necessarily need to explain each and every detail (some of our programs are quite long). But you should be very specific, explaining how particular states and rules are used to accomplish various sub-goals along the way.

    Perhaps 4-6 sentances will suffice.

  • MachineStart StateAlphabetInput Format
    TMa 1 b 0, 1 a blank, then string of mixed 0's and 1's, then a blank
    TMb 1 b, 1, X, Y a blank, then string of 1's, then a blank
    TMc 1 b,0,1,M,X,Y a blank, then string of mixed 0's and 1's, then a blank
    TMd 1 b,0,1,M a blank, then string of mixed 0's and 1's, then a blank

    Extra Credit (4 points)

    The extra credit problem for this assignment is to write a Turing Machine program with the following behavior.
  • Input: a string of n 1's followed by plenty of blanks
  • Output: a string of 0's and 1's which is the binary representation of the number n. (its fine to have leading and trailing blanks on the outut tape)

  • Example: 1111111111111bbbbbbbb --> 1101, as we convert 13 from unary to binary.
  • Hint: During lecture, we created a program to increment a binary number.

  • Save your TM in a file "binary.dat" to be submitted



  • Additional Warning about the software.

  • It appears that the software only allows you to enter states {0,1,...9}. My hope is that for this task, 10 states will be sufficient. But if not, please simply type up your TM rules in a file and submit that document instead.

  • Labs Lab 8.3 and Lab 8.4 of [DH] may give you some practice for writing your own TMs.

  • However, I seem to have trouble in entering my own TM rules when using labs 8.3 or 8.4, which do not start with an existing program. When I try to type new rules, they do not appear on the screen.

    Instead, it seems like I first have to "Open" some other saved TM, then erase those rules and create my own. I am not sure of any other way at this point and I do not know if this problem exists for everyone, or just me.


  • comp150 Class Page
    mhg@cs.luc.edu
    Last modified: 21 November 2001