• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 14 pages
Exam (elaborations)

verified computer science q$a 2025

Document preview thumbnail
Preview 2 out of 14 pages

1. Let P be a regular language and Q be context-free language such that Q ∈ P. (For example, let P be the language represented by the regular expression p*q* and Q be {pnqn n∈ N}). Then which of the following is ALWAYS regular? A. P ∩ Q B. P – Q C. ∑* – P D. ∑* – Q Answer: C. ∑* – P 2. Given a Non-deterministic Finite Automation (NFA) with states p and r as initial and final states respectively and transition table as given below: A B P – Q q R S r R S s R S The minimum number of states required in Deterministic Finite Automation (DFA) equivalent to NFA is A. 5 B. 4 C. 3 D. 2 Answer: C. 3 3. Which one of the following statement is true for a regular language L over {a} whose minimal finite state automation has two states? A. L must be either {an I n is odd} or {an I n is even} B. L must be {an I n is odd} C. L must be {an I n is even} D. L must be {an I n = 0} Answer: A. L must be either {an I n is odd} or {an I n is even} 4. The …………. is said to be ambiguous if there exist at least one word of its language that can be generated by the different production tree . A. CFL

Content preview

1. Let P be a regular language and Q be context-free language such that Q ∈ P.
(For example, let P be the language represented by the regular expression p*q*
and Q be {pnqn
n∈ N}). Then which of the following is ALWAYS regular?
A. P ∩ Q

B. P – Q

C. ∑* – P

D. ∑* – Q

Answer:
C. ∑* – P

2. Given a Non-deterministic Finite Automation (NFA) with states p and r as
initial and final states respectively and transition table as given below:
AB
P–Q
qRS
rRS
sRS
The minimum number of states required in Deterministic Finite Automation
(DFA) equivalent to NFA is
A. 5
B. 4

C. 3

D. 2

Answer:
C. 3

3. Which one of the following statement is true for a regular language L over {a}
whose minimal finite state automation has two states?
A. L must be either {an I n is odd} or {an I n is even}
B. L must be {an I n is odd}

C. L must be {an I n is even}

D. L must be {an I n = 0}

Answer:
A. L must be either {an I n is odd} or {an I n is even}

, 4. The …………. is said to be ambiguous if there exist at least one word of its
language that can be generated by the different production tree .
A. CFL
B. CFG

C. GTG

D. None of the given

Answer:
B. CFG

Unit 2
5. Type-1 Grammar is known as_____________
A. CFG
B. CSG

C. REGULAR

D. All

Answer:
B. CSG

6. If G is “S → a S/a”, then L(G) = ?
A. a*
B. ^

C. {a}+

D. Both (a) & (c)

Answer:
C. {a}+

7. “S →a S”, what is the type of this production?
A. Type 0
B. Type 1

C. Type 2

D. Type 3

Answer:
D. Type 3

Document information

Uploaded on
July 23, 2025
Number of pages
14
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$8.49

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

Seller avatar
eduexcel
1.0
(1)
Sold
1
Followers
0
Items
633
Last sold
3 months ago



Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT 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