CS 21
Decidability and Tractability
Winter 2012
Midterm Solutions
Out: February 13
1. (a) The language L1 is context free but not regular. To see it is context free, consider the
NPDA that rst pushes as onto the stack until it sees the rst b, then pops as
CS 21
Decidability and Tractability
Winter 2012
Final Exam Solutions
Posted: March 16
If you have not turned in the nal, obviously you should not consult these solutions.
1. (a) First, the problem is in PSPACE, for the usual reason for 2-player games. Giv
CS 21
Decidability and Tractability
Winter 2013
Midterm
Out: February 6
Due: February 13
This is a midterm. You may consult only the course notes and the text (Sipser). You may not
collaborate. The full honor code guidelines can be found in the course syl
CS 21
Decidability and Tractability
Winter 2013
Final
Out: March 13
Due: March 20, noon
This is a nal exam. You may consult only the course notes and the text (Sipser). You may not
collaborate. The full honor code guidelines can be found in the course syl
CS 21
Decidability and Tractability
Winter 2012
Midterm Solutions
Out: February 8
1. (a) The language L1 is context free but not regular. To see it is context free, consider the
NPDA that rst pushes as onto the stack until it sees the rst b, then pops as
CS 21
Decidability and Tractability
Winter 2013
Problem Set 3
Out: January 30
Due: February 6
Reminder: you are encouraged to work in groups of two or three; however you must turn in your
own write-up and note with whom you worked. You may consult the cou
CS 21
Decidability and Tractability
Winter 2012
Problem Set 1
Out: January 11 Due: January 18
Reminder: you are encouraged to work in groups of two or three; however you must turn in your own write-up and note with whom you worked. You may consult the cou
CS 21
Decidability and Tractability
Winter 2013
Solution Set 2
Posted: January 30
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 2013
Final Exam Solutions
Posted: March 20
If you have not turned in the nal, obviously you should not consult these solutions.
1. (a) This problem is in PSPACE. We give a recursive algorithm. We are given a sequ
Outline
CS21
Decidability and Tractability
Lecture 15
February 9, 2015
Post Correspondence problem (contd)
a non-RE and non-co-RE language
the Recursion Theorem
Gdel Incompleteness Theorem
(midterm due Wednesday at noon)
February 9, 2015
CS21 Lecture 15
1
Outline
CS21
Decidability and Tractability
Gdel Incompleteness Theorem
Lecture 16
February 11, 2015
on to Complexity
February 11, 2015
CS21 Lecture 16
1
February 11, 2015
CS21 Lecture 16
2
Background
Hilberts program (1920s):
formalize mathematics in ax
Outline
CS21
Decidability and Tractability
Lecture 9
January 26, 2015
January 26, 2015
CS21 Lecture 9
Turing Machines and variants
1
multitape TMs
nondeterministic TMs
Church-Turing Thesis
decidable, RE, co-RE languages
January 26, 2015
CS21 Lecture 9
So
Outline
CS21
Decidability and Tractability
Lecture 1
January 5, 2015
January 5, 2015
CS21 Lecture 1
1
administrative stuff
motivation and overview of the course
problems and languages
Finite Automata
January 5, 2015
Administrative Stuff
No programming in
Outline
on to Computational Complexity
CS21
Decidability and Tractability
The complexity class P
examples of problems in P
Lecture 17
February 13, 2015
The complexity class EXP
Time Hierarchy Theorem
February 13, 2015
CS21 Lecture 17
1
February 13, 20
Outline
CS21
Decidability and Tractability
Lecture 14
February 6, 2015
February 6, 2015
CS21 Lecture 14
undecidable problems
1
computation histories
surprising contrasts between
decidable/undecidable
Rices Theorem
Post Correspondence problem
February 6, 2
Outline
CS21
Decidability and Tractability
Lecture 11
January 30, 2015
January 30, 2015
CS21 Lecture 11
1
decidable, RE, co-RE languages
the Halting Problem
reductions
many-one reductions
January 30, 2015
non-RE languages
the set of all TMs is countable
Problem Set + grading
3 points for each part of each problem
PS1: 24 points total
CS21
Decidability and Tractability
mean: 19.9 median: 20.5
2014: 17.2, 19.5
2013: 19.5, 20
2012: 19.6, 21
2011: 18.7, 19
2010: 19.3, 20
2009: 20.0, 21
Lecture 10
January
Outline
CS21
Decidability and Tractability
equivalence of NPDAs and CFGs
(finishing up)
non context-free languages
Lecture 7
January 21, 2015
January 21, 2015
CS21 Lecture 7
1
NPDA, CFG equivalence
2
Proof of ( ): L is recognized by a NPDA
implies L is de
CS21
Decidability and Tractability
Lecture 6
January 17, 2014
January 17, 2014
CS21 Lecture 6
1
Outline
equivalence of NPDAs and CFGs
non context-free languages
deterministic PDAs
January 17, 2014
CS21 Lecture 6
2
Context-Free Grammars
start
symbol
A 0A1
CS21
Decidability and Tractability
Lecture 4
January 13, 2014
January 13, 2014
CS21 Lecture 3
1
Outline
Pumping Lemma
Pushdown Automata
Context-Free Grammars and Languages
January 13, 2014
CS21 Lecture 3
2
Non-regular languages
Pumping Lemma: Let L be a r
CS21
Decidability and Tractability
Lecture 8
January 24, 2014
January 24, 2014
CS21 Lecture 8
1
Outline
deterministic PDAs
deciding CFLs
Turing Machines and variants
January 24, 2014
CS21 Lecture 8
2
Deterministic PDA
A technical detail:
we will give our
Outline
CS21
Decidability and Tractability
parse trees
ambiguity
normal form
Lecture 5
January 14, 2015
January 14, 2015
CS21 Lecture 5
Pushdown Automata
Context-Free Grammars and Languages
1
equivalence of NPDAs and CFGs
January 14, 2015
Pushdown Auto
CS21
Decidability and Tractability
Lecture 7
January 22, 2014
January 22, 2014
CS21 Lecture 7
1
Outline
proof of CFL pumping lemma
deterministic PDAs
deciding CFLs
January 22, 2014
CS21 Lecture 7
2
Pumping Lemma for CFLs
CFL Pumping Lemma: Let L be a CFL.
CS21
Decidability and Tractability
Lecture 9
January 27, 2014
January 27, 2014
CS21 Lecture 8
1
Outline
Turing Machines and variants
multitape TMs
nondeterministic TMs
Church-Turing Thesis
decidable, RE, co-RE languages
January 27, 2014
CS21 Lecture 8
2
T
Outline
CS21
Decidability and Tractability
Lecture 2
January 7, 2015
January 7, 2015
CS21 Lecture 2
1
Finite Automata
Nondeterministic Finite Automata
Closure under regular operations
NFA, FA equivalence
January 7, 2015
What is computation?
machine
finit