0% found this document useful (0 votes)
17 views2 pages

Homework 7

Uploaded by

timblegoorn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Homework 7

Uploaded by

timblegoorn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CS 361– Homework 7

Total possible points: 80

In addition to submitting the PDF with your solutions, submit JFLAP files for Problems 2 and 4.

1. (10 points) Consider Turing Machine MA in Figure 1. What is the language modeled by this Turing Machine?
Mention 1 string in language A and 1 string not in language A.

Figure 1. Turing Machine MA

2. (20 points: image and JFLAP file) Create a state-diagram representation of a single tape Turing Machine MB
that recognizes language B= {1S-1T=1U | where S ³T > 0 and S-T=U}. The halting configuration should be qF1S-
1T=1U that is as the original input string. Strings in B are “111-11=1”, “1111-1=111”. Strings not in B are “1-
11=1”, “11-1=111”, “1111-1=1111”.

3. (15 points) Give a descriptive representation of a Turing Machine MC recognizing language


C = {w over {0, 1, #}*| the number of 0’s and 1’s in w are not equal and w contains exactly 1 ‘#’}.
For example, 110# ∈ C, 010#10 ∈ C, 01##1 ∉ C and #0011 ∉ C. In this case, for your description you can use a
traditional (single tape) or any variation of TM we have covered in class.

4. (20 points: image and JFLAP file) Construct a state-diagram representation of Turing Machine MB (in
Problem 2). In this case, you are required to use 2-tape TM with the stay option. Please remember to the
final configuration should be qF1S-1T=1U on the first tape and the second, i.e., working tape should be empty.

5. (15 points) Give a description of a TM MD that recognizes language D = {w over {0, 1}*| w contains twice as
many 1’s as 0’s}. For example: 101 ∈ D, 111100 ∈ D, and 001100 ∉ D. You can use traditional or any variation
of TM we have covered in class.

Some reminders:
• Be sure to pay special attention to final (halting) configurations, when required.
• For problems 2 and 4 you are meant to create the Turing Machine themselves in JFLAP.
• For problems 3 and 5 you are expected to provide pseudocode for the corresponding machines. In your
pseudocode, you need to be clear of what are your reading and writing on the tape (and which tape if you use
more than 1), the direction in which the tape heads will move, and when the Turing Machine should halt and
accept and/or halt and reject. Having said that, the point is not for you to describe state-by-state what the
Turing Machine would look like. Instead, the goal of the description is for you to offer a high-level overview
that considers what to read/write, in which order, in which directions the tape would move, and how you an
reach accept/reject decision.

You might also like