On this page:
1 README
2 The Complement Operation for Regular Languages
3 "ALLPOSSIBLE" DFAs
4 Backwards and Forwards
5 Chomsky Normal Form
6 CFGs with the Empty String

Homework 6

Last updated: Thu, 5 Nov 2020 14:39:01 -0500

Out: Wed Oct 28, 00:00 EST Due: Tues Nov 3, 23:59 EST

This homework covers material from chapter 4 of the textbook.

Homework Problems

  1. README (2 points)

  2. The Complement Operation for Regular Languages (6 points)

  3. "ALLPOSSIBLE" DFAs (6 points)

  4. Backwards and Forwards (6 points)

  5. Chomsky Normal Form (6 points)

  6. CFGs with the Empty String (6 points)

Total: 32 points

Submitting

Submit this assignment at Gradescope hw6.

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 with the required information. Submit it with the homework.

2 The Complement Operation for Regular Languages

The complement of a set is the set of all elements that are not in the set.

(Review chapter 0 if necessary.)

Show that regular languages are closed under the complement operation.

3 "ALLPOSSIBLE" DFAs

Show that the following language is decidable:

ALLPOSSIBLE_{DFA} = \{\left\langle D\right\rangle\mid D \textrm{ is a DFA that accepts all possible strings in } \Sigma^*\}

(Shout out to Homework 0’s "all possible" problem.)

You might find the theorem you proved in the The Complement Operation for Regular Languages useful (as well as other theorems we’ve covered in class so far).

4 Backwards and Forwards

Show that the following language is decidable:

BW\!FW_{DFA} = \{\left\langle D\right\rangle\mid D \textrm{ is a DFA that accepts a string } w \textrm{ only if it accepts } w^\mathcal{R}\}

where w^\mathcal{R} is w reversed.

5 Chomsky Normal Form

Recall that a CFG is in Chomsky Normal Form if all rules have the form:

A \rightarrow BC

A \rightarrow a

where a could be any terminal, and A, B, C could be any variable, except B and C may not be the start variable. In addition the grammar may include rule S\rightarrow \varepsilon, where S is the start variable.

Convert the following CFG to Chomsky Normal Form:

S \rightarrow TST

S \rightarrow T \mid \varepsilon

T \rightarrow \texttt{uu} \mid \varepsilon

The grammar has only one terminal, \texttt{u}.

6 CFGs with the Empty String

Show that the following language is decidable:

HAS{\Large\varepsilon}_{CFG} = \{\left\langle G\right\rangle\mid G \textrm{ is a CFG whose language includes } \varepsilon\}