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

ISE ATCD Assignment-1

This document contains an assignment on automata theory and compiler design. It consists of 10 questions related to designing DFAs and NFAs for various languages, converting NFAs to equivalent DFAs, writing regular expressions, finding epsilon closures and strings accepted by epsilon-NFAs. The questions cover concepts like DFA and NFA transitions, regular expressions, epsilon closures and conversions between NFAs and DFAs.

Uploaded by

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

ISE ATCD Assignment-1

This document contains an assignment on automata theory and compiler design. It consists of 10 questions related to designing DFAs and NFAs for various languages, converting NFAs to equivalent DFAs, writing regular expressions, finding epsilon closures and strings accepted by epsilon-NFAs. The questions cover concepts like DFA and NFA transitions, regular expressions, epsilon closures and conversions between NFAs and DFAs.

Uploaded by

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

DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING

ASSIGNMENT - 1
Subject title: Automata Theory and Compiler Design
SUB CODE: 21CS51 SEM: V Marks:10 Last Date of Submission:16-01-2024

Q1 Design DFAs accepting the following languages over the alphabet set CO 1,
{0,1}. CO 2
The set of all strings beginning with a 1 that, when interpreted as a binary BL 3
integer, is a multiple of 5.
Q2 Construct DFA for the following transition table
̀δ 0 1 CO 1,
→A B A CO 2
B C A BL 3
*C C C
Q3 Convert given NFA into an equivalent DFA
̀ δN 0 1 CO 1,
→p {p, r} {q} CO 2
q {r, s} {p} BL 3
*r {p,s} {r}
*s {q, r} ø
Q4 Convert given NFA into an equivalent DFA
̀ δN 0 1 CO 1,
→p {p, q} {p} CO 2
q {r, s} {t} BL 3
r {p,r} {t}
*s ø ø
*t ø ø
Q5 Design NFA to accept the following language over {0, 1}*. CO 1,
a) The set of all strings such that containing either 101 or 110 as CO 2
substring. BL 3
b) The set of all strings such that every 1 is followed immediately by
00.
c) The set of all strings containing exactly two occurrences of 10.
Q6 Design NFAs to recognise the following set of strings. CO 1,
a) lab, cab, dab, assume the alphabet is {a,b,c,d,l}. CO 2
b) 1101,101,111, assume the alphabet is {0,1}. BL 3
Q7 Consider the following ε-NFA:
̀ δE ε a b CO 1,
→p {r} {q} {p, r} CO 2
q ø {p} ø BL 3
*r {p, q} {r} {p}
a) Compute ε-closure of each state.
b) Give the set of all strings of length 3 or less accepted by the automaton.
c) Convert the automaton to a DFA.
Q8 Consider the following ε-NFA:
̀ δE ε a b c CO 1,
→p {q, r} ø {q} {r} CO 2
q ø {p} {r} {p,q} BL 3
*r ø ø ø ø
a) Compute ε-closure of each state.
b) Give the set of all strings of length 3 or less accepted by the automaton.
C) Convert the automaton to a DFA.
Q9 Write Regular expressions for the following languages.
a) The set of all strings of 0’s and 1’s not containing 101 as a substring. CO 2,
b) The set of all strings with an equal number of 0’s and 1’s, such that no CO 3
prefix has two more 0’s than 1’s, nor two more 1’s than 0’s. BL 2
c) The set of all strings of 0’s and 1’s whose number of 0’s is divisible by
five and whose number of 1’s is even.
Q10 Give English description of the languages of the following regular expressions. CO 2,
a) (1+ε)(00*)*0* CO 3
b) (0*1*)*000(0+1)*. C) (0+10)*1* BL 2

You might also like