Active TopicsActive Topics  Display List of Forum MembersMemberlist  CalendarCalendar  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
 One Stop GATE ForumGATE Previous Years Test Papers - Discuss HereCS Papers
Message Icon Topic: THEORY OF COMPUTATION SAMPLE QUESTIONS............ Post Reply Post New Topic
Author Message
Priya
Groupie
Groupie


Joined: 04Jan2007
Online Status: Offline
Posts: 82
Quote Priya Replybullet 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 IP Logged
Post Reply Post New Topic
Printable version Printable version

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

GET LATEST FRESHERS JOBS IN YOUR MAIL





This page was generated in 0.750 seconds.
Vyom is an ISO 9001:2000 Certified Organization

© Vyom Technosoft Pvt. Ltd. All Rights Reserved.

Job Interview Questions | Girls Magazine | DLL, OCX File Errors | Freshers Jobs | Placement Papers | More Papers