Home
Browse
Create
Search
Log in
Sign up
Upgrade to remove ads
Only $2.99/month
CSE 355 Midterm 2
STUDY
Flashcards
Learn
Write
Spell
Test
PLAY
Match
Gravity
Terms in this set (16)
There exists an umambiguous CFG for any CFG.
False, inherently ambiguous grammars exist
Chomsky normal form is always unambiguous.
False
Is there a PDA that recognizes the following language?
L1 = {w |w is a binary string of even length and contains 101 as a substring}
True
A pushdown automaton can recognize and generate a string.
False
If there is a correct proof using the pumping lemma for regular languages showing that the language L1 is not regular, there must be a pushdown automaton that recognizes the language.
False
Given the CFG:
S -> aTb|bTa| ϵ
T -> XTX|S
X -> 0X|1X| ϵ
Which of the following is true?
I. S derives a010111
II. T derives T
III. S derives a01b
I, II, and III
Can NFAs be used to recognize some context-free languages?
Yes, but only if there exists a PDA for the language that is not using its stack
Yes, but only some context-free languages
In a context free grammar in Chomskey normal form with start variable S, which of the following rules cannot appear?
U -> Uv
To show that a language is not context-free, one could
use closure properties or use the pumping lemma for context-free languages
If G is context free grammar and w is string of length n in L(G), How long is a derivation of w in G, if G is in Chomsky normal form? Hint: what is the structure of parse trees of CNF?
2n-1
Context-free languages are closed under
union, star, and concatenation but not intersection or complementation.
In PDAs, stacks provide unlimited memory using first in, last out access.
True
Consider the following context-free language: { w | w contains at least three 1's }
Then there must be a PDA that recognizes the language without using its stack.
True
Given a CFG and a PDA that recognize the same language, the number of variables in the CFG and the number of states in the PDA must be the same
False
Given a string s and its parse tree of an unambiguous CFG G, if the longest root-to-leaf path is n, the maximum number of variables G can have to guarantee that w is pumpable (i.e. w is subject to the pumping lemma for CFLs) is n.
False
Remember that CFLs are closed under union.
Consider the statement: L 1 ∪ L 2 = L 3.
If we know that L 1 and L 3 are CFLs, we can conclude that L 2 is also a CFL.
False
THIS SET IS OFTEN IN FOLDERS WITH...
CSE 355 Test 2
35 terms
CSE 355 Exam 1
59 terms
CSE 355 Final Exam
94 terms
CSE355 Final :(
135 terms
OTHER SETS BY THIS CREATOR
CSE 565: Final Exam Review
108 terms
CSE 565 Midterm Exam
87 terms
cse 355 midterm reew
38 terms
POS 150 Comparative Politics Midterms #1
182 terms
OTHER QUIZLET SETS
Accrual Accounting
10 terms
Lab Practical 4
33 terms
Forensics study set for test 3-5 notes
48 terms
psychotropic medications
30 terms