CSE 111, Fall 2004

Homework #5:

Turing-Machine Programs
for Negation
and Inclusive Disjunction


Write TM programs in flowchart notation for each of the following problems. It will be easiest to do these with pencil and paper. (Note that you do not have to write these in what I will be calling "structured" notation.)

  1. Rewrite the Turing-machine algorithm for negation that we will be doing in class so that the first test after "START" is "1?" (instead of "0?").


  2. Write a Turing-machine algorithm for negation, using the following input-output coding:

    In other words, both input and output tapes have only one square. Therefore, unlike the version from lecture, there is no record of the original truth value on the output tape; that information has been destroyed during the computation!


  3. Write a Turing-machine algorithm for inclusive disjunction:

    xyx or y
    falsefalsefalse
    falsetruetrue
    truefalsetrue
    truetruetrue

    using the same input-output coding that we will be using in lecture for conjunction, namely:

    Thus, if the input is 01, then the output will be 011.


DUE: AT THE START OF LECTURE: WED., OCT. 6



Copyright © 2004 by William J. Rapaport (rapaport@cse.buffalo.edu)
file: 111F04/hw05-2004-09-28.html