On this page:
1 README
2 A Non-CFL Language
3 Another Non-CFL Language
4 Turing Machine Sequences of Configurations
5 How Many Stacks?
6 Turing Machine and Closure Operations

Homework 5

Last updated: Tue, 20 Oct 2020 10:12:29 -0400

Out: Wed Oct 21, 00:00 EST Due: Tues Oct 27, 23:59 EST

This homework contains problems related to chapters 2 and 3 of the textbook.

Homework Problems

  1. README (2 point)

  2. A Non-CFL Language (4 points)

  3. Another Non-CFL Language (4 points)

  4. Turing Machine Sequences of Configurations (2 + 2 + 2 + 2 = 8 points)

  5. How Many Stacks? (6 points)

  6. Turing Machine and Closure Operations (2 + 2 + 2 + 2 + 2 + 2 = 12 points)

Total: 36 points

Submitting

Submit this assignment at Gradescope hw5.

You may write up your solution however you like but the submission:
  • should only include pdf or plain text files,

  • and each file must be assigned to the correct problem in Gradescope.

1 README

Create a README file containing the required information, and submit it along with the rest of the homework.

2 A Non-CFL Language

Let A be the language \{a^nb^na^nb^n\mid n\geq 0\}, where \Sigma=\{a,b\}.

Prove that A is not a context-free language.

3 Another Non-CFL Language

Let B be the language \{w\mid w = BW(w) \textrm{\textbf{ and} has equal number }a\textrm{s and }b\textrm{s}\}, where \Sigma = \{a,b\} and BW is The Backwards Operation from Homework 3.

Note: This language is different from the CFL in Homework 4 problem CFGs.

Prove that B is not a context-free language.

4 Turing Machine Sequences of Configurations

Using Turing Machine M_1 from the textbook (and lecture), give the sequence of configurations for the following input strings:
  1. 1#1

  2. 1##1

  3. 10#11

  4. 10#10

5 How Many Stacks?

An NFA has no stack. It recognizes regular languages.

A PDA is defined as an NFA with one stack. It recognizes context-free languages.

Prove that a PDA with two stacks recognizes Turing-recognizable languages.

6 Turing Machine and Closure Operations

Show that Turing-decidable languages are closed under the following operations:
  • union

  • concatenation

  • star

Show that Turing-recognizable languages are closed under the following operations:
  • union

  • concatenation

  • star

Each answer needs only be a short informal description of a Turing Machine (but it must still be sufficiently precise so someone could reconstruct a formal machine if needed).

Also, be careful with non-termination (when appropriate)!