forum_image

Discussion Forum

Interative Forum for discussing any query literally to UGC-NET Computer Science, GATE Computer Science and Computer Sciene and Technology in general.

ugc_net image

UGC-NET Computer Science

Correspondence Courses and Test Series to prepare for UGC-NET computer science and applications

GATE image

GATE

MCQs, Lecture Notes, Ebooks for GATE preparation

freestuff image
jobs image

Jobs Newsfeed

Timely information of various Recruitments.

NextPrev

MCQs TOC|UGC-NET|GATE|Computer Science

112.Given the production rules of agrammar G1 as S1 ? AB | aaB A ? a | Aa B ? b and the production rules of a grammar G2 as S2 ? aS2bS2 | bS2aS2 | ? Which of the following is correct statement ?
A.G1 is ambiguous and G2 is not ambiguous.
B.G1 is ambiguous and G2 is ambiguous.
C.G1 is not ambiguous and G2 is ambiguous.
D.G1 is not ambiguous and G2 is not ambiguous.
View/Hide Ans
Explanation
113.Given a grammar : S1 ? Sc, S ?SA | A, A ? aSb | ab, there is a rightmost derivation S1 ? Sc ?SAC ? SaSbc Thus, SaSbc is a right sentential form, and its handle is
A.SaS
B.bc
C.Sbc
D.aSb
View/Hide Ans
Explanation
114.Given L1=L(a*baa*) and L2=L(ab*). The regular expression corresponding to language L3 = L1/L2 (right quotient) is given by
A.a*b
B.a*baa*
C.a*ba*
D.None of the above
View/Hide Ans
Explanation
115.Given the following expressions of a grammar E -> E * F / F + E / F F -> F F / id Which of the following is true ?
A.* has higher precedence than +
B. has higher precedence than *
C.+ and have same precedence
D.+ has higher precedence than *
View/Hide Ans
Explanation
116.Which of the following is true while converting CFG to LL(I)grammar?
A.Remove left recursion alone
B.Factoring grammar alone
C.Both of the above
D.None of the above
View/Hide Ans
Explanation
117.Let L be a set accepted by a nondeterministic finite automaton. The number of states in non-deterministic finite automaton is |Q|. The maximum number of states in equivalent finite automaton that accepts L is
A.|Q|
B.2|Q|
C.2 raise to power |Q| 1
D.2 raise to power |Q|
View/Hide Ans
Explanation
118.Which is not the correct statement ?
A.The class of regular sets is closed under homomorphisms.
B.The class of regular sets is not closed under inverse homomorphisms.
C.The class of regular sets is closed under quotient.
D.The class of regular sets is closed under substitution.
View/Hide Ans
Explanation
119.The grammar G1 S -> OSO| ISI | 0|1|? and the grammar G2 is S -> as |asb| X, X -> Xa | a. Which is the correct statement ?
A.G1 is ambiguous, G2 is unambiguous
B.G1 is unambiguous, G2 is ambiguous
C.Both G1 and G2 are ambiguous
D.Both G1 and G2 are unambiguous
View/Hide Ans
Explanation
120.The statements s1 and s2 are given as : s1 : Context sensitive languages are closed under intersection, concatenation, substitution and inverse homomorphism. s2 : Context free languages are closed under complementation, substitution and homomorphism. Which of the following is correct statement ?
A.Both s1 and s2 are correct.
B.s1 is correct and s2 is not correct.
C.s1 is not correct and s2 is correct.
D.Both s1 and s2 are not correct.
View/Hide Ans
Explanation
121.Which of the following regular expression identities are true ?
A.(r + s)* = r* s*
B.(r + s)* = r* + s*
C.(r + s)* = (r*s*)*
D.r* s* = r* + s*
View/Hide Ans
Explanation


Author Does Not claim of any answer these answers are as per expert opinion


Pages: 1 2 3 4