Tutorial 02
Tutorial 02
1) Design a DFA that accepts sets of all strings over alphabet {0,1} of length 2.
2) Construct a DFA that accepts all strings over {a,b} that contains the string 𝑎𝑎𝑏𝑏 in it.
3) Construct a DFA that accepts any string over {a,b} that does not contain the string 𝑎𝑎𝑏𝑏
in it.
4) Construct a NFA that accepts any string that end with 0
5) Construct a NFA that accepts sets of all the strings over {0,1} of length 2
6) Construct a NFA that accepts all the strings that ends with 1
7) Construct a NFA that accepts all the strings that contain 0
8) Construct a NFA that accepts all the strings that starts with ‘10’
9) Construct a NFA that accepts all the strings that contain ‘01’
10) Construct a NFA that accepts all the strings that ends with ‘11’
11) Construct the state diagram for the finite-state machine with the following state tables.
12) Construct a Moore machine for the following state table
Present State Next State Output
Input =0 Input =1
A B C 𝑋2
B B D 𝑋1
C C D 𝑋2
D D D 𝑋3
13) Design a Mealy machine accepting the language of stings over Σ = {0,1} and the strings
that end with aa or bb.
1
14) Construct the state table for the following state diagrams.
a). b).
c).
15) The state table shown in the following table describes a finite-state machine with S =
{s0, s1, s2, s3}, I = {0, 1}, and O = {0, 1}. The values of the transition function f are
displayed in the first two columns, and the values of the output function g are
displayed in the last two columns. Construct the state diagram.
State f g
Input output
0 1 0 1
S0 S1 S0 1 0
S1 S3 S0 1 1
2
S2 S1 S2 0 1
S3 S2 S1 0 0
16) Construct the state diagram for the finite-state automaton M = (S, I, f, s0, F), where S
= {s0, s1, s2, s3}, I = {0, 1}, F = {s0, s3}, and the transition function f is given in the
following table.
State f
Input
0 1
S0 S0 S1
S1 S0 S2
S2 S0 S0
S3 S2 S1
3
18) Construct the state table for the finite-state machine with the state diagram shown in
the following figure.