CSE 3813
Name:
Test 2, page 1 of 5 pages
Out: 6 Jul 10, Due: 13 Jul 10
1. (1 point) A free point just for following directions! Put your name at the top of every sheet and provide auxiliary
numbering if you need extra sheets. For example, if you cannot t
CSE 3813
Name:
Test 1, page 1 of 10 pages
Out: 17 Jun 10, Due: 22 Jun 10
1. (1 point) A free point just for following directions! Put your name at the top of every sheet and provide auxilliary
numbering if you need extra sheets. For example, if you cannot
CSE-3813
Name:
Quiz 8 - 9, page 1 of 3 pages
Out: 22 Jul 10, Due: 27 Jul 10
Instructions: This is a take-home quiz. It is worth twice the value of normal quizzes. It is an open-book, open-notes quiz.
However, you may not discuss the quiz among yourselves.
CSE-3813
Name:
Quiz 7, page 1 of 1 pages
Out: 20 Jul 10, Due: 20 Jul 10
You are given a language L on alphabet and a Turing machine M = (Q, , , , q0 , 2, F ) : wi L, M performs
a computation of the form q0 wi
the form q0 wj
M
M
y1 qfj y2 , where qfj F . I
Quiz 6
Describe the algorithm for and build the transition graph of a stayoption Turing machine that reads a 2s complement binary
number, n. If n < 0 the machine should output a 1, otherwise it
should output a 0. The computations are symbolically shown
be
Quiz 5
Prove L = cfw_w : na(w) > nb(w) is not a linear contextfree language
Solution: use the pumping lemma for linear contextfree languages
Try w L = amb2mam+1. As shown below, the
inequality |uvyz| m forces both v and y to contain
only as.
m
2m
m+1
a
b
Quiz 4
Let G = (cfw_S, A, cfw_a, b, S, cfw_S a | bSA, A a | bA). Show
the transitions for a npda that accepts all strings
generated by the grammar
You should notice it is in GNF, thus
production
(always)
S a
S bSA
A a
A bA
(always)
transition
(q0, , Z) =
Quiz
Let G be a context-free grammar with production
rules
Find equivalent grammar with no unit-productions.
A
B
Line 2: variable dependency graph S
Line 3: E = cfw_(S, A), (S, B), (A, B), (B, A)
Line 4 non-unit productions include the following
Line 5:
P
Quiz 2
Use the pumping to show that
not regular.
is
Pumping lemma: true for all regular languages L
First select an arbitrary m.
Now choose w = ambm = xyz L
Per pumping lemma |xy| m and |y| > 1
Obviously this forces y = ak
Therefore w = ambm = (x)(y)(z) =