CIT 594 Simulating an Unrestricted Grammar with a
Modified Post Correspondence Problem
Spring 2012, David Matuszek
S aABb | Bbb
Bb C
AC aac
S aABb aAC aaac
w = aaac
start
FS
1
copy
a
2
end
F
9
10
FS
F
4
b
c
5
c
A
A
6
B
B
7
C
C
E
aaacE
productions 10
1
3
a

CIT 594 Turing Machine example
Spring 2012, David Matuszek
Here is the completion of the example we started in class.
d (the transition
function)
start
start
start
start
0
1
#
0
1
#
R
R
R
L
start
start
start
dup
dup 1 1 R put1
dup 0 0 R put0
dup - - R put

CIT 596 Definitions of Turing Machines
Spring 2012, David Matuszek
The definition of a Turing Machine may differ slightly from one source to another. Here are three
definitions:
Michael Sipser
A Turing Machine is a 7-tuple
Turing M = <Q, S , G , d , q0, q

CIT 596 Turing Machine assignment
Spring 2012, David Matuszek
Write the following three Turing machines.
1. A TM that adds two binary numbers, separated by a +, and leaves the result as the only
thing on the tape.
For example: If the input is 10110+101, w

CIT 594 Turing Machine to Unrestricted Grammar
Spring 2012, David Matuszek
I think the trouble I had in class was simply that I got mixed up about which direction I was going:
TM to unrestricted grammar, or the reverse.
In any case, here's an example of a

Sample Final Exam
Name: _
CSC 8150-001 Theory of Computing
Fall 1999, David Matuszek
1. The various grammar types differ only in their productions. Specify the allowable forms of
productions for each type of grammar. Use capital letters (A, B, .) for vari

Regular languages
Define a floating-point number (a float) as consisting of a decimal point, with decimal digits on
one or both sides of the decimal point. For example, 0.99, .25, and 100. are all floats. Floats (by
this definition) have no sign and no ex

Modified PCP problems
The following is a grammar that will generate all strings of the form anbn.
S aSb | e
Here is a string belonging to the language generated by the above grammar:
aabb
Here are the "dominos" representing this grammar:
FS
S
a
b
aSb
F
S

Concurrent TM
Concurrency is all the rage in modern programming languages. If we add to a standard TM a
second, independently controlled read/write head, controlled by a separate DFA, does that
increase the power of the TM?
Unsolvable problems
Can you dem

Limited TM
We've looked at ways to try to increase the power of Turing Machines. Let's limit one.
Define G = S = cfw_ 1, blank . Does this have the power of a standard Turing Machine?
Concurrent TM
Concurrency is all the rage in modern programming languag

CIT 594 Dominos, a.k.a. Post Correpondence
Problem
Spring 2012, David Matuszek
Suppose you have a set of tiles, or "dominos." Each domino has a string in the upper half, and a
string in the lower half. Like this:
#1
#2
#3
#4
#5
#6
#7
AD
AB
RA
C
RA
CA
AB
D

CIT 594 Simulating a TM with a Modified Post
Correspondence Problem
Spring 2012, David Matuszek
Turing Machine
q0 1 1 q0 R
q0 0 0 q0 R
Conventional (1-line) evaluation:
q0100 1 q 000 10q00 100q0 10q10 101qA
q0 # # q1 L
q1 1 1 qA R
R/W head shown just befo

CIT 596 Turing Machine simulator
Spring 2012, David Matuszek
I wrote a little Turing Machine simulator over the weekend. It's no real competition for JFLAP, but
it does take input in a different form. JFLAP uses diagrams, but a TM can also be described
te