0% found this document useful (0 votes)
50 views2 pages

TC Tut-1

Uploaded by

veeraprathapck01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views2 pages

TC Tut-1

Uploaded by

veeraprathapck01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

||JAI SRI GURUDEV||

SJC Institute of Technology, Chickballapur.


Department of Information Science & Engineering
Tutorial: I
Semester: V
Subject Name & Code: Theory of Computation [BCS503] Date: 14/10/2024
---------------------------------------------------------------------------------------------------------------------
1) a. Define a DFA and language accepted by it.
b. Define (i)Alphabet (ii) Power of an alphabet (iii) String (iv) Language v) Length of string
iv) Concatenation of strings v) string reversal
2) Write the DFSM for the following languages and List a string belonging to the L and a string
not belonging to L.
i) The set of all strings ending with abb and show the sequence of moves made by the
DFA for the strings ababb and aab.
ii) The set of all strings not containing substring abb.
iii) The set of all strings with number of a’s is multiple of 3 and number of b’s is multiples of 5.
iv) Set of all strings such that number of 1’s is even and number of 0’s is a multiple of 3 on
∑={0,1}.
v) Design a DFSM for the L={w: |w| mod 5 ≥ |w| mod 3} on ={0,1}.
vi) L= {wϵ{0,1}* : w has 001 as a substring}
vii) To accept string of 0’s,1’s and 2’s beginning with a ‘0’ followed by odd number of 1’s
and ending with a ‘2’ over ∑={0,1,2}.
viii) To accept the string of a’s and b’s ending with ab or ba.
ix) Set of all strings with exactly three consecutive a’s
x) Obtain a DFA to accept the language L={ w:|w|mod5≠0} on ∑={a}
xi) Set of all strings ending with ab and ba
3) Design a DFSM which accepts set of all strings of 0’s and 1’s begins with 1 that when
interpreted as binary integer is multiple of 5.ex: 101, 1010,1111 are in the language and 0,0101
are not.
4) Construct a DFSM to accept decimal strings divisible by 3
5) Build a Nondeterministic FSM for each of the following languages. List a string belonging to
the L and a string not belonging to L.
i. L={w|w ϵ ababn or aban where n≥0}
ii. To accept the string of a’s and b’s ending with ab or ba.
iii. L={wϵ {a,b}* : w=aba or |w| is even}
6) Obtain a DFA to accept strings of a’s and b’s having
A. Even number of a’s and Even number of b’s
B. Even number of a’s and Odd number of b’s
C. Odd number of a’s and Even number of b’s
D. Odd number of a’s and Odd number of b’s
7) Define ε-NFA and ε − 𝐶𝐿𝑂𝑆𝑈𝑅𝐸 .Obtain an NFA for the following regular expressions.
i)a* +b* +c* ii)(a+b)* aab (a+b)* iii) (0+1)*1(0+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

11) Consider the following ε-NFA

δ ε 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}.

Signature of Faculty Signature of HOD/Reviewer

You might also like