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 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
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 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
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
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
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
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
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
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 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