Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jaya Krishna, M.Tech, Assistant Professor

Similar presentations


Presentation on theme: "Jaya Krishna, M.Tech, Assistant Professor"— Presentation transcript:

1 Jaya Krishna, M.Tech, Assistant Professor
UNIT-VII 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

2 Jaya Krishna, M.Tech, Assistant Professor
INTRODUCTION Undecidable specific problems that cannot solve using a computer introduce a respected formalism for computers Turing Machines 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

3 Jaya Krishna, M.Tech, Assistant Professor
TURING MACHINE purpose of the theory of undecidable problems guidance to programmers what they might or might not be able to accomplish through programming need tools that will allow us to prove everyday questions undecidable or intractable. Decidable  require large amount of time to solve them 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

4 Jaya Krishna, M.Tech, Assistant Professor
TURING MACHINE As a result we need to rebuild our theory of undecidability based not on programs in C or another language based on a very simple model of a computer called TM. Essentially a Finite Automata that has a single tape of infinite length which it may read and write data. 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

5 Jaya Krishna, M.Tech, Assistant Professor
MODEL OF TM Input finite length string of symbols chosen from Σ (placed on tape) Blank (tape symbol not i/p symbol) All other tape cells, extending infinitely to the left and right, initially hold a special symbol. tape head positioned at one of the tape cells  scanning that cell 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

6 Jaya Krishna, M.Tech, Assistant Professor
TURING MACHINE Initially the tape head is at the left most cells that hold the input. Move a function of the state of the finite control and the tape symbol scanned. In one move, TM will be Change state Write a tape symbol in the cell scanned Move the tape head left or right 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

7 Formal Notation of TURING MACHINE
Similar to that used for FA or PDA’s. M = (Q, Σ, Γ, δ, q0, B, F) Q: Finite set of states Σ: Finite set of i/p symbols Γ: complete set of tape symbols Σ subset of Γ δ: transition function δ = Q / F x Γ  Q x Γ x {L, R} δ(q, X) State Tape symbol 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

8 Formal Notation of TURING MACHINE
Value of δ(q, X) if defined A triple  i.e. (p, Y, D) Next state in Q Symbol in Γ Direction either L or R (left or right) q0: start state B: blank symbol F: set of final or accepting states 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

9 INSTANTANEOUS DESCRIPTION
TM in principle an infinitely long tape after any finite number of moves TM can have visited only a finite number of cells cells visited can eventually grow beyond any finite limit Thus in every ID infinite prefix and an infinite suffix of that cells that have never been visited. Under a special condition head is scanning one of the leading or trailing blanks a finite number of blanks to the left or right of the nonblank portion of the tape must also be included in the ID 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

10 INSTANTANEOUS DESCRIPTION
it is easy to change the names of the states so they have nothing in common with the tape symbols So Use string X1X Xi-1qXiXi Xn to represent ID q is the state of the Turing machine tape head is scanning ith symbol from the left X1X Xn portion of the tape b/n the leftmost and the rightmost nonblank. 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

11 INSTANTANEOUS DESCRIPTION
M = (Q, Σ, Γ, δ, q0, B, F) Describe by notation Suppose δ(q, Xi) = (p, Y, L) Next  Leftward move then X1 X Xi-1 q Xi Xi Xn X1 X Xi-2 p Xi-1 Y Xi Xn how this move reflects the change to state p? 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

12 INSTANTANEOUS DESCRIPTION
Two important exceptions: If i = 1, then M moves the blank to the left of X1. In that case, X1X Xn pBYX Xn If i = n and Y = B then X1X Xn-1 q Xn X1X Xn-2 p Xn-1 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

13 INSTANTANEOUS DESCRIPTION
suppose δ(q, Xi) = (p, Y, R) next move is rightward X1 X Xi-1 q Xi Xi Xn X1 X Xi-1 Y p Xi Xn Two exceptions If i = n, then i+1st cell holds a blank X1 X Xn-1 q Xn X1 X Xn-1 Y p B If i = 1 and Y =B q X1 X Xn p X Xn 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

14 Jaya Krishna, M.Tech, Assistant Professor
Example Let us design a TM accept the language consisting of all palindromes of 0’s and 1’s. Initially it is given a finite sequence of 0’s and 1’s on its tape, preceded and followed by infinity of blanks. Starting at the left end checks the first symbol of the input 0, changes it to X 1, changes it to Y & moves right until it sees a blank. 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

15 Jaya Krishna, M.Tech, Assistant Professor
Example Now it moves left and checks whether the symbol read matches the one most recently changed. machine move back left until it finds the leftmost 0 or 1 continued by moving left and right alternately until all 0’s and 1’s have been matched. input is not a palindrome TM halts 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

16 Jaya Krishna, M.Tech, Assistant Professor
Example Consider M = ({q0, q1, q2, q3, q4, q5, q6}, {0, 1}, {0, 1, X, Y, B}, δ, q0, B, {q6}) δ State 1 X Y B q0 (q1, X, R) (q2, Y, R) (q6, X, R) (q6, Y, R) (q6, B, R) q1 (q1, 0, R) (q1, 1, R) (q3, X, L) (q3, Y, L) (q3, B, L) q2 (q2, 0, R) (q2, 1, R) (q4, X, L) (q4, Y, L) (q4, B, L) q3 (q5, X, L) - q4 (q5, Y, L) q5 (q5, 0, L) (q5, 1, L) (q0, X, R) (q0, Y, R) 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

17 Jaya Krishna, M.Tech, Assistant Professor
Example q01001 Ⱶ Yq2001 Ⱶ Y0q201 Ⱶ Y00q21 Ⱶ Y001q2 Ⱶ Y00q41 Ⱶ Y00q5Y Ⱶ Y0q50Y Ⱶ Yq500Y Ⱶ q5Y00Y Ⱶ Yq000Y Ⱶ YXq10Y Ⱶ YX0q1Y Ⱶ YXq30Y Ⱶ YXq5XY Ⱶ Yq5XXY Ⱶ YXq0XY Ⱶ Yq6XXY 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

18 DESIGN OF TURING MACHINE
We can represent the transitions of a Turing machine pictorially much as we did for the PDA. Nodes  states of TM arc from state q to state p labeled by X/Y D X & Y  tape symbols D  direction (Left or Right) 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

19 DESIGN OF TURING MACHINE
i.e. δ(q, X) = (p, Y, D) Here D is pictorially represented as follows: Left “” Right “” 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

20 Jaya Krishna, M.Tech, Assistant Professor
Example 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

21 Jaya Krishna, M.Tech, Assistant Professor
COMPUTABLE FUNCTION Computable functions are the basic objects of study in computability theory used to discuss computability without referring to any concrete model of computation such as Turing machines or register machines. Any definition, however, must make reference to some specific model of computation but all valid definitions yield the same class of functions. 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

22 Jaya Krishna, M.Tech, Assistant Professor
COMPUTABLE FUNCTION Informal term  effectively calculable come to be identified with the computable functions. effective computability of these functions does not imply that they can be efficiently computed algorithm that computes them will be very inefficient running time of the algorithm increases exponentially with the length of the input. Calculated using mechanical calculating device Unlimited amount of storage and time. 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

23 Jaya Krishna, M.Tech, Assistant Professor
COMPUTABLE FUNCTION The basic characteristic of a computable function finite procedure (an algorithm) telling how to compute the function. 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

24 RECURSIVELY ENUMERABLE LANGUAGES
A language is computably enumerable there is a computable function f such that f(w) is defined if and only if the word w is in the language 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

25 Jaya Krishna, M.Tech, Assistant Professor
CHURCH HYPOTHESIS David Hilbert (1900)  mathematician International congress of mathematicians (Paris) Listed some problems in his lecture tenth problem Devise the algorithm to test whether a polynomial has an integral root. no algorithm exists for this task; it is algorithmically unsolvable. 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

26 Jaya Krishna, M.Tech, Assistant Professor
CHURCH-TURING THESIS 1936 papers of Alonzo Church and Alan Turing notational system called the λ-calculus to define algorithms did it with his machines Church-Turing thesis a statement that characterizes the nature of computation and cannot be formally proven 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

27 Jaya Krishna, M.Tech, Assistant Professor
COUNTER MACHINES may be thought of in one of the two ways: has the same structure as the multistack machine but in place of each stack is a counter. In one move the counter machine can: Change state Add or subtract 1 from any of its counters independently But Not allowed to become negative May be regarded as a restricted multistack machine. 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

28 Jaya Krishna, M.Tech, Assistant Professor
COUNTER MACHINES restrictions are as follows: only two stack symbols (Z0 and X) Bottom of the stack marker Z0 is initially on each stack We may replace Z0 only by a string of the form XiZ0 for some i ≥ 0. We may replace X only by Xi for some i ≥ 0. 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor

29 TYPES OF TURING MACHINES
Two way infinite tape Multitape Turing machines Non deterministic Turing machines Two-dimensional Turing machines Multihead Turing machines 11/18/2018 Jaya Krishna, M.Tech, Assistant Professor


Download ppt "Jaya Krishna, M.Tech, Assistant Professor"

Similar presentations


Ads by Google