CS 21
Decidability and Tractability
Winter 2015
Solution Set 1
Posted: January 21
If you have not yet turned in the Problem Set, you should not consult these solutions.
1. We need to dene a language that has the same computational power as the function f
CS 21
Decidability and Tractability
Winter 2015
Solution Set 2
Posted: January 28
If you have not yet turned in the Problem Set, you should not consult these solutions.
1. We build a NPDA for L. There will be four states, labeled match, add-one, addtwo, a
CS 21
Decidability and Tractability
Winter 2015
Solution Set 3
Posted: February 4
If you have not yet turned in the Problem Set, you should not consult these solutions.
1. (a) A 2-NPDA is a 7-tuple (Q, , 1 , 2 , , q0 , F ), where Q, , 1 , 2 and F are all
CS 21
Decidability and Tractability
Winter 2015
Midterm Solutions
Out: February 11
If you have not yet turned in the Midterm
you should not consult these solutions.
0-1
0-2
1. (a) The language L1 is context free but not regular. To see it is context free,