On this page:
HW 0 Second Chance!
1 DFA Formal Description
2 Regular or Not
3 "Real" Computation with DFAs

Homework 1

Last updated: Mon, 12 Sep 2022 16:33:51 -0400

Out: Thu Sep 15, 00:00 EST Due: Sun Sep 25, 23:59 EST

This assignment explores deterministic finite automata (DFAs).

Homework Problems

  1. HW 0 Second Chance! (up to 4 points extra)

  2. DFA Formal Description (5 + 5 = 10 points)

  3. Regular or Not (5 points)

  4. "Real" Computation with DFAs (5 points)

  5. README (1 point)

Total: 25 (out of 21) points

Submitting

Submit your solution to this assignment in Gradescope hw1. Please assign each page to the correct problem and make sure your solutions are legible.

A submission must also include a README containing the required information.

HW 0 Second Chance!

Choose up to 4 questions from HW 0 that you got wrong and explain:
  • what your misunderstanding was, and

  • what the right answer should be.

You will receive 1 bonus pt on this assignment for each HW 0 question where you provide the above information.

1 DFA Formal Description

Imagine you have been given the task of finding news articles that mention UMass Boston.

The following FSM (DFA) represents a program that could help you with this.

It accepts all strings containing the substring \texttt{UMB}.

  1. Come up with a formal description for this DFA.

    Recall that a DFA’s formal description has five components, e.g. M = (Q,\Sigma,\delta,q_{start},F).

    You may assume that the alphabet contains only the symbols from the diagram.

  2. Then for each of the following, say whether the computation represents an accepting computation or not (make sure to review the definition of an accepting computation). If the answer is no, explain why not.:
    1. \hat{\delta}(q1,\texttt{UUMB})

    2. \hat{\delta}(q1,\texttt{UMMB})

    3. \hat{\delta}(q2,\texttt{UMBB})

    4. \hat{\delta}(q3,\varepsilon)

    5. \hat{\delta}(q3,\texttt{UMASSBOSTON})

2 Regular or Not

Prove that the following language is regular:

L_1 = \{w\mid w\textrm{ contains a single }\texttt{B}\textrm{ character}\}

In other words, design a DFA that recognizes the language L_1. Your answer must be a formal description of the machine.

You may assume that strings in the language are drawn from alphabet \{\texttt{A,B,C}\}.

3 "Real" Computation with DFAs

Here is an example showing that DFAs can also perform "real" computation.

Assume that the following is an alphabet of "domino" symbols (one could easily imagine using unicode characters to represent such an alphabet):

Now let L_2 be a language consisting of sequences of these dominos where: L_2 = \{w\mid \textrm{the top row is the same number as the bottom row (each row represents a binary number)}\}

Prove that L_2 is a regular language.