Sie sind auf Seite 1von 2

MANIPAL UNIVERSITY JAIPUR

DEPARTMENT OF CSE
ASSIGNMENT NO -2
FORMAL LANGUAGE & AUTOMATA THEORY

1. Design a DFA for = {a, b} that can accept all strings with no more than three
as.
2. Find DFA for the following languages on = {a, b}:
a. L = {w : |w| mod 3 = 0
b. L = {w : na(w) mod 3 > nb(w) mod 3}
3. Consider the set of strings on {0,1}. Design a DFA to accept all strings where
every 00 is followed immediately by a 1.
4. Draw a DFA for L = {0n1m | m 1 , n 0 ; (n+m) is divisible by 3}.
5. You have decided to protect your property with a sophisticated alarm system.
In order to enter, someone has to punch in a secret 4-digit number. For
simplicity we will assume that the only allowed digits are {1, 2, 3, 4} and that
the secret number is 4321. Your goal for this problem is to design a DFA that
works in the same way as the alarm system (where accepting an input is
equivalent to opening the door).
Specifically:
The input, in the alphabet {1, 2, 3, 4}, tells you the digits that were pressed
in the order that this happened.
Obviously, your DFA must accept the string 4321, even if more buttons are
pressed afterwards.
If a wrong digit is entered, the alarm system should restart, i.e. go back to
expecting 4321.
If the system restarts three times, the door should lock permanently.

Satyabrata Roy

6. Construct a minimum state automaton equivalent to a given automaton M


whose transition table is defined below:
State
q0
q1
q2
q3
q4
q5
*q6

a
q0
q2
q3
q0
q0
q1
q1

b
q3
q5
q4
q5
q6
q4
q3

7. Convert the following NDFA into a DFA.


8.

Q/

Satyabrata Roy

*q1

q1

q2

*q2

q3

q3

q3

q3

Das könnte Ihnen auch gefallen