Unit 5 N
Unit 5 N
Unit 5 N
UNIT VI
Objective:
To understand and design Turing Machines for the given recursively enumerable languages.
Syllabus:
Turing Machine: Turing Machine, model, Design of TM, Types of Turing Machines, Computable
functions, Recursively enumerable languages, church‘s hypothesis.
Computability Theory: Decidability of problems, universal Turing Machine, Undecidability of posts
correspondence problem, Turing reducibility, definition of P and NP problems, NP complete and NP hard
problems.
Learning Outcomes:
Students will be able to:
understand turing machine and its model.
design Turing Machine’s for Recursively Enumerable languages.
define P and NP class of problems.
define decidability and undecidability of problems.
Learning Material
Turing Machine:
A Turing machine (TM) is denoted by
In one move the Turing machine, depending upon the symbol scanned by the tape head and the state of
the finite control,
1) changes state,
2) prints a symbol on the tape cell scanned, replacing what was written there, and
II.B.Tech-I-Semester A.Y.2018-19 CSE
Formal Languages and Automata Theory 3
Note : The difference between a Turing machine and a two-way finite automaton lies in the former's
ability to change symbols on its tape.
Example:
The function δ
Transition Diagram
A computation of M
From the definition it is clear that total recursive function is the subset of partial recursive
function.
All those partial functions for which TM halts are called total recursive functions.
Recursively enumerable languages are equivalent to the class of partial recursive functions.
Recursive Language:
A subclass of the r.e. sets, called the recursive sets, which are those languages accepted by at least one
Turing machine that halts on all inputs.
Church's Hypothesis:
The assumption that the intuitive notion of "computable function" can be identified with the class of
partial recursive functions is known as Church's hypothesis or the Church-Turing thesis.
Example 1:
Let ∑ = {0, 1}. Let A and B be lists of three strings each, as defined
In this case PCP has a solution. Let m = 4, i1 = 2,i2 =1, i3 = 1, and i4 = 3. Then W2W1W1W3 =
X2X1X1X3 = 101111110.
i Xi Yi
1 a b3
2 bab3 ba
3 ba a
List X List Y
i Xi Yi
1 01 0101
2 1 10
3 1 11
X2=1 Y2=10
X3=1 Y3=11
For any i |Xi| < |Yi|The last Y is having strings of greater lengths. So to get same string for same
sequences of x1,x2,x3 and y1,y2,y3 is difficult.
We cannot get solution sequence. Therefore the given PCP is having no solution.
Turing Reducibility:
Language Ll is reduced to L2 by finding an algorithm that mapped strings in L1 to strings in L2 and
strings not in L1 to strings not in L2. This notion of reducibility is often called many-one reducibility.
A more general technique is called Turing reducibility, and consists simply of showing that L1 is
recursive in L2.
If L1 is many-one reducible to L2, then surely L1 is Turing-reducible to L2.
P and NP problems:
The languages recognizable in deterministic polynomial time form a natural and important class, the class
Ui≥1 DTIME(ni), which we denote by P. It is an intuitively appealing notion that P is the class of
problems that can be solved efficiently.
There are a number of important problems that do not appear to be in P but have efficient
nondeterministic algorithms. These problems fall into the class Ui≥1 NTIME(ni), which we denote by NP.
NP
NP
P
NC
HALTING PROBLEM
The problem of determining whether a program halts on a given input is undecidable.This is to say that
no program can correctly code halts.There is no algorithm for deciding halting problem
Union: If L1 and If L2 are two recursive languages, their union L1∪L2 will also be recursive
because if TM halts for L1 and halts for L2, it will also halt for L1∪L2.
Concatenation: If L1 and If L2 are two recursive languages, their concatenation L1.L2 will also be
recursive.
Kleene Closure: If L1 is recursive, its kleene closure L1* will also be recursive.
Intersection and complement: If L1 and If L2 are two recursive languages, their intersection L1 ∩
L2 will also be recursive.
If L is recursively enumerable language, its kleene closure L* will also be recursively enumerable
language.
If L1 and If L2 are two recursively enumerable languages, their concatenation L1.L2 will also be
recursively enumerable languages.
If L1 and If L2 are two recursively enumerable languages, their union L1 ∪ L2 will also be
recursively enumerable languages.
If L1 and If L2 are two recursively enumerable languages, their union L1 ∩ L2 will also be
recursively enumerable languages.