1. A simple programming exercise: Write the quintuples for a
Turing machine that transforms a unary string into its binary
representation. Initially the input tape contains the number n in
unary notat
1. We have seen that a grammar where all productions are of the
form:
A -> aB, A -> c (A, B non-terminals, a,c terminals)
defines a regular language, and that from the grammar we can
build directly an
1. Consider the grammar:
S => ( L ) | a
L => L, S | S
where the terminals are cfw_ ( ) , a
Build parse trees for the following sentences in the language:
a) (a, (a, a)
b) (a, (a, a), (a, a)
c) Describ
1. Prove that the sum of the cubes of the integers from 1 to N is
N^2 (N+1)^2 / 4,
where "^" denotes exponentiation.
2. Give the DFA accepting the following language over the
alphabet cfw_0, 1: the se
Theory of Computation
Homework 11.
Due Date: Wednesday, November 23.
Chapter 5, Nos. 2, 3, 5, 6, 8.
7. Let G-UHP be the following problem.
Input: G = (V, E ), an undirected graph.
Question: Does G hav
Theory of Computation
Homework 10.
Due Date: Wednesday, November 29.
1. Let L be a listing of programs, i.e. L(i) = Qi for some program Qi , where Qi (i) halts for
all i, and further if Qi (x) halts,
1. Consider the following DFA over the binary alphabet:
Q = cfw_p, q, r, s, start state p, accepting state p.
With the following transition table:
d (p,0) = s, d (p,1) = p
d (q,0) = p, d (q,1) = s
d (