University of Waterloo
CS 365 Models of Computation
Winter 2013
Problem Set 5
Distributed Thursday, February 7 2013.
Due Thursday, February 14, 2013, in class.
1. [10 marks] Use the pumping lemma for CFLs to prove that
cfw_ai bj ck : 1 i < j < k
is not a
CS 365: MODELS OF COMPUTATION. ASSIGNMENT 1
DUE ON JANUARY 12, 2017
Problem 1: Addition is regular
Submit a solution to the following problem. Acknowledge all collaborators with whom you
discussed any of the problems in this problem set and all external s
CS 365: MODELS OF COMPUTATION. ASSIGNMENT 5
(NOT) DUE ON FEBRUARY 9, 2017
Problem 5: None this week!
You do not need to submit a solution to any problem this week. You do, however, need to
complete the exercises on your own: they cover material that will
CS 365: MODELS OF COMPUTATION. ASSIGNMENT 7
DUE ON MARCH 9, 2017
Problem 7: The times they are a changin
Submit a solution to the following problem. Acknowledge all collaborators with whom you
discussed it and all external sources that you may have used i
CS 365: MODELS OF COMPUTATION. ASSIGNMENT 6
DUE ON FEBRUARY 16, 2017
Problem 4: Busy beavers revisited
Submit a solution to the following problem. Acknowledge all collaborators with whom you
discussed it and all external sources that you may have used in
CS 365: MODELS OF COMPUTATION. ASSIGNMENT 9
DUE ON MARCH 23, 2017
Problem 9: Space and time lower bounds
Submit a solution to the following problem. Acknowledge all collaborators with whom you
discussed it and all external sources that you may have used i
CS 365: MODELS OF COMPUTATION. ASSIGNMENT 4
DUE ON FEBRUARY 2, 2017
Problem 4: Same or different
Submit a solution to the following problem. Acknowledge all collaborators with whom you
discussed it and all external sources that you may have used in the co
CS 365: MODELS OF COMPUTATION. ASSIGNMENT 10
DUE ON MARCH 30, 2017
Problem 10: Deciding the undecidable
Submit a solution to the following problem. Acknowledge all collaborators with whom you
discussed it and all external sources that you may have used in
CS 365: MODELS OF COMPUTATION. ASSIGNMENT 8
DUE ON MARCH 16, 2017
Problem 8: Reduce, reduce, reduce
Submit a solution to the following problem. Acknowledge all collaborators with whom you
discussed it and all external sources that you may have used in the
CS 365: Models of Computation
Winter 2017 Course Outline
Last revised: January 2, 2017
Course website: cs.uwaterloo.ca/~eblais/CS365/
Please note that any term-specific content of this document is decided tentatively at the beginning of the term, and is s
University of Waterloo
CS 365 Models of Computation
Winter 2013
Problem Set 11
Distributed Thursday, March 28 2013.
Due Thursday, April 4, 2013, in class.
1. Suppose L1 and L2 are in PSPACE. Which, if any, of L1 L2 , L1 L2 , and L are in
1
PSPACE? Justify
University of Waterloo
CS 365 Models of Computation
Winter 2013
Problem Set 1
Distributed Thursday, January 10 2013.
Due Thursday, January 17 2013, in class.
1. [10 marks] Prove or disprove:
(a) If L1 , L2 , L3 are languages, and L2 L3 , then L1 L2 L1 L3
University of Waterloo
CS 365 Models of Computation
Winter 2013
Problem Set 4
Distributed Thursday, January 31 2013.
Due Thursday, February 7, 2013, in class.
1. [10 marks] In Figure 2.19 on page 116 of the course text, you will nd a PDA for the
language
University of Waterloo
CS 365 Models of Computation
Winter 2013
Problem Set 3
Distributed Thursday, January 24 2013.
Due Thursday, January 31, 2013, in class.
1. [10 marks] Consider the grammar G = (cfw_S, cfw_a, b, P, S) where P is given as follows:
S aS
Great Ideas of CS 365
1. A real computer can be modeled by a mathematical object: a theoretical computer.
2. A formal language is a set of strings, and can
represent a computational problem.
3. A formal language can be described in many
dierent ways that
University of Waterloo
CS 365: Models of Computation
Winter 2013
Putting Grammars in Chomsky Normal Form
Your textbook has a section on converting grammars to Chomsky normal form, where
every production is of the form A BC or A a, where A, B, C are variab
University of Waterloo
CS 365: Models of Computation
Winter 2013
Techniques for Proving Characterizations of Context-Free Languages
One of the things you should learn in this course is methods for proving that two dierent
ways of characterizing context-fr
Practical Applications of CS 365
1. Ecient compilation of computer languages: we
want to write our computer programs in a high-level
language and have them automatically translated to
machine code. The best methods for this rely on the
theory of determini
University of Waterloo
CS 365 Models of Computation
Winter 2013
Problem Set 9
Distributed Thursday, March 14 2013.
Due Thursday, March 21, 2013, in class.
1. [10 marks] Let L1 , L2 P. Show that L1 L2 , L1 L2 , and L are all in P. (In other
1
words, the cl
University of Waterloo
CS 365: Models of Computation
Winter 2013
Nine Errors Students Commonly Make When Applying the
Pumping Lemma
The pumping lemma for regular languages is the following:
Lemma.
If the language L is regular, there exists a constant n 1
University of Waterloo
CS 365 Models of Computation
Winter 2013
Problem Set 2
Distributed Thursday, January 17 2013.
Due Thursday, January 24 2013, in class.
1. [10 marks] Consider the following NFA-. Carry out the construction described in
class, and in
CS 365: MODELS OF COMPUTATION. ASSIGNMENT 3
DUE ON JANUARY 26, 2017
Problem 3: Closure of CFLs
Submit a solution to the following problem. Acknowledge all collaborators with whom you
discussed it and all external sources that you may have used in the comp