Preview

Automata, DFA

Satisfactory Essays
Open Document
Open Document
406 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Automata, DFA
Practice Sheet 1
1. The language L = {w|w has exactly two 0’s and at least two 1’s } is the intersection of two simpler languages. Construct DFA’s for the simpler languages and then combine them using the idea of a product automaton to obtain a DFA that accepts L.
Minimize this DFA, using the minimization algorithm, using the algorithm explained in the class.
Soln: Similar to Problem 2.
2. The language L = {w|w has even length and an odd number of 0’s } is the intersection of two simpler languages. Construct DFA’s for the simpler languages and then combine them using the idea of a product automaton to obtain a DFA that accepts L.
Minimize this DFA, using the minimization algorithm, using the algorithm explained in the class.
Soln: Combine the two DFAs in Fig. 1 by constructing a product automaton.
0
q0

q1

1

0
1
0, 1 q0 q1
0, 1

Figure 1: Figure for Solution of Problem 2 in Practice Sheet 1
3. Draw the transition diagram of a DFA that accepts the following languages: (a) The empty set (b) all strings over {0, 1} except the empty string (c) {w|w begins with a
0 and ends with a 1 }
Soln: See Fig. 2 attached.
4. For each of the following languages, give two strings that are in the language and two that are not (assume Σ = {a, b}): (a) a(ba)∗ b (b) (a + ba + bb)Σ∗
Soln: (a) The strings

and a, for example. (b) The strings

and b, for example.

5. Construct an NFA that accepts the language described by the r.e. (01 + 001 + 010)∗
Son: See Fig. 3
1

0, 1

q0

0, 1

q0

0, 1

q1

0
1
q0

0

q1

q2

1

0

1 q3 0, 1

Figure 2: Figure for Solution of Problem 3 in Practice Sheet 1
0
q2

1

1

0

q0

q1

0
1

0 q3 Figure 3: Figure for Solution of Problem 5 in Practice Sheet 1
6. Let L be the language {w|w contains an equal number of occurrences of the substrings
01 and 10 }. Thus 101 is in L, while 1010 is not. Show that L is regular.
Soln: The language corresponding to the

You May Also Find These Documents Helpful

Related Topics