Atcd Questions
Atcd Questions
Set-2:
1. Define formal language. Discuss operations on formal languages.
2. Explain the following terms with example. [7M]
i. Initial State
ii. Final State
iii. Dead state
iv. Unreachable State.
3. Give the transition table representation for the given transition diagram.
4. Differentiate between DFA and NFA.
5. The operation DM(L) is defined as follows.
(i) Throw away every even-length string from L.
(ii) For each odd length string, remove the middle character.
Find all the strings of length 3 or less in DM(L) if L is a language over {a,b}.
Set-3
1. Explain the various Language recognizers
2. Let ∑1 and ∑2 are the alphabets of symbols of binary and decimal number systems
respectively. Also let L1 and L2 are the languages over ∑1 and ∑2 respectively. Then find
all strings of length 3 or less in the language L1∩L2. [3M]
3. Explain various types of states that a finite automaton can have with an example.
4. Design a DFA for L= {0m1n| m, n>=0}
5. From the given transition table check whether the following strings are accepted or not.
(i) 101101 (ii) 000000
Set-4
1. What is a finite automaton? Explain about the model of Finite Automaton.
2. Take any two strings and explain their acceptance in the given NFA using extended
transition function. [3M]
3. List the various applications of Finite automaton.
5. Design a DFA which accepts all the strings with even number of 0`s and odd number of
1`s over an alphabet {0,1}.
Assignments Given With Dates
Set-2
1. Explain the procedure for converting NFA without Epsilon to DFA.
2.
3.
Set-3
1. Explain the procedure for converting NFA with epsilon to NFA without Epsilon with
example.
2. Obtain the epsilon closure for the states 1, 2, 3, 4, 7 and 8 for the given epsilon NFA.
3. It is given that the complement of a regular language L over an alphabet Σ is defined as
Σ* - L. Find all the strings of length 3 or less that belongs to the complement of the
language of the following DFA.
Set-4
1. What is regular expression? Explain in detail about regular expressions with
examples
2. Find all the equivalent states for the following DFA.
Set-2
1. With an example Context Free Grammar, explain about sentential forms and derivation
trees .
2.
3.
Consider the following CFG. Construct all possible parse trees for the string aabbab.
S → aB | bA
A → a | aS | bAA
B → b | bS | aBB
4. Illustrate recursive descent parser with an example.
5. A. Define FIRST of a grammar Symbol. Write the steps/algorithm to compute FIRST.
b. Define FOLLOW of a non-terminal. Write the steps/algorithm to compute FOLLOW.
Set-3
1. Explain about ambiguity in context free grammars with an example
2.
Set-4
1. What are the various applications of context free languages? Explain in detail.
2.
3.
Using the grammar and parsing table given below, show the sequence of configurations
taken by the LL(1) parser for the input string abacbab.
S → aSb | bSa | c
a b c $
S S→aSb S → bSa S → c
4. Describe about the various components/data structures in the model of table driven
predictive parser.
5. Describe about role of parser with a neat sketch
Assignments Given With Dates
2.
Differentiate between synthesized and inherited attributes with example
3.
Set-2
1.
2. Using the following grammar show the handles of each right sentential form in the
bottom up parsing of the string (a,(a,a)).
S → (L) | a
L → L,S | S
3. Write a yacc program for desk calculator.
Set-3
1. Describe in detail about the structure about Yacc program.
2. Identify the attributes and their types in the following SDD.
3.
Set-4
1.
2.
Identify the attributes and their types in the following SDD.
3. Construct three address code for the following code segment in C language.
for(j=i*2 ; j<30 ; j++)
{
d = n%10;
rev = rev+d;
}
Assignments Given With Dates
Set-2
1. Explain in detail about different machine dependent code optimization
2. Construct a DAG for the given basic block
a: =b+c
b: =b-d
c: =c+d
e: =b+c
3. Identify the leaders in the three address code equivalent of following fragment.
Set-3
1. Explain various issues in the design of a code generator
2. Explain the procedure to determine if a variable is live or not
3. Construct the flow graph for the following three address code in which the three address
statements numbered (1), (2), (3), (10), (12), (13) are leaders.
1) i = 1
2) j = 1
3) t1 = 10 * i
4) t2 = t1 + j
5) t3 = 8 * t2
6) t4 = t3 - 88
7) a[t4] = 0.0
8) j = j + 1
9) if j <= 10 goto (3)
10) i = i + 1
11) if i <= 10 goto (2)
12) i = 1
13) t5 = i - 1
14) t6 = 88 * t5
15) a[t6] = 1.0
16) i = i + 1
17) if i <= 10 goto (13)
Set-4
1. Explain different code optimization issues
2. Generate gen and kill sets for the basic blocks in the following flow graph.
3. Describe the different machine independent code optimization techniques in detail.
Section: B
Assignment 1, 2 and 3
Set-1:67 to 83
Set-2:84 to A1
Set-3: A2 to B8
Se-4:B9 to C9 and all the laterals
Assignment 5 and 6
Set-3: 84 to A1
Set-4: 67 to 83
Section –C
Assignment 1, 2 and 3
Set-1: D0 to E7
Set-2: E8 to G5
Set-3: G6 to I2
Set-4: I3 to J3 and All the laterals L-13 to L-18
Assignment 4 and 5
Set-1: I3 to J3 and All the laterals L-13 to L-18
Set-2: G6 to I2
Set-3: E8 to G5
Set-4: D0 to E7