Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 34

Turing Machine-Theoretical

questions
Church Turing Thesis
• This hypothesis states that any computation that
can be carried out by mechanical means can be
performed by some Turing machine.
• This is a sweeping statement, so it is important to
keep in mind what Turing's thesis is.
• It is not something that can be proved. To do so,
we would have to define precisely the term
“mechanical means.”
• Some arguments for accepting the Turing thesis as the definition
of a mechanical computation are:
• 1. Anything that can be done on any existing digital computer
can also be done by a Turing machine.
• 2. No one has yet been able to suggest a problem, solvable by
what we intuitively consider an algorithm, for which a Turing
machine program cannot be written.
• 3. Alternative models have been proposed for mechanical
computation, but none of them is more powerful than the Turing
machine model.
The Post Correspondence
Problem
• The Post correspondence problem can be stated as follows.
Given two sequences of n strings on some alphabet Σ, say
A = w1,w2,…wn
B = v1,v2,…,vn,
• we say that there exists a Post correspondence solution
(PC-solution) for pair (A,B) if there is a nonempty
sequence of integers i,j,…,k, such that
• wiwj…wk = vivj…vk.
Final Solution - 2 1 1 3 String made by numerators: 101111110 String made by denominators: 101111110

• A=[aa, bb, abb] and B=[aab,


ba, b]
• Solution is 1,2,1,3 Final Solution - 2 1 1 3 String
made by numerators:
101111110 String made by
denominators: 101111110
Solution is 2113
No PCP as |wi| > |vi|
Modified PCP
• modified Post correspondence problem
w1wiwj…wk = vlvivj…vk.
Recursive Language and
Recursive Enumerable language
• 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.
• 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. e.g.; L= {a nbncn|
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. The relationship between
RE and REC languages can be shown in Figure 1.
Decidable problem
• A problem with two answers (Yes/No) is
decidable if the
• corresponding language is recursive. In this
case, the language L is also called
decidable.
Turing Machine as Computer of
Integer Function
• Turing machine can compute functions, like y = f(x).
Initially a value corresponding to x is put on the tape, and
Turing machine is run. after having performed the
computations, the result f (x) will replace the original
value, and head returns to begin. The input is usually
represented in unary format.
Universal TM
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.
The Universal Turing machine can go on then to simulate M on the rest of
the content of the input tape.
A Universal Turing machine can thus simulate any other machine.
•The idea of connecting multiple Turing machine gave an idea to Turing

•Can a Universal machine be created that can ‘simulate’ other machines?
•This machine is called as Universal Turing Machine
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.
•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”.
Halting Problem of TM
The Halting problem –
Given a program/algorithm will ever halt or not?
Halting means that the program on certain input will accept it
and halt or reject it and halt and it would never go into an
infinite loop. Basically halting means terminating. So can we
have an algorithm that will tell that the given program will
halt or not. In terms of Turing machine, will it terminate
when run on some machine with some particular given input
string.
• The answer is no we cannot design a generalized algorithm which can
appropriately say that given a program will ever halt or not?
The only way is to run the program and check whether it halts or not.
We can refrain the halting problem question in such a way also: Given
a program written in some programming language(c/c++/java) will it
ever get into an infinite loop(loop never stops) or will it always
terminate(halt)?
• This is an undecidable problem because we cannot have an algorithm
which will tell us whether a given program will halt or not in a
generalized way i.e. by having specific program/algorithm. In general
we can’t always know that’s why we can’t have a general algorithm.
The best possible way is to run the program and see whether it halts or
not. In this way for many programs we can see that it will sometimes
loop and always halt.
Variant of TM
Multi-tape and Nondeterministic
Homomorphism
• Homomorphism: A homomorphism on an alphabet is a
function that gives a string for each symbol in that
alphabet. Example: h(0) = ab; h(1) = . Extend to strings
by h(a1…an) =h(a1)…h(an). Example: h(01010) = ababab.
If L is a regular language, and h is a homomorphism on its
alphabet, then h(L)= {h(w) | w is in L} is also a regular
language.
• Proof: Let E be a regular expression for L. Apply h to
each symbol in E. Language of resulting R, E is h(L).
Inverse Homomorphism
• Inverse Homomorphism : Let h be a
homomorphism and L a language whose
alphabet is the output language of h -1(L) =
{w | h(w) is in L}.
Myhill-Nerode Theorem for
Minimization of DFA
• Myhill-Nerode theorem can be used to convert a DFA to
its equivalent DFA with minimum no. of states.
• This method of minimization is also called table filling
method.
Step-3 Step-4

Step-5 Step-6
Combine Q1, Q2 and
Q3, Q4
Minimized DFA
Closure property of CFL

You might also like