100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

Cse355 Final Exam Questions And Answers With Verified Solutions 100% Correct Rated A+

Rating
-
Sold
-
Pages
11
Grade
A+
Uploaded on
27-03-2025
Written in
2024/2025

Cse355 Final Exam Questions And Answers With Verified Solutions 100% Correct Rated A+

Institution
Cse355
Course
Cse355









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Cse355
Course
Cse355

Document information

Uploaded on
March 27, 2025
Number of pages
11
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Cse355 Final Exam Questions And
Answers With Verified Solutions 100%
Correct Rated A+
T/F: A sublanguage of a regular language is regular. - ANSWER✔✔FALSE:
Every nonregular language over Σ* is a sublanguage of the regular language Σ*


T/F: A language containing a regular language is regular - ANSWER✔✔FALSE:
Every nonregular language over Σ* contains the regular language ∅


T/F: The intersection of a nonregular language and a regular language cannot be
regular. - ANSWER✔✔FALSE: The intersection of every nonregular language
and the regular language ∅ is ∅.


T/F: The intersection of two non-regular languages is non-regular. -
ANSWER✔✔FALSE: The intersection of the nonregular languages over {0,1}, L1
= {0^n 1^n | n > 0}, and L2 = {1^n 0^n | n > 0} is the regular language ∅.


T/F: If languages A and B are regular, then (A U B)' is also regular. -
ANSWER✔✔TRUE: The class of regular languages are closed under union and
complement, therefore A U B must be regular and (A U B)' must also be regular


T/F: If L1 is regular and L2 is context-free, L1 U L2 is also context-free. -
ANSWER✔✔TRUE: Every regular language is context-free, making L1 context-
free. Since the class of CFLs is closed under Union, L1 U L2 must be context-free.


T/F: Every subset of a context free language is regular. - ANSWER✔✔FALSE:
The statement is false even if we assume it's a proper subset. Let nonregular and

, context-free language L1 = {a^n b^n | n > 0} and L2 = {ε}. Let L3 = L1 U L2 =
{a^n b^n | n >= 0}. We know L3 is CFL and clearly L1 is a proper subset of L3.


T/F: If M is a PDA that never puts more than three symbols on its stack during its
computation, then L(M) is regular. - ANSWER✔✔TRUE: If a PDA uses only
finite amount of memory using its stack, then we can simulate this PDA using an
NFA. A finite number of items in stack leads to a finite number of stack
configurations. Each state in this NFA codes for a state of M and a stack
configuration of M . Then, L(M) must be regular.


T/F: If L1 and L2 are both context-free, (L1 U L2)' is also context-free. -
ANSWER✔✔FALSE: Let L1 = {a^n b^n c^n | n >= 0}' and L2 = ∅. Then (L1 U
L2)' = {a^n b^n c^n | n >= 0}, which is NOT context free. Note that L1 is a CFL
although L1' is not context-free.


You can also use De Morgan's Law to transform the statement to L1' ∩ L2'' and
then mention that the complement of a CFL is not guaranteed to be context-free.
Provide a CFL that its complement is not context-free.


T/F: There is no such CFL L whose complement (L)' is also context-free. -
ANSWER✔✔FALSE: Pick any regular language L, which automatically is
context-free, its complement is a CFL because complement of a regular language is
regular, therefore context-free.


If you used the method shown in lecture to convert (01)* U (10)* into an
equivalent NFA, how many total states and accept states would the machine have?
a) 9 total states, 2 accept states
b) 9 total states, 4 accept states
c) 10 total states, 2 accept states
d) 11 total states, 4 accept states

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TESTSMASTER Walden University
View profile
Follow You need to be logged in order to follow users or courses
Sold
76
Member since
1 year
Number of followers
2
Documents
9000
Last sold
15 hours ago

3.8

20 reviews

5
11
4
3
3
1
2
1
1
4

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

Frequently asked questions