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

“The Language of a Grammar, Inferences and Ambiguity”.

1. Which of the following is not a notion of Context free grammars?
a) Recursive Inference
b) Derivations
c) Sentential forms
d) All of the mentioned
Answer: d

Explanation: The following are the notions to express Context free grammars:


a) Recursive Inferences


b) Derivations


c) Sentential form


d) Parse trees


2. State true or false:
Statement: The recursive inference procedure determines that string w is in the language of
the variable A, A being the starting variable.
a) true
b) false
Answer: a

Explanation: We apply the productions of CFG to infer that certain strings are in the
language of a certain variable.


3. Which of the following is/are the suitable approaches for inferencing?
a) Recursive Inference
b) Derivations
c) Recursive Inference and Derivations
d) None of the mentioned
Answer: c

, Explanation: Two inference approaches:


1. Recursive inference, using productions from body to head


2. Derivations, using productions from head to body


4. If w belongs to L(G), for some CFG, then w has a parse tree, which defines the syntactic
structure of w. w could be:
a) program
b) SQL-query
c) XML document
d) All of the mentioned
Answer: d

Explanation: Parse trees are an alternative representation to derivations and recursive
inferences. There can be several parse trees for the same string.


5. Is the following statement correct?
Statement: Recursive inference and derivation are equivalent.
a) Yes
b) No
Answer: a

Explanation: Yes, they are equivalent. Both the terminologies represent the two
approaches of recursive inferencing.6. A->aA| a| b
The number of steps to form aab:
a) 2
b) 3
c) 4
d) 5
Answer: b


Explanation: A->aA=>aaA=>aab


7. An expression is mentioned as follows. Figure out number of incorrect notations or
symbols, such that a change in those could make the expression correct.
L(G)={w in T*|S→*w}
a) 0 Errors
b) 1 Error

Written for

Course

Document information

Uploaded on
April 3, 2023
Number of pages
5
Written in
2022/2023
Type
Class notes
Professor(s)
Unknown
Contains
All classes

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