CS 220 Winter 2011, Assignment 4, Due: March 2 (Wednesday)
1. Describe a deterministic polynomial time bounded TM M which, when given the binary representation
of a positive integer N , determines whether or not N = mk for some positive integers m 2 and
k
Lecture Notes on Complexity and NP-completeness
1. Reductions
Let A and B be two problems whose instances require as an answer either a yes" or a no"
3SAT and Hamilton cycle are two good examples. A reduction from A to B is a polynomialtime algorithm R wh
ReverseofaRegularLanguage
1
Theorem:
R
L
Thereverseofaregularlanguage
isaregularlanguage
Proof idea:
R
ConstructNFAthataccepts:L
invertthetransitionsoftheNFA
thatacceptsL
2
L
Proof
L
Sinceisregular,
thereisNFAthataccepts
Example:
b
L
L = ab * +ba
a
b
a
3
Chapter 6
Complete Problems
6.1
TM Transducers
c
/
x
$
2-way R/O
M
1-way W/O output tape
2-way R/W worktapes
Figure 6.1: Model of a Transducer
De nition 28 Let L0
and L
be languages. We say that L0 is e ectively reducible to L
(written L0 eff L) if 9 a DT
Chapter 4
Undecidability
In this chapter, we will review some of the well known undecidability results. The fundamental
undecidability result is the undecidability of the Halting Problem for Turing Machines (HPTM).
Theorem 4 HPTM:
There is no algorithm wh
Chapter 3
Recursive Function Theory
In this chapter, we will take a brief look at the recursive function theory. We will only consider
functions that map positive integers to positive integers, and in particular, only functions which
produce a single outp
Chapter 2
Programming Languages
In this chapter we will study some simple but powerful general programming languages.
Turing machines can be viewed as :
1. Language Recognizers
2. String Manipulators
3. Function Computers
TMs can be viewed as language rec
Chapter 1
Introduction
Theory of computation is an attempt to formalize the notion of computation, i.e., the notion of an
algorithmic process. Computational Complexity aims to determine the solvability/unsolvability of
computational problems, to develop t
CS 220 Winter 2011, Assignment 3, Due: February 17
1. Show that the function f (x, y ) = x y cannot be computed by any L1 -program.
2. Consider a programming language Q whose only non-I/O instructions are of the forms: x 0,
x 1, x x + y , x x y (monus), d
CS 220 Winter 2011, Assignment 2, Due: February 1
1. Describe a polynomial-time algorithm to determine, given a 2NFA M and an input x, whether
M accepts x (i.e., the time should be polynomial in the length of the descrption of M and x).
2. Let L = cfw_xyy
Removing Nondeterminism from
Two-Way Automata
Giovanni Pighizzini
Dipartimento di Informatica e Comunicazione
Universit degli Studi di Milano
Porto June 22, 2010
Outline
The Question of Sakoda and Sipser
Quasi Sweeping Automata and Quasi Sweeping Simulati