You are on page 1of 6

Comp 335: Introduction to Theoretical Computer Science

Assignment 1
Arad Hajari (40242069)
2023 February 5th
1. Let L1, L2 and L3 be languages over some alphabet Σ. In each part below, state the
relationship between the given two languages. Are they equal, is one a subset of the other, do
they have an empty or non-empty intersection? Give reasons (proof!) for your answers, and
counterexamples where needed.
2. Construct a DFA for each of the following languages
3. 3. Let L = {w ∈ {0, 1} ∗ ∶ w contains at least one 1}, and let A be the DFA with tabular
representation: A 0 1 → p p q ⋆ q q q Prove that L = L(A). Hint: Do the L(A) ⊆ L part of the proof
by induction on the the length of the string processed by A. You need a mutual induction with a
claim for state p and a claim for state q. Then use the contrapositive L(A) ⊆ L to show that L ⊆
L(A).
4. Construct an NFA for each of the following languages. (a) The set of strings over {0, 1, . . . ,
9}, such that the final digit has not appeared before. (b) The set of strings over {0, 1}, such that
there are two 0’s separated by a number of positions that is a multiple of 4. Note that 0 is an
allowable multiple of 4.
5. Let L1 = {11, 110} ∗ and L2 = {0} (a) Give an NFA that accepts L1L2. (b) Construct a DFA
equivalent to your NFA of (a)

You might also like