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
Exam (elaborations)

verified computer science q$a 2025

Rating
-
Sold
-
Pages
14
Grade
A+
Uploaded on
23-07-2025
Written in
2024/2025

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

Show more Read less
Institution
Course

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

Written for

Course

Document information

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

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
master11

Get to know the seller

Seller avatar
master11 Edinboro University Of Pennsylvania
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
201
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