TC Tut-1
TC Tut-1
8) Obtain the DFA for the following NFA using subset Evaluation method
a)
δ 0 1
→p {p,q} {p}
{r}
Q ∅
*r {p,r} {q}
c) Design NFA’s to recognize the following set of strings:
i) lab, cab and dab. Assume the alphabet is{a,b,c,d,l}
ii) 1101,101 and 111.Assume the alphabet is { 0,1}
Convert each of your NFA’s from i) and ii) to DFA’s.
9) a)Design a DFSM which accepts odd number of 0’s and even number of 1’s.
b)Design a DFSM for the L={w: |w| mod 5 ≥ |w| mod 3} on ={0,1}.
c)Construct a DFSM to accept decimal strings divisible by 3.
10) Convert the following ε-NFA to DFA
δ ε 0 1
→p {r} {q} {p,r}
q ∅ {p} ∅
*r {p,q} {r} {p}
i) Compute -Closure for each state.
ii)Convert automaton to DFA.
iii) Give the set of all strings of length 3 or less accepted by the automaton.
12) Convert the following NFA to its equivalent DFA
13) Define Regular expression and write the regular expression for the following:
( i)L={a2n b2m+1 | m≥0, n≥0 } (ii)L={ an bm | m+n is even } (iii)L={ an bm | m≤3, n≥4 }
iv) L={anbm | m≥1, n≥1, nm≥3}
14) a) Obtain a regular expression representing string of a’s and b’s having even length of a’s
followed by odd length of b’s.
b) Obtain a regular expression representing string of a’s and b’s whose length is either even
or multiples of 3 or both.
c) Obtain a regular expression to accept the words with two (or) more letters but beginning and
ending with the same letter over the input {a,b}.