Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Theory of Computation

Rating
-
Sold
-
Pages
5
Uploaded on
03-04-2023
Written in
2022/2023

Topics include regular and context-free languages, decidable and undecidable problems, reducibility, recursive function theory, time and space measures on computation, completeness, hierarchy theorems, inherently complex problems, oracles, probabilistic computation, and interactive proof systems.

Show more Read less
Institution
Course

Content preview

“Sentential Forms”.

1. State true or false:
Statement: Every right-linear grammar generates a regular language.
a) True
b) False
View Answer

Answer: a


Explanation: A CFG is said to right linear if each production body has at most one
variable, and that variable is at the right end. That is, all productions of a right linear
grammar are of the form A->wB or A->w, where A and B are variables while w is some
terminal.


2. What the does the given CFG defines?
S->aSbS|bSaS|e and w denotes terminal
a) wwr
b) wSw
c) Equal number of a’s and b’s
d) None of the mentioned
View Answer

Answer: c


Explanation: Using the derivation approach, we can conclude that the given grammar
produces a language with a set of string which have equal number of a’s and b’s.


3. If L1 and L2 are context free languages, which of the following is context free?
a) L1*
b) L2UL1
c) L1.L2
d) All of the mentioned
View Answer

Answer: d

, Explanation: The following is a theorem which states the closure property of context free
languages which includes Kleene operation, Union operation and Dot operation.


Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!


advertisement
4. For the given Regular expression, the minimum number of variables including starting
variable required to derive its grammar is:
(011+1)*(01)*
a) 4
b) 3
c) 5
d) 6
View Answer

Answer: c


Explanation: The grammar can be written as:


S->BC


B->AB|ε


A->011|1


C->DC|ε


D->01


5. For the given Regular expression, the minimum number of terminals required to derive its
grammar is:
(011+1)*(01)*
a) 4
b) 3
c) 5
d) 6
View Answer

Written for

Course

Document information

Uploaded on
April 3, 2023
Number of pages
5
Written in
2022/2023
Type
Class notes
Professor(s)
Mrs.prachi
Contains
B.e 1st year to final year

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
prachiyadav

Get to know the seller

Seller avatar
prachiyadav Sipna College OEngineering And Technology
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
35
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions