Professional Documents
Culture Documents
21CS51 Ia 1
21CS51 Ia 1
Q. Mar C RB
SECTION A ks
PO
No. O T
Define and explain the following terms.
1a. i) Alphabets ii) Strings iii) DFA 4 1 2 1
iv) Language
1b. Design DFA for the following languages over ∑ = {0,1}
i) The set of all strings ending with 011
ii) The set of strings where the number of 0’s is divisible
by 3, and the number of 1’s is divisible by 2.
8 1 3 1,2,3
iii) L={wε{a,b}*: w contains strings end with ab or
ba}
iv) The set of all strings begins or ends with the substring
01
OR
2a. Define and discuss the Language processor 4 1 2 1
2b. Design DFA for the following languages over ∑
i) Draw DFA to accept decimal string divisible by 3 8 1 3 1,2,3
ii) Draw DFA to accept binary string divisible by 5
SECTION B
3a. Convert the NFA to the DFA given in Table 3a. 6 1 3 1,2,3
3b. Explain various phases of the compiler. Show the
translation for an assignment statement. 6 1 3 1,2,3
position=initial+rate*60
OR
4a. Convert the NFA to the DFA given in Table 4a 6 1 3 1,2,3
4b. Convert the -NFA to DFA given in Table 4b. 6 1 3 1,2,3
SECTION C
5a. Minimize the given DFA in Table 5a. 8 1 3 1,2,3
5b. Write the regular expressions for the following languages.
a)L = {anbm : m>=1,n>=1,mn>=3}
b)Representing string of a’s and b’s whose 10th
symbol from the right end is a
8 2 3 1,2,3
c) Strings of a’s and b’s having odd length
d)L={anbm |m+n is even}
OR
6a. Minimize the given DFA in Table 6a. 8 1 3 1,2,3
6b. Construct -NFA for following regular expression 8 2 3 1,2,3
i) (a+b)* (ab+ba)
S. S. Education Trust’s CET Code: E-175 (UG)/T-942 (PG)
0 1 0 1
a b c
p {p,q {p} q0 { q0, q1} { q1}
p {p {q} {r}
} * q1 { q2} { q2}
}
q {r} a{r} b q2 0 1 {q2}
q {p} {q0 {r}1
r p {s} {q} {p,r}
{r} A }B A A B TableF 4a
q* s {s} {p}{s} *r B
{q} {r}A C {p} B G C
Table 3a C TableD 3b B *C A C
r {p,q} {r} {p}
*s {p} {p} {p} *D D A D C G
Table 4b E D F E H F
F G E F C G
G F G G G E
H G D H G C
Table 5a Table 6a
COURSE OUTCOMES (COs):
C – Course, 3 – Year, 1 – odd, 4 – serial of the subject in the semester, .1 – CO number
Acquire a fundamental understanding of the core concepts in automata theory and Theory
C311.1 of Computation.
C311.2 Design and develop lexical analyzers, parsers and code generators
Design Grammars and Automata (recognizers) for different language classes and become
C311.3 knowledgeable about restricted models of Computation (Regular, Context Free) and their
relative powers.
Acquire a fundamental understanding of the structure of a Compiler and Apply concepts of
C311.4 automata theory and Theory of Computation to design Compilers.
Design computations models for problems in Automata theory and adaptation of such
C311.5 models in compilers.