UTD CS 4384 - Lecture 16 Deterministic Turing Machine (DTM)

Unformatted text preview:

Lecture 16 Deterministic Turing Machine DTM tape head Finite Control a l p h a B e The tape has the left end but infinite to the right It is divided into cells Each cell contains a symbol in an alphabet There exists a special symbol B which represents the empty cell a The head scans at a cell on the tape and can read erase and write a symbol on the cell In each move the head can move to the right cell or to the left cell or stay in the same cell The finite control has finitely many states which form a set Q For each move the state is changed according to the evaluation of a transition function Q x Q x x R L b a q p q a p b L means that if the head reads symbol a and the finite control is in the state q then the next state should be p the symbol a should be changed to b and the head moves one cell to the left a q b p q a p b R means that if the head reads symbol a and the finite control is in the state q then the next state should be p the symbol a should be changed to b and the head moves one cell to the right s There are some special states an initial state s and an final states h Initially the DTM is in the initial state and the head scans the leftmost cell The tape holds an input string x h When the DTM is in the final state the DTM stops An input string x is accepted by the DTM if the DTM reaches the final state h Otherwise the input string is rejected The DTM can be represented by M Q s where is the alphabet of input symbols The set of all strings accepted by a DTM M is denoted by L M We also say that the language L M is accepted by M The transition diagram of a DTM is an alternative way to represent the DTM For M Q s the transition diagram of M is a symbol labeled digraph G V E satisfying the following V Q s E p a b D h q p a q b D 1 1 R 0 0 R 1 1 R 0 0 R s 0 0 R p q B B R h 1 1 R M Q s where Q s p q h 0 1 0 1 B s p q 0 1 p 0 R s 1 R q 0 R s 1 R q 0 R q 1 R L M 0 1 00 0 1 B h B R Theorem Every regular set can be accepted by a DTM Proof Every regular set can be accepted a deterministic finite automata DFA Every DFA can be simulated by a DTM Review on Regular Set Regular sets on an alphabet is defined recursively as follows 1 The empty set is a regular set 2 For every symbol a in a is a regular set 3 If A and B are regular sets then A B A U B and A are all regular sets Review on DFA tape a b c d head finite control e f The tape is divided into cells Each cell contains a symbol in an alphabet The head scans at a cell on the tape and can read symbol from the cell It can also move from left to right one cell per move The finite control has finitely many states which form a set Q For each move the state is changed according to the evaluation of a function Q x Q If the head reads symbol a and the finite control is in the state q then the next state is p q a There are some special states an initial state s and some final states which form a set F The DFA can be represented by M Q s F Initially the DFA is in the initial state and the head scans the leftmost cell The tape holds an input string x When the head moves off the tape the DFA stops An input string is accepted by the DFA if the DFA stops in a final state Otherwise the input string is rejected Simulate DFA by DTM Given a DFA M Q s F we can construct a DTM M Q s to simulate M as follows Q Q U h U B If q a p then q a p a R q B h B R for q in F 1 1 R 0 0 R 1 1 R 0 0 R s 0 0 R p B B R q h 1 1 R 1 s 0 1 0 0 p 1 L M 0 1 00 0 1 q Turing acceptable languages Regular languages Why DTM can accept more languages than DFA Because The head can move in two directions No The head can erase No The head can erase write and move in two directions Yes What would happen if the head can read erase and write but move in one direction Lecture 17 Examples of DTM Configuration q x1 xi 1 xixi 1 xn represents DTM at an time that the final control is in state q the tape holds string x1 xn and the head reads xi If q a p b R then write q x a cy p xbc y If q a p b L then write q xc a y p xcby Example 1 Construct DTM starting from configuration s x1x 2 xn and ending with h Bx1 xn B s 0110B q0 B110B q1 B010B q1 B010B q0 B011B h B0110B Remark We may assume that every DTM has initial configuration s Bx1 xn B Turing acceptable Consider DTM M Q s An input string x is accepted by M if s Bx B h L M x x is accepted by M ww R w 0 1 is Turing acceptable s B0110B q B0110B q0 B011BB q0 B011B p0 B011B ok BB11B ok B11B q B11B q1 B1BB q1 B1B p1 B1B ok BBB q BBB h BBB Could we do ok BBB h BBB L ww R w in 0 1 Turing Computable Functions A total function f is Turingcomputable if there exists a DTM M such that for every x in s BxB h Bf x B A partial f is Turing computable if there exists a DTM M such that L M and for every x in s BxB h Bf x B The following function f is Turing computable R f x w if x ww otherwise s B0110B q B0110B q0 B011BB q0 B011B p0 B011B ok B0 11B ok B0 11B q B0 11B q1 B0 1BB q1 B0 1B p1 B0 1B ok B0 1 B q B0 1 B r B0 1B r B01B o B01B o B01B k B01BB h B01B R f x w if x ww otherwise Turing decidable A language …


View Full Document

UTD CS 4384 - Lecture 16 Deterministic Turing Machine (DTM)

Download Lecture 16 Deterministic Turing Machine (DTM)
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 16 Deterministic Turing Machine (DTM) and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 16 Deterministic Turing Machine (DTM) 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?