Active Topics Memberlist Calendar Search Help | |
Register Login |
One Stop GATE Forum : GATE Previous Years Test Papers - Discuss Here : CS Papers |
Topic: THEORY OF COMPUTATION SAMPLE QUESTIONS............ | |
Author | Message |
Priya
Groupie Joined: 04Jan2007 Online Status: Offline Posts: 82 |
Topic: THEORY OF COMPUTATION SAMPLE QUESTIONS............ Posted: 09Feb2007 at 3:24pm |
Q1. Consider the grammar S--->ABABS|AB A--->a|aA B---->b|bB Let Na(w) and Nb(w) denote the number of a's and b's in a string w. Then the language L(G) a subset of (a+b)+ generated by G is A. {w| Na(w)>Nb(w)} B.{w|Nb(w)<Na(w)} C.{w|Na(w)=Nb(W)} D.{w|Nb(w)not related to Na(w)} Q2.Consider the gramamar. S--->aaASb|ab A--->aAb|ab Let Na(w) and Nb(w) denote the number of a's and b's in a string w. Then the language L(G) a subset of (a+b)+ generated by G is A. {w| Na(w)>Nb(w)} B.{w|Nb(w)<Na(w)} C.{w|Na(w)=Nb(W)} D.{w|Nb(w)not related to Na(w)} Q3. The language {a^n b^n c^n|n>1} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. can be generated by a type 2 grammar d. can be generated by a type 1 grammar Q4. The language {a^i b^j c^k|i>j>k} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. can be generated by a type 2 grammar d. can be generated by a type 1 grammar Q5. The language {a^i b^j c^k|k=min(i,j)} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. can be generated by a type 2 grammar d. can be generated by a type 1 grammar Q6. The language {a^i b^j c^k|k=max(i,j)} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. can be generated by a type 2 grammar d. can be generated by a type 1 grammar Q7. The language {a^n^2|n>1} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. can be generated by a type 2 grammar d. can be generated by a type 1 grammar Q8. The language {a^2^n|n>1} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. can be generated by a type 2 grammar d. can be generated by a type 1 grammar Q9. The language {a^n|n>prime} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. can be generated by a type 2 grammar d. can be generated by a type 1 grammar Q10. The language {a^n|n not prime} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. can be generated by a type 2 grammar d. can be generated by a type 1 grammar Q11. The language {ww|w in (0+1)+} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. can be generated by a type 2 grammar d. can be generated by a type 1 grammar Q12. The language {a^n!|n>1} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. can be generated by a type 2 grammar d. can be generated by a type 1 grammar Q13. The language {a^i b^j c^k|i<>j and j<>k and k<>i} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. can be generated by a type 2 grammar d. can be generated by a type 1 grammar Q14. The language {a^i b^j c^k|i=j or j=k or k=i} a. can be generated by a type 3 grammar b. can be generated by an LR(k) grammar c. cannot be generated by a type 2 grammar d. can be generated by a type 1 grammar |
|
For More Sample Papers Visit:
http://onestopgate.com/gate-preparation/ Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
IP Logged | |
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
|
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.