UGC NET Computer Science Compiler Design Previous Year Questions (PYQs)

UGC NET Computer Science Compiler Design Previous Year Questions (PYQs)

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations
logo

Arrange the following parsers in increasing order of their power (least → most):
  1. LR(0)
  2. LR(1)
  3. LALR(1)
  4. LL(0)
  5. SLR
Choose the correct answer:

1
2
3
4

logo

Consider the following DFA that generates set of strings over Σ = {a, b, c}.
Identify the best description of the language for the DFA.

1
2
3
4

logo

Match List I with List II

List I (Grammar Type) List II (Production Form)
A. Type 3 Grammar IV. $V \rightarrow V\Sigma \mid \Sigma$
B. Type 2 Grammar I. $V \rightarrow (V \cup \Sigma)^{*}$
C. Type 1 Grammar II. $\lambda A \beta \rightarrow \lambda\,\gamma\,\beta,\;(\lambda,\beta)\in (V\cup\Sigma)^{*}$
D. Type 0 Grammar III. $(V\cup\Sigma)^{*} \rightarrow (V\cup\Sigma)^{*}$

1
2
3
4

logo

Consider the following DFA

Which of the following NFA is valid for the given DFA?

(a) 

(b) 

(c) 


1
2
3
4

logo

Which of the following Grammars is/are only Context-Free?
LabelProductions Note
A S → Ab
aS → aA
A → a
LHS “aS” has a terminal → not CFG
B S → Ab
A → Sa
A → a
All rules are left-linear (V→Vt or V→t) → regular
C S → AS
S → aA
A → a
CFG, not regular (non-linear: V→VV)
D S → Ab
S → aA
A → a
CFG; mixes left/right-linear → not regular
E S → Sb
A → Aa
A → ε
From start S no terminal string → L(S)=∅ (regular)

1
2
3
4

UGC NET Computer Science


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

UGC NET Computer Science


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...