Pumping Lemmas
Pumping Lemmas
for
Context-Free Grammars
Non-Context-Free Languages
In the study of Regular Languages we developed some results that
were useful to show that some languages were not Regular. The
easiest such results to apply were those prov
Context-Free Languages
Context-Free Languages
Parsing & Ambiguity
When we are given a string belonging to a language, and the
language is dened by a grammar, is there a unique way to "parse the
string"?
If we have multiple ways of decomposing a sentence
PDAs & CFGs
Regular Languages = Finite Automata
Context-Free Languages = ? Automata
PDAs & CFGs
Regular languages (corresponding, as we saw, to left-linear or rightlinear grammars) were recognized by Finite Automata, deterministic
and non-deterministic. I
Context-Free Grammars
Context-Free Grammars
Grammars
Grammars
What is a grammar?
One of the contributions of Noam Chomsky to Computer Science was
his introduction, around 1953, of the idea of generative grammar.
As we recall, a language is a set of string
Functions
Functions
We would like to identify the class of those functions that are
computable via Turing Machines - hopefully, this class is large enough
for all our purposes although plenty of people have tried to show it
isnt
We start with integer func
Fall 2007 - 91.502 - Theoretical Foundations
Computer Science Department
University of Massachusetts Lowell
Lowell, MA 01854
Oct. 10, 2007.
Exam Time: 1h & 15m. Each problem is worth 10 points. 50 pts total. Choose any 5 problems.
1. Regular Expressions a
Regular Languages
What is this course about?
What is COMPUTATION?
Informally obvious, formally quite difcult to characterize: serious
attempts started in the 17th century; continued through the next two;
culminated in the work of Gdel, Church and Turing i
Finite Automata
Finite Automata
Closure Properties of Regular Languages
Theorem. The class of regular languages is closed under union,
intersection, subtraction, complementation, concatenation, Kleene
closure and reversal.
Closure Properties of Regular La
Finite Automata
Finite Automata
Nondeterministic Finite Automata
The digraph construction for a regular expression introduced the idea
of -transitions; another idea that would seem natural is that of
replacing the transition function with a "transition re
Regular Languages
Regular Languages
What is this course about?
What is COMPUTATION?
Church & Turing
The two approaches were equivalent in the computations they
could represent - very different in what they made easy to talk
about
Turing Machine : decent
Finite Automata
Closure Properties of Regular Languages
Theorem. The class of regular languages is closed under union,
intersection, subtraction, complementation, concatenation, Kleene
closure and reversal.
Note: closure under union, concatenation and Kle
Finite Automata
Non-Regular Languages
One of the questions we can now attempt to answer has to do with the
existence of non-regular languages.
Ex. 2.54: prove that L = cfw_xxR | x cfw_0, 1* is not regular (R denotes
reversal).
Soln.: We prove that Index(R
Universal Turing Machines
Universal Turing Machines
Is the Turing Machine the top of the computational hierarchy? Or,
stating it differently, can a Turing Machine simulate ANY Turing
Machine? Can you write any Turing Machine computation as the input
to a
Fall 2008 - 91.502 - Theoretical Foundations - Second Exam
Computer Science Department
University of Massachusetts Lowell
Lowell, MA 01854
November 17, 2008.
Name:
1.
2.
Total:
3.
4.
5.
6.
7.
/50
Exam Time: 1h & 15m. Each problem is worth 10 points. 50 pt
Spring 2007 - 91.502 - Theoretical Foundations
Computer Science Department
University of Massachusetts Lowell
Lowell, MA 01854
April 24, 2007. Moved from April 17 - University closed.
Student Name :
1.
2.
3.
4.
5.
6.
7.
Total
.
Exam Time: 1h & 15m. Each p
Spring 2007 - 91.502 - Theoretical Foundations
Computer Science Department
University of Massachusetts Lowell
Lowell, MA 01854
Feb. 27, 2007.
Name:
Points: 1.
Total
2.
3.
4.
5.
6.
/50.
Exam Time: 1h & 15m. Each problem is worth 10 points. 50 pts total. Ch
Fall 2005 - 91.502 - Theoretical Foundations
Computer Science Department
University of Massachusetts Lowell
Lowell, MA 01854
Feb. 22, 2005.
Exam Time: 1h & 15m. Each problem is worth 10 points. 50 pts total. Choose any 5 problems.
1. Regular Expressions a
Fall 2007 - 91.502 - Theoretical Foundations
Computer Science Department
University of Massachusetts Lowell
Lowell, MA 01854
Oct. 10, 2007.
Exam Time: 1h & 15m. Each problem is worth 10 points. 50 pts total. Choose any 5 problems.
1. Regular Expressions a
Spring05 - 91.502 - Theoretical Foundations
Computer Science Department
University of Massachusetts Lowell
Lowell, MA 01854
April 20, 2005.
Exam Time: 1h & 15m. Each problem is worth 10 points. 50 pts total. Choose any 5 problems.
1. CF Languages. Let L1
Spring 2007 - 91.502 - Theoretical Foundations
Computer Science Department
University of Massachusetts Lowell
Lowell, MA 01854
May 15, 2007.
Student Name:
1
2
Total:
3
4
5
6
7
8
9
10
11
12
13
/100
Exam Time: 3hrs. Do 10 problems. Each problem is worth 10
Fall 2007 - 91.502 - Theoretical Foundations
Computer Science Department
University of Massachusetts Lowell
Lowell, MA 01854
Dec. 17, 2007.
Student Name:
1
2
Total:
3
4
5
6
7
8
9
10
11
12
13
/100
Exam Time: 3hrs. Do 10 problems. Each problem is worth 10 p
Spring 2008 - 91.502 - Theoretical Foundations
Computer Science Department
University of Massachusetts Lowell
Lowell, MA 01854
April 14, 2008.
Name:
1.
2.
Total:
3.
4.
5.
6.
7.
/50
Exam Time: 1h & 15m. Each problem is worth 10 points. 50 pts total. Choose
Spring 2008 - 91.502 - Theoretical Foundations
Computer Science Department
University of Massachusetts Lowell
Lowell, MA 01854
May 19, 2008.
Student Name:
1
2
Total:
3
4
5
6
7
8
9
10
11
12
/100
Exam Time: 3hrs. Do 10 problems, at least 3 of 9-12. Each pro
Finite Automata
Non-Regular Languages
One of the questions we can now attempt to answer has to do with the
existence of non-regular languages.
Ex. 2.54: prove that L = cfw_xxR | x cfw_0, 1* is not regular (R denotes
reversal).
Soln.: We prove that Index(R