Download presentation
Presentation is loading. Please wait.
Published byGarey Wright Modified over 9 years ago
1
Turing Machines Lecture 26 Naveen Z Quazilbash
2
Overview Introduction Turing Machine Notation Turing Machine Formal Notation Transition Function Instantaneous Descriptions (IDs) Moves of a Turing Machine Example from Handout
3
Introduction Notion for “any possible computation.” Predicate calculus—declarative rather than being computational. Partial recursive functions—programming- language-like-notation. Turing Machine—computer-like model of computation rather than program-like.
4
Introduction -(2) Turing Machines: – A mathematical model of a general-purpose computer (with infinite memory) – Mainly used to study the notion of computation (what computers can and can’t do) The Church-Turing Thesis: Every function which would naturally be regarded as ‘computable’ can be computed by a Turing Machine.
5
Turing Machine-Notation We may visualize a Turing Machine as in above figure. The machine consists of a finite control, which can be in any of a finite set of states. There is a tape divided into squares or cells; each cell can hold any one of a finite number of symbols.
6
Turing Machine-Notation-(2) Initially, the input, which is a finite-length string of symbols chosen from the input alphabet, is placed on the tape. All other tape cells, extending infinitely to the left and right, initially hold a special symbol called the blank.
7
Turing Machine-Notation-(3) The blank is a tape symbol, but not an input symbol, and there may be other tape symbols besides the input symbols and the blank, as well. There is a tape head that is always positioned at one of the tape cells. Turing machine is said to be scanning that cell. Initially, the tape head is at the leftmost cell that holds the input.
8
Turing Machine-Notation-(4) A move of a Turing machine (TM) is a function of the state of the finite control and the tape symbol just scanned. In one move, the Turing machine will: 1. Change state. 2. Write a tape symbol in the cell scanned. 3. Move the tape head left or right.
9
Turing Machine-Formal Notation Formally, a Turing machine is a 7-tuple M = (Q, ∑, Γ, δ, q 0,B, F) where: 1.Q : The finite set of states of the finite control. 2.∑ : The finite set of input symbols. 3.Γ : The finite set of tape symbols; ∑ Γ. 4.δ : The transition function. 5.q 0 ϵ Q is the start state. 6.B ϵ Γ is the blank symbol; B ϵ ∑. 7.F µ Q is the set of final or accepting states.
10
The transition function The arguments of δ(q, X) are a state q and a tape symbol X. The value of δ(q, X), if it is defined, is a triple (p, Y, D), where, p is the next state in Q. Y is the symbol, in Γ, written in the cell being scanned, replacing whatever symbol was there. D is a direction, either L or R, standing for “left” or “right”, respectively, and telling us the direction in which the head moves.
11
Turing Machine-Instantaneous Descriptions (IDs) A Turing machine changes its configuration upon each move. We use instantaneous descriptions (IDs) for describing such configurations. An instantaneous description is a string of the form X 1 X 2 · · ·X i−1 qX i X i+1 · · ·X n where, 1.q is the state of the Turing machine. 2.The tape head is scanning the i th symbol from the left. 3.X 1 X 2 · · ·X n is the portion of the tape between the leftmost and rightmost nonblanks.
12
Moves of a Turing Machine We use |-- M to designate a move of a Turing machine M from one ID to another. If δ(q, X i ) = (p, Y, L), then: X 1 X 2 · · ·X i−1 qX i X i+1 · · ·X n |-- M X 1 X 2 · · ·X i−2 pX i−1 Y X i+1 · · ·X n If δ(q, X i ) = (p, Y, R), then: X 1 X 2 · · ·X i−1 qX i X i+1 · · ·X n |-- M X 1 X 2 · · ·X i−1 Y pX i+1 · · ·X n
13
Moves of a Turing Machine The reflexive-transitive closure of |-- M is denoted by |--* M.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.