On this page:
1 A Non-Context-Free Language
2 Another Non-Context-Free Language
3 Turing Machine Config Sequences
4 It’s All About the Stacks
5 Closure Operations and Turing Machines

Homework 6

Last updated: Tue, 9 Mar 2021 17:53:56 -0500

Out: Wednesday March 10, 00:00 EST Due: Sunday March 28, 23:59 EST

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

Homework Problems

  1. A Non-Context-Free Language (4 points)

  2. Another Non-Context-Free Language (4 points)

  3. Turing Machine Config Sequences (2 + 2 + 2 + 2 = 8 points)

  4. It’s All About the Stacks (6 points)

  5. Closure Operations and Turing Machines (2 + 2 + 2 + 2 + 2 + 2 = 12 points)

  6. README (2 pts)

Total: 36 points

Submitting

Submit this assignment at Gradescope hw6.

The submission should include only pdf or plain text files.

Be sure to assign each page to the correct problem in Gradescope.

Also, don’t forget to submit a README file containing the required information.

1 A Non-Context-Free Language

Let A be the language \{x^n\diamond y^{3n} \diamond z^{2n}\mid n\geq 0\}, where \Sigma=\{x,y,z,\diamond\}.

Prove that A is not a context-free language.

2 Another Non-Context-Free Language

Let B be the language \{w\mid w = \textrm{FLIP}(w) \textbf{ and } w \textrm{ has equal number }0\textrm{s and }1\textrm{s}\}, where \Sigma = \{0,1\} and \textrm{FLIP} is The FLIP Operation from Homework 4.

Note: This language is different from the CFL in the Homework 5 problem Design a CFG.

Prove that B is not a context-free language.

3 Turing Machine Config Sequences

Using Turing Machine M_2 from the textbook (see Example 3.7 and Figure 3.8), give the sequence of configurations for the following input strings:
  1. 0

  2. 00

  3. 000

  4. 000000

4 It’s All About the Stacks

An NFA has no stack. It recognizes regular languages.

A PDA is an NFA plus one stack. It recognizes context-free languages.

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

5 Closure Operations and Turing Machines

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

  • concatenation

  • Kleene star

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

  • concatenation

  • Kleene 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)!