UNIT-5
Types of Turing machine: Turing machines and halting
Undecidability: Undecidability, A Language that is Not Recursively
Enumerable, An Undecidable Problem That is RE, Undecidable
Problems about Turing Machines, Recursive languages, Properties
of recursive languages, Post's Correspondence Problem, Modified Post
Correspondence problem, Other Undecidable Problems, Counter
machines.
TYPES/ VARIANTS OF TURING MACHINE
1. Two-way infinite Tape Turing Machine
2. Multi-tape Turing Machine
3. Non-deterministic Turing Machine
4. Multi-dimensional Tape Turing Machine
5. Multi-head Turing Machine
6. Offline Turing Machine
7. Multiple track Turing Machine
1. TWO-WAY INFINITE TAPE TURING MACHINE
 A two-way infinite tape Turing machine allows the tape to extend
infinitely in both directions, unlike the standard machine where the
tape extends infinitely in only one direction.
 This removes the boundary on the left side of the tape.
EXAMPLE
L = { w {a, b}* | w has the same number of a’s to the
∈
left and right of a central marker # }
KEY DIFFERENCE FROM STANDARD TURING MACHINE
Feature
Standard Turing
Machine
Two-Way Infinite Tape
Tape direction Infinite to the right Infinite both ways
Left-end restriction Cannot move past left end No boundary at all
Power Equal (same languages) Equal
Simpler algorithms? Sometimes Yes (can simplify logic)
2. MULTI-TAPE TURING MACHINE
 It has multiple tapes and
controlled by a single head.
 The Multi-tape Turing
machine is different from k-
track Turing machine but
expressive power is same.
 Multi-tape Turing machine can
be simulated by single-tape
Turing machine
EX: Palindrome String: The heads start at both ends of the string and move towards each other, checking if
the corresponding symbols are identical.
EXAMPLE
L = { ww | w {a, b}* } This language contains any string
∈
repeated twice, like abbaabba
BENEFITS OF MULTI-TAPE MACHINES, SINGLE TAPE , TWO WAY INFINITE
Feature Single-Tape Multi-Tape
Two-Way Infinite
Tape
Tapes 1 2 or more 1
Tape Direction Infinite right only Infinite right only
Infinite both
directions
Heads 1 1 per tape 1
Power (Language
Capability)
Same Same Same
Speed Slower Faster (more efficient) Similar to single-tape
Design Simplicity Basic Easier for complex logic
Easier for symmetric
designs
Ideal Use Teaching, theory
Efficient algorithms,
copying
Palindromes,
symmetry checks
3. NON-DETERMINISTIC TURING
MACHINE
 A non-deterministic Turing
machine has a single, one way
infinite tape.
 For a given state and input symbol
has atleast one choice to move
(finite number of choices for the
next move), each choice several
choices of path that it might follow
for a given input string.
 A non-deterministic Turing
machine is equivalent to
deterministic Turing machine.
EXAMPLE
L = { w {a, b}* | w contains a substring "aba" }
∈
4. MULTI-DIMENSIONAL TAPE TURING MACHINE
 It has multi-dimensional tape where head can move any direction
that is left, right, up or down.
 Multi dimensional tape Turing machine can be simulated by one-
dimensional Turing machine
EXAMPLE
COMPARISON TABLE
Feature 1D Turing Machine 2D/3D Turing Machine
Tape Structure Linear (one row) Grid or cube (2D/3D)
Head Movement Left/Right
Up, Down, Left, Right
(and more)
Suitable for Strings, linear problems
Grid problems, 2D
patterns, simulations
Language Power Equivalent Equivalent
Design Complexity Easier Higher
Simulation of 2D by 1D Possible but slower Native and efficient
5. MULTI-HEAD TURING MACHINE
 A multi-head Turing machine contain two or more heads to read
the symbols on the same tape.
 In one step all the heads sense the scanned symbols and move or
write independently.
 Multi-head Turing machine can be simulated by single head
Turing machine.
EXAMPLE
L = { ww | w {a, b}* } This is the set of strings where the
∈
first half is exactly the same as the second half — e.g.,
abbaabba
6. OFFLINE TURING MACHINE
 An "offline" Turing Machine, also
known as a multi-tape Turing
Machine, utilizes multiple tapes to
process input. One tape acts as the
input (read-only) and another as a
working tape for manipulation.
 This contrasts with a standard
single-tape Turing Machine where
input and work are on the same
tape.
EXAMPLE
L = { w {a, b}* | w has equal number of a's and b's }
∈
7. MULTIPLE TRACK TURING MACHINE
 A k-tack Turing machine(for some k>0) has k-tracks and
one R/W head that reads and writes all of them one by one.

A k-track Turing Machine can be simulated by a single
track Turing machine
EXAMPLE
L = { ww^R | w {a, b}* } This is the set of strings that are
∈
followed by their reverse, like abbaabba
COMPARISON TABLE
Type What It Is Special Feature
Purpose / Why It's
Useful
Basic TM Single tape, one head
Can read/write and move
left/right
Base model for
computation
Two-way Infinite TM
Tape goes infinitely in
both directions
No left-end limit
Easier handling of input
growing both ways
Multi-Tape TM
Multiple tapes with one
head each
Can read/write on all
tapes in one step
Faster, handles complex
tasks in fewer steps
Multi-Track TM
One tape, divided into
several "layers" or rows
Each cell stores multiple
symbols
Stores extra info like
marks, counters
Offline TM
Two tapes: input tape
(read-only), and work
tape (read/write)
Input cannot be changed
Keeps input safe, useful
in parsing or compilers
Multi-Head TM
One tape, but multiple
heads
Reads/writes in different
positions
Faster comparisons,
scanning multiple areas
Multi-Dimensional TM
Tape is a 2D grid or 3D
block
Moves in 4 or more
directions
Solves problems on
grids/images/matrices
easily
Non-Deterministic TM
Can try many paths at
once from a state
Multiple possible moves
Theoretical model to
explore hard problems
(like NP)
DECIDABLE PROBLEMS
 A problem is said to be Decidable if we can always
construct a corresponding algorithm that can answer the
problem correctly.
 Decidability in terms of a Turing machine, a problem
is said to be a Decidable problem if there exists a
corresponding Turing machine which halts on every
input with an answer- yes or no.
 It is also important to know that these problems are
termed as Turing Decidable since a Turing machine always
halts on every input, accepting or rejecting it.
WE WILL NOW CONSIDER FEW IMPORTANT
DECIDABLE PROBLEMS
 Are two regular languages L and M equivalent?
We can easily check this by using Set Difference operation.
L-M =Null and M-L =Null. Hence (L-M) U (M-L) = Null,
then L,M are equivalent.
 Membership of a CFL?
We can always find whether a string exists in a given CFL
by using an algorithm based on dynamic programming.
 Emptiness of a CFL By checking the production
rules of the CFL we can easily state whether the language
generates any strings or not.
SEMI- DECIDABLE PROBLEMS
 Semi-Decidable problems are those for which a Turing
machine halts on the input accepted by it but it can
either halt or loop forever on the input which is rejected
by the Turing Machine. Such problems are termed as
Turing Recognizable problems.
UNDECIDABLE PROBLEMS
 The problems for which we can’t construct an algorithm
that can answer the problem correctly in finite time are
termed as Undecidable Problems. These problems may
be partially decidable but they will never be decidable.
 That is, there will always be a condition that will lead the
Turing Machine into an infinite loop without providing
an answer at all.
 Simply, A problem is undecidable if there is no Turing
machine which will always halt in finite amount of
time to give answer as ‘yes’ or ‘no’. An undecidable
problem has no algorithm to determine the answer for a
given input.
UNDECIDABLE PROBLEMS ABOUT TURING MACHINE
 Ambiguity of context-free languages: Given a context-free language,
there is no Turing machine which will always halt in finite amount of
time and give answer whether language is ambiguous or not.
 Equivalence of two context-free languages: Given two context-free
languages, there is no Turing machine which will always halt in finite
amount of time and give answer whether two context free languages are
equal or not.
 Everything or completeness of CFG: Given a CFG and input
alphabet, whether CFG will generate all possible strings of input
alphabet (∑*)is undecidable.
 Regularity of CFL, CSL, REC and REC: Given a CFL, CSL, REC or
REC, determining whether this language is regular is undecidable
UNDECIDABLE PROBLEMS ABOUT TURING
MACHINES
Problem Decidable? Explanation
Halting Problem ❌ No Can’t predict if a machine halts on all inputs
Acceptance Problem ❌ No Can’t decide if machine accepts a string
Emptiness Problem ❌ No Can’t decide if machine accepts nothing
Equivalence Problem ❌ No Can’t check if two machines accept same language
Universality Problem ❌ No Can’t check if a machine accepts all strings
RECURSIVE LANGUAGE (REC):
 A recursive language (subset of RE) can be decided by
Turing machine which means it will enter into final
state for the strings of language and rejecting state
for the strings which are not part of the language.
 Ex: L= {anbncn|n>=1} is recursive because we can
construct a turing machine which will move to final state
if the string is of the form anbncn else move to non-final
state. So the TM will always halt in this case.
 REC languages are also called as Turing decidable
languages.
RECURSIVE LANGUAGES: 1. REC, 2. RE
Recursive Enumerable (RE) or Type -0 Language: RE
languages or type-0 languages are generated by type-0
grammars.
 An RE language can be accepted or recognized by Turing
machine which means it will enter into final state for the
strings of language and may or may not enter into
rejecting state for the strings which are not part of the
language.
 It means TM can loop forever for the strings which are
not a part of the language. RE languages are also called
as Turing recognizable languages.
THE RELATIONSHIP BETWEEN RE AND REC
LANGUAGES CAN BE
CLOSURE PROPERTIES OF RECURSIVE LANGUAGES
 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.
For Example:
 Kleene Closure: If L1is recursive, its kleene closure L1*
will also be recursive.
For Example:
 Intersection and complement: If L1 and If L2 are two
recursive languages, their intersection L1 ∩ L2 will also be
recursive.
For Example:
UNIVERSAL TURING MACHINE
 The Turing Machine (TM) is the machine level equivalent to
a digital computer.
 It was suggested by the mathematician Turing in the year
1930 and has become the most widely used model of
computation in computability and complexity theory.
 A Turing machine is said to be universal Turing machine if
it can accept:
 The input data, and
 An algorithm (description) for computing.
 The input is given in binary format form on to the machine's
tape and the output consists of the contents of the tape when
the machine halts
A UNIVERSAL TURING MACHINE IS A TURING
MACHINE WHICH WHEN SUPPLIED WITH AN
APPROPRIATE DESCRIPTION OF A TURING
MACHINE M AND AN INPUT STRING W, CAN
SIMULATE THE COMPUTATION OF W.
CONSTRUCTION OF UTM
Without loss of generality, we assume the following for M:
Q = {q1, q2, ….qn} where q1=initial state and q2=Final State
τ = {σ1, σ2,,…σn} where σ represent blanks
Select an encoding on which q1 is representable by 1, q2 by 11,
and so on. Similarly, σ1 is encoded as 1, σ2 as 11, etc.
Finally, let us represent R/W head directions by 1 for L (Left) and
11 for R(Right).
The symbol 0 will be used as a separator between 1s.With this
scheme, any transition of M can be given as :
 The problem with the Turing machine is that a different
machine must be constructed for every new computation to
be performed for every input output relation.
 This is the reason the Universal Turing machine was
introduced which along with input on the tape takes the
description of a machine M.
This machine would have three bits of
information for the machine it is simulating
 A basic description of the machine.
 The contents of machine tape.
 The internal state of the machine.
Representation of a Universal Turing Machine
 The Universal machine would simulate the machine by
looking at the input on the tape and the state of the
machine.
 It would control the machine by changing its state based
on the input. This leads to the idea of a “computer
running another computer”.
 It would control the machine by changing its state based
on the input. This leads to the idea of a “computer
running another computer”
IMPLEMENTATION OF UTM
A UTM Mu then has an input
alphabet = {0, 1} and the structure
of a multi-tape TM.
Mu looks first at the contents of
Tape 2 and Tape 3 to determine
the instantaneous description (ID)
of M.
It then consults Tape1 to see what
M would do with this ID.
Finally, Tape 2 and Tape 3 will be
modified to reflect the result of the
move.
DIFFERENCE BETWEEN UNIVERSAL TURING
MACHINE AND TURING MACHINE
Turing Machine Universal Turing Machine
Turing Machine is a mathematical model of
computation which manipulates symbols on
tape according to the rules defined.
A Universal Turing Machine is similar to a
regular Turing Machine but it has solutions
to all problems that are computable.
Turing machine’s temporary storage is tape.
The infinite cells of the Turing machine can
contain input symbols and blanks.
The Universal Turing Machine takes a
Turing Machine description and an input
string as input, then runs the Turing
Machine on the input and returns the result.
It does not minimize the space complexity It minimizes space complexity
A Turing machine is a formal model of a
computer that runs a predetermined program
The Universal Turing Machine solves
problems that can be computed.
POST CORRESPONDENCE PROBLEM
 The Post Correspondence Problem (PCP), introduced by
Emil Post in 1946, is an undecidable decision problem. The
PCP problem over an alphabet ∑ is stated as follows −
Given the following two lists, M and N of non-empty strings
over ∑ −
M = (x1, x2, x3,………, xn)
N = (y1, y2, y3,………, yn)
We can say that there is a Post Correspondence Solution, if for
some i1,i2,………… ik, where 1 ≤ ij ≤ n, the condition xi1
…….xik = yi1 …….yik satisfies.
Find whether the lists M = (abb, aa, aaa) and N = (bba, aaa, aa)
have a Post Correspondence Solution?
Solution:
x2x1x3 = ‘aaabbaaa’ and y2y1y3 = ‘aaabbaaa’
We can see that
x2x1x3 = y2y1y3
Hence, the solution is i = 2, j = 1, and k = 3.
X1 X2 x3
M abb aa aaa
N bba aaa aa
Find whether the lists M = (ab, bab, bbaaa) and N = (a, ba,
bab) have a Post Correspondence Solution?
Solution:
In this case, there is no solution because −
| x2x1x3 | ≠ | y2y1y3 | (Lengths are not same) Hence, it
can be said that this Post Correspondence Problem is
undecidable.
X1 X2 x3
M ab bab bbaaa
N a ba bab

Decidability and UndecidabilityFLAT.pptx

  • 1.
    UNIT-5 Types of Turingmachine: Turing machines and halting Undecidability: Undecidability, A Language that is Not Recursively Enumerable, An Undecidable Problem That is RE, Undecidable Problems about Turing Machines, Recursive languages, Properties of recursive languages, Post's Correspondence Problem, Modified Post Correspondence problem, Other Undecidable Problems, Counter machines.
  • 2.
    TYPES/ VARIANTS OFTURING MACHINE 1. Two-way infinite Tape Turing Machine 2. Multi-tape Turing Machine 3. Non-deterministic Turing Machine 4. Multi-dimensional Tape Turing Machine 5. Multi-head Turing Machine 6. Offline Turing Machine 7. Multiple track Turing Machine
  • 3.
    1. TWO-WAY INFINITETAPE TURING MACHINE  A two-way infinite tape Turing machine allows the tape to extend infinitely in both directions, unlike the standard machine where the tape extends infinitely in only one direction.  This removes the boundary on the left side of the tape.
  • 4.
    EXAMPLE L = {w {a, b}* | w has the same number of a’s to the ∈ left and right of a central marker # }
  • 5.
    KEY DIFFERENCE FROMSTANDARD TURING MACHINE Feature Standard Turing Machine Two-Way Infinite Tape Tape direction Infinite to the right Infinite both ways Left-end restriction Cannot move past left end No boundary at all Power Equal (same languages) Equal Simpler algorithms? Sometimes Yes (can simplify logic)
  • 6.
    2. MULTI-TAPE TURINGMACHINE  It has multiple tapes and controlled by a single head.  The Multi-tape Turing machine is different from k- track Turing machine but expressive power is same.  Multi-tape Turing machine can be simulated by single-tape Turing machine EX: Palindrome String: The heads start at both ends of the string and move towards each other, checking if the corresponding symbols are identical.
  • 7.
    EXAMPLE L = {ww | w {a, b}* } This language contains any string ∈ repeated twice, like abbaabba
  • 8.
    BENEFITS OF MULTI-TAPEMACHINES, SINGLE TAPE , TWO WAY INFINITE Feature Single-Tape Multi-Tape Two-Way Infinite Tape Tapes 1 2 or more 1 Tape Direction Infinite right only Infinite right only Infinite both directions Heads 1 1 per tape 1 Power (Language Capability) Same Same Same Speed Slower Faster (more efficient) Similar to single-tape Design Simplicity Basic Easier for complex logic Easier for symmetric designs Ideal Use Teaching, theory Efficient algorithms, copying Palindromes, symmetry checks
  • 9.
    3. NON-DETERMINISTIC TURING MACHINE A non-deterministic Turing machine has a single, one way infinite tape.  For a given state and input symbol has atleast one choice to move (finite number of choices for the next move), each choice several choices of path that it might follow for a given input string.  A non-deterministic Turing machine is equivalent to deterministic Turing machine.
  • 10.
    EXAMPLE L = {w {a, b}* | w contains a substring "aba" } ∈
  • 11.
    4. MULTI-DIMENSIONAL TAPETURING MACHINE  It has multi-dimensional tape where head can move any direction that is left, right, up or down.  Multi dimensional tape Turing machine can be simulated by one- dimensional Turing machine
  • 12.
  • 13.
    COMPARISON TABLE Feature 1DTuring Machine 2D/3D Turing Machine Tape Structure Linear (one row) Grid or cube (2D/3D) Head Movement Left/Right Up, Down, Left, Right (and more) Suitable for Strings, linear problems Grid problems, 2D patterns, simulations Language Power Equivalent Equivalent Design Complexity Easier Higher Simulation of 2D by 1D Possible but slower Native and efficient
  • 14.
    5. MULTI-HEAD TURINGMACHINE  A multi-head Turing machine contain two or more heads to read the symbols on the same tape.  In one step all the heads sense the scanned symbols and move or write independently.  Multi-head Turing machine can be simulated by single head Turing machine.
  • 15.
    EXAMPLE L = {ww | w {a, b}* } This is the set of strings where the ∈ first half is exactly the same as the second half — e.g., abbaabba
  • 16.
    6. OFFLINE TURINGMACHINE  An "offline" Turing Machine, also known as a multi-tape Turing Machine, utilizes multiple tapes to process input. One tape acts as the input (read-only) and another as a working tape for manipulation.  This contrasts with a standard single-tape Turing Machine where input and work are on the same tape.
  • 17.
    EXAMPLE L = {w {a, b}* | w has equal number of a's and b's } ∈
  • 18.
    7. MULTIPLE TRACKTURING MACHINE  A k-tack Turing machine(for some k>0) has k-tracks and one R/W head that reads and writes all of them one by one.  A k-track Turing Machine can be simulated by a single track Turing machine
  • 19.
    EXAMPLE L = {ww^R | w {a, b}* } This is the set of strings that are ∈ followed by their reverse, like abbaabba
  • 20.
    COMPARISON TABLE Type WhatIt Is Special Feature Purpose / Why It's Useful Basic TM Single tape, one head Can read/write and move left/right Base model for computation Two-way Infinite TM Tape goes infinitely in both directions No left-end limit Easier handling of input growing both ways Multi-Tape TM Multiple tapes with one head each Can read/write on all tapes in one step Faster, handles complex tasks in fewer steps Multi-Track TM One tape, divided into several "layers" or rows Each cell stores multiple symbols Stores extra info like marks, counters Offline TM Two tapes: input tape (read-only), and work tape (read/write) Input cannot be changed Keeps input safe, useful in parsing or compilers Multi-Head TM One tape, but multiple heads Reads/writes in different positions Faster comparisons, scanning multiple areas Multi-Dimensional TM Tape is a 2D grid or 3D block Moves in 4 or more directions Solves problems on grids/images/matrices easily Non-Deterministic TM Can try many paths at once from a state Multiple possible moves Theoretical model to explore hard problems (like NP)
  • 21.
    DECIDABLE PROBLEMS  Aproblem is said to be Decidable if we can always construct a corresponding algorithm that can answer the problem correctly.  Decidability in terms of a Turing machine, a problem is said to be a Decidable problem if there exists a corresponding Turing machine which halts on every input with an answer- yes or no.  It is also important to know that these problems are termed as Turing Decidable since a Turing machine always halts on every input, accepting or rejecting it.
  • 22.
    WE WILL NOWCONSIDER FEW IMPORTANT DECIDABLE PROBLEMS  Are two regular languages L and M equivalent? We can easily check this by using Set Difference operation. L-M =Null and M-L =Null. Hence (L-M) U (M-L) = Null, then L,M are equivalent.  Membership of a CFL? We can always find whether a string exists in a given CFL by using an algorithm based on dynamic programming.  Emptiness of a CFL By checking the production rules of the CFL we can easily state whether the language generates any strings or not.
  • 23.
    SEMI- DECIDABLE PROBLEMS Semi-Decidable problems are those for which a Turing machine halts on the input accepted by it but it can either halt or loop forever on the input which is rejected by the Turing Machine. Such problems are termed as Turing Recognizable problems.
  • 24.
    UNDECIDABLE PROBLEMS  Theproblems for which we can’t construct an algorithm that can answer the problem correctly in finite time are termed as Undecidable Problems. These problems may be partially decidable but they will never be decidable.  That is, there will always be a condition that will lead the Turing Machine into an infinite loop without providing an answer at all.  Simply, A problem is undecidable if there is no Turing machine which will always halt in finite amount of time to give answer as ‘yes’ or ‘no’. An undecidable problem has no algorithm to determine the answer for a given input.
  • 25.
    UNDECIDABLE PROBLEMS ABOUTTURING MACHINE  Ambiguity of context-free languages: Given a context-free language, there is no Turing machine which will always halt in finite amount of time and give answer whether language is ambiguous or not.  Equivalence of two context-free languages: Given two context-free languages, there is no Turing machine which will always halt in finite amount of time and give answer whether two context free languages are equal or not.  Everything or completeness of CFG: Given a CFG and input alphabet, whether CFG will generate all possible strings of input alphabet (∑*)is undecidable.  Regularity of CFL, CSL, REC and REC: Given a CFL, CSL, REC or REC, determining whether this language is regular is undecidable
  • 26.
    UNDECIDABLE PROBLEMS ABOUTTURING MACHINES Problem Decidable? Explanation Halting Problem ❌ No Can’t predict if a machine halts on all inputs Acceptance Problem ❌ No Can’t decide if machine accepts a string Emptiness Problem ❌ No Can’t decide if machine accepts nothing Equivalence Problem ❌ No Can’t check if two machines accept same language Universality Problem ❌ No Can’t check if a machine accepts all strings
  • 27.
    RECURSIVE LANGUAGE (REC): A recursive language (subset of RE) can be decided by Turing machine which means it will enter into final state for the strings of language and rejecting state for the strings which are not part of the language.  Ex: L= {anbncn|n>=1} is recursive because we can construct a turing machine which will move to final state if the string is of the form anbncn else move to non-final state. So the TM will always halt in this case.  REC languages are also called as Turing decidable languages. RECURSIVE LANGUAGES: 1. REC, 2. RE
  • 28.
    Recursive Enumerable (RE)or Type -0 Language: RE languages or type-0 languages are generated by type-0 grammars.  An RE language can be accepted or recognized by Turing machine which means it will enter into final state for the strings of language and may or may not enter into rejecting state for the strings which are not part of the language.  It means TM can loop forever for the strings which are not a part of the language. RE languages are also called as Turing recognizable languages.
  • 29.
    THE RELATIONSHIP BETWEENRE AND REC LANGUAGES CAN BE
  • 30.
    CLOSURE PROPERTIES OFRECURSIVE LANGUAGES  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. For Example:
  • 31.
     Kleene Closure:If L1is recursive, its kleene closure L1* will also be recursive. For Example:  Intersection and complement: If L1 and If L2 are two recursive languages, their intersection L1 ∩ L2 will also be recursive. For Example:
  • 32.
    UNIVERSAL TURING MACHINE The Turing Machine (TM) is the machine level equivalent to a digital computer.  It was suggested by the mathematician Turing in the year 1930 and has become the most widely used model of computation in computability and complexity theory.  A Turing machine is said to be universal Turing machine if it can accept:  The input data, and  An algorithm (description) for computing.  The input is given in binary format form on to the machine's tape and the output consists of the contents of the tape when the machine halts
  • 33.
    A UNIVERSAL TURINGMACHINE IS A TURING MACHINE WHICH WHEN SUPPLIED WITH AN APPROPRIATE DESCRIPTION OF A TURING MACHINE M AND AN INPUT STRING W, CAN SIMULATE THE COMPUTATION OF W.
  • 34.
    CONSTRUCTION OF UTM Withoutloss of generality, we assume the following for M: Q = {q1, q2, ….qn} where q1=initial state and q2=Final State τ = {σ1, σ2,,…σn} where σ represent blanks Select an encoding on which q1 is representable by 1, q2 by 11, and so on. Similarly, σ1 is encoded as 1, σ2 as 11, etc. Finally, let us represent R/W head directions by 1 for L (Left) and 11 for R(Right). The symbol 0 will be used as a separator between 1s.With this scheme, any transition of M can be given as :
  • 35.
     The problemwith the Turing machine is that a different machine must be constructed for every new computation to be performed for every input output relation.  This is the reason the Universal Turing machine was introduced which along with input on the tape takes the description of a machine M. This machine would have three bits of information for the machine it is simulating  A basic description of the machine.  The contents of machine tape.  The internal state of the machine. Representation of a Universal Turing Machine
  • 36.
     The Universalmachine would simulate the machine by looking at the input on the tape and the state of the machine.  It would control the machine by changing its state based on the input. This leads to the idea of a “computer running another computer”.  It would control the machine by changing its state based on the input. This leads to the idea of a “computer running another computer”
  • 37.
    IMPLEMENTATION OF UTM AUTM Mu then has an input alphabet = {0, 1} and the structure of a multi-tape TM. Mu looks first at the contents of Tape 2 and Tape 3 to determine the instantaneous description (ID) of M. It then consults Tape1 to see what M would do with this ID. Finally, Tape 2 and Tape 3 will be modified to reflect the result of the move.
  • 38.
    DIFFERENCE BETWEEN UNIVERSALTURING MACHINE AND TURING MACHINE Turing Machine Universal Turing Machine Turing Machine is a mathematical model of computation which manipulates symbols on tape according to the rules defined. A Universal Turing Machine is similar to a regular Turing Machine but it has solutions to all problems that are computable. Turing machine’s temporary storage is tape. The infinite cells of the Turing machine can contain input symbols and blanks. The Universal Turing Machine takes a Turing Machine description and an input string as input, then runs the Turing Machine on the input and returns the result. It does not minimize the space complexity It minimizes space complexity A Turing machine is a formal model of a computer that runs a predetermined program The Universal Turing Machine solves problems that can be computed.
  • 39.
    POST CORRESPONDENCE PROBLEM The Post Correspondence Problem (PCP), introduced by Emil Post in 1946, is an undecidable decision problem. The PCP problem over an alphabet ∑ is stated as follows − Given the following two lists, M and N of non-empty strings over ∑ − M = (x1, x2, x3,………, xn) N = (y1, y2, y3,………, yn) We can say that there is a Post Correspondence Solution, if for some i1,i2,………… ik, where 1 ≤ ij ≤ n, the condition xi1 …….xik = yi1 …….yik satisfies.
  • 40.
    Find whether thelists M = (abb, aa, aaa) and N = (bba, aaa, aa) have a Post Correspondence Solution? Solution: x2x1x3 = ‘aaabbaaa’ and y2y1y3 = ‘aaabbaaa’ We can see that x2x1x3 = y2y1y3 Hence, the solution is i = 2, j = 1, and k = 3. X1 X2 x3 M abb aa aaa N bba aaa aa
  • 41.
    Find whether thelists M = (ab, bab, bbaaa) and N = (a, ba, bab) have a Post Correspondence Solution? Solution: In this case, there is no solution because − | x2x1x3 | ≠ | y2y1y3 | (Lengths are not same) Hence, it can be said that this Post Correspondence Problem is undecidable. X1 X2 x3 M ab bab bbaaa N a ba bab