Documente Academic
Documente Profesional
Documente Cultură
→p* q r
q r p
r r r
L= {(ab)n | n>=0}
(1/2 mark for construction of graph or any other justification, ½ mark for correct result)
3) Differentiate between DFA and NFA (1/2 mark per difference0
4) Use extended transition function to show the result of giving string w = 0011 as input to
the following finite automata
(5 marks for fully correct solution. Partial marks for partially correct solution)
TAFL CIA 1 Solution (2019-20)
(5 marks for fully correct solution. Partial marks for partially correct solution)
8) Minimize the following DFA
a b
→q1(Final) q3 q2
q2 q4 q1
q3 q5 q4
q4 q4 q4
q5 (Final) q3 q2
a b
→[q1q5] (Final) q3 q2
q2 q4 [q1q5]
q3 [q1q5] q4
q4 q4 q4
(5 marks for fully correct solution. Partial marks for partially correct solution)
9) Design a DFA for accepting binary numbers whose decimal equivalent is divisible by 5
TAFL CIA 1 Solution (2019-20)
(5 marks for fully correct solution. Partial marks for partially correct solution)
10 a) Give a DFA for the following language over the alphabet Σ = {0, 1}:
L={ w | w starts with 1 and has odd length, or starts with 0 and has even length }
E.g., strings 1101011, 000101 are in L, while 1011 and 00001 are not in L.
(5 marks for fully correct solution. Partial marks for partially correct solution)
10 b) Convert the following NFA into a DFA
0 1
→q0 q0, q1 q0, q3
q1 q2 -
q2 (Final) - -
q3 - q4
q4 (Final) - -
(5 marks for fully correct solution. Partial marks for partially correct solution)
11 a) Design ε −NFA for the language of strings consisting of either 01 repeated one or more times,
or 010 repeated one or more times over alphabets Σ = {0, 1}.
TAFL CIA 1 Solution (2019-20)
(5 marks for fully correct solution. Partial marks for partially correct solution)
(b)