Reduction via computational history
If M is a TM which accepts (resp. rejects) a string w, then the
accepting computation history (resp. rejecting computation history) is a sequence C1, C2, . . . , Cm of congurations of
M , where C1 is a star
For a given M , submit its encoding M to M as an input.
M accepts M
M doesnt accept M
Denition 1 L = cfw_ M : M does not accept its encoding.
Theorem 1 L is not Turing-recognizable.
Proof. If there were D accepting
Post correspondence problem, PCP.
The problem was formulated by a mathematician Emil Post; see
A dominos is a collection of two-strings, like the ones below
Hierarchy of Languages
a language L
Are there Turing-acceptable (recursively enumerable) languages that are not
Turing-decidable (recursive)? Are there T
Non-deterministic Turing Machine
A nondeterministic Turing machine is a generalization of the standard TM for which every conguration may yield none, or one or more than one next
In contrast to the deterministic Turing machines, for
Denition 1 P is the class of languages that are
decidable in polynomial time on a deterministic singletape Turing machine:
P = T IM E (nk ).
Examples of languages in P
1. P AT H = cfw_ G, s, t : G is a directed graph that
Example of unsatisable formula
F = (1 x2 x4) (2 x3 x4) (x1 x3 x4)
(x1 x2 x4) (x2 x3 x4) (1 x3 x4)
(x1 x2 x3) (1 x2 x3)
Proof. By developing a tree of cases.
x1 = 0
F = (2 x3 x4) (3 x4)
(2 x4) (x2 x3 x4) (x2 x3)
x2 = 0
F = (3 x4) (3 x4)
Complexity of Computation
Denition 1 The running time of a computation
by a Turing Machine is dened to be the number of
steps (applications of the transition function) done
by the Turing Machine while executing the computation.
Denition 2 Let M be a det
Reducibility in Problems
A reduction is converting one problem, A, into another problem, B ,
so that a solution to the second problem can be used to solve the
notation: A B or A B
problem known to
Theorem 1 Let P be a language whose members are descriptions of Turing machines and let P satisfy the following two
Condition 1: If M1 and M2 are two TMs, where L(M1 ) =
L(M2 ), then M1 P i M2 P .
/*P is a property of a language
Denition 1 A function f : is a computable function if there is a TM which on every input w halts with just
f (w) on the tape.
Usual arithmetic functions, i.e. addition, multiplication, etc are
Computing is recognizing/describing/generating/accepting a language.
Context-free grammars: introduction
Two functions associated with languages:
reading: for language recognizers; writing: for language generators
One way to generate a language is to us
Notes on Finite Automata
Department of Computer Science
Textbooks: Introduction to the Theory of Computation
by Michael Sipser
Elements of the Theory of Computation
by H. Lewis and C. Papadimitriou
These notes contain the material from
Basic Denitions of Graph Theory.
An undirected graph G = (V, E ) consists of a set V of elements called vertices, and a
multiset E (repetition of elements is allowed) of pairs of vertices called edges.
The order of a graph G(V, E ) is |V |; t
x1, x2, . . . xn are boolean variables
T RU E 1
F ALSE 0
The negation x of x is TRUE (FALSE) i x is FALSE
A literal is either a variable x or its negation x.
A clause is a set of literals: (x3 x4 x6)
Given an assignment
A k vertex coloring of a graph G(V, E ) is a function
f : V [1, k ],
such that for any edge xy E , f (x) = f (y ).
Vertex Color (decision version): Given a graph G(V, E )
and an integer k > 0, is there a vertex coloring of G
which uses k
The running time of a computation by a Turing
Machine is dened to be the number of applications
of the transition function done by the Turing Machine
while executing the computation.
A deterministic Turing machine which halts on all inputs is ca
Examples of polynomial reducibility
Denition 1 A graph G(V, E ) is called connected,
if for any two distinct vertices u and v , there is a path
connecting u with v . A connected component of a
graph G is a maximal connected subgraph of G.
For a given gr
Decision problems vs Optimization Problems
Clique (decision version): Given a graph G(V, E ) and
an integer k > 0, is there a clique of size k in G ?
L = cfw_ G(V, E ), k : G contains a clique of size k .
Clique (optimization version): Given a
Polynomial Time Reducibility
The question of whether P = N P is one of the greatest
unsolved problems in the theoretical computer science.
Two possibilities of relationship between P and N P
P = N P;
P N P.
Intuition of the reduction idea:
If a proble