Lecture notes on automata, languages, and grammars
Cristopher Moore
February 6, 2012
Abstract
These lecture notes are intended as a supplement to Moore and Mertens The Nature of Computation, and
are a
Section 9.2:
Solutions for all problems in the book.
*
Section 12.1:
3. See book solution
5. We will reduce the halting problem to problem A, i.e. deciding
whether or not a machine halts on all inputs
Section 7.2
Problem 4: Solution in the book.
Problem 5:
S -> aABB | aAA,
A -> aBB | a,
B -> bBB | A
We first need to convert the grammar to Griebach Normal Form. In
this case, the only rule that is
Homework 6 Solutions:
Note that below when writing a grammar, we will often use the shorthand to
denote rules with the same left-hand-side. For example,
A -> aA
A -> lambda
will be denoted by
A -> aA
Homework 2 Solutions
CS 321
2.2.6
(q0 , 1010) = cfw_q0 , q2
(q1 , 00) =
2.2.7
L = cfw_ababn : n 0 cfw_aban : n 0
Start
a
q0
q1
a
b
q2
q3
a
q4
b
1
Start
q0
q1
b
a
2.2.10(a)
Find an nfa with three s
Homework 3 Solutions
October 24, 2013
Problem 2.3.1
Since no alphabet was specied we will perform the construction for both the
alphabet = cfw_a and alphabet = cfw_a, b.
For = cfw_a we get,
Start
a
S0
Homework 1 Solutions
CS 321
1.2.6
Let L be any language on a non-empty alphabet. Show that L and L cannot
both be nite.
There are two possible cases: 1) when L is innite, and 2) when L is nite.
The rs
JFLAP Activities for Formal Languages and Automata
Peter Linz
UC Davis
Susan H. Rodger
Duke University
February 1, 2011
Contents
1 Getting to Know JFLAP
1.1
1.2
1
About JFLAP . . . . . . . . . . . . .