CSE 105: Introduction to the Theory of Comptuation
Fall 2010
Problem Set 4
Instructor: Daniele Micciancio
Due on:
Wed. Nov 3, 2010
Problem 1
Use JFLAP to design Push Down Automata for the following language: The set of all strings over the
alphabet
{
a,b
}
that contain an unequal number of
a
’s and
b
’s (in any order).
The automaton ﬁrst mark the bottom of the stack with a special symbol “x”. Whenever the stack contains
only “x”, the automaton has read an equal number of “a” and “b”. The automaton keeps track of how many
a’s and b’s have been read using the stack. The autmaton will be in state
q
2
if it has read more a’s than b’s,
and in state
q
3
if is has read more b’s than a’s. Whenever the automaton has read the same number of a’s
and b’s, it moves back to
q
1
.
Problem 2
Give a Context Free Grammar for the set of all strings over the alphabet
{
a,b
}
that are
not
palyndromes.
The grammar has two variable symbols. T generates the set of all strings. S generates the strings that
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 Mr.ElieNasr
 Formal language, Contextfree grammar, context free grammar, Theory of Comptuation, Daniele Micciancio

Click to edit the document details