Cs133 lec09

Page 1

Introduction

Definition

Variants of Turing Machines

CS 133 : Automata Theory and Computability Turing Machines Henry N. Adorna Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University of the Philippines, Diliman {hnadorna,nshernandez}@dcs.upd.edu.ph

LEC 9


Introduction

Definition

Turing Machines

Introduction

Definition

Variants of Turing Machines

Variants of Turing Machines


Introduction

Recall:

Definition

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

Recall: • FA are good models for devices that have a small amount of

memory.


Introduction

Definition

Variants of Turing Machines

Recall: • FA are good models for devices that have a small amount of

memory. • PDA are good models for devices that have an unlimited memory

that is usable only in the last in, first out manner of a stack.


Introduction

Definition

Variants of Turing Machines

Recall: • FA are good models for devices that have a small amount of

memory. • PDA are good models for devices that have an unlimited memory

that is usable only in the last in, first out manner of a stack. • BUT some very simple tasks are beyond the capabilities of these

models.


Introduction

Definition

Variants of Turing Machines

Recall: • FA are good models for devices that have a small amount of

memory. • PDA are good models for devices that have an unlimited memory

that is usable only in the last in, first out manner of a stack. • BUT some very simple tasks are beyond the capabilities of these

models. Hence they are too restricted to serve models of general purpose computers.


Introduction

Turing Machines

Definition

Variants of Turing Machines


Introduction

Definition

Turing Machines • first proposed by Alan Turing in 1936

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

Turing Machines • first proposed by Alan Turing in 1936 • similar to a finite automaton but with an unlimited and

unrestricted memory


Introduction

Definition

Variants of Turing Machines

Turing Machines • first proposed by Alan Turing in 1936 • similar to a finite automaton but with an unlimited and

unrestricted memory • a much more accurate model of a general purpose computer • A Turing machine can do


Introduction

Definition

Variants of Turing Machines

Turing Machines • first proposed by Alan Turing in 1936 • similar to a finite automaton but with an unlimited and

unrestricted memory • a much more accurate model of a general purpose computer • A Turing machine can do EVERYTHING THAT A REAL

COMPUTER CAN DO.


Introduction

Definition

Variants of Turing Machines

Turing Machines • first proposed by Alan Turing in 1936 • similar to a finite automaton but with an unlimited and

unrestricted memory • a much more accurate model of a general purpose computer • A Turing machine can do EVERYTHING THAT A REAL

COMPUTER CAN DO. • BUT even a Turing machine cannot solve certain problems.


Introduction

Definition

Variants of Turing Machines

Turing Machines • first proposed by Alan Turing in 1936 • similar to a finite automaton but with an unlimited and

unrestricted memory • a much more accurate model of a general purpose computer • A Turing machine can do EVERYTHING THAT A REAL

COMPUTER CAN DO. • BUT even a Turing machine cannot solve certain problems.

These problems are beyond the theoretical limits of computation.


Introduction

Definition

Differences between FA and TM:

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

Differences between FA and TM: 1. A TM can both write on the tape and read from it.


Introduction

Definition

Variants of Turing Machines

Differences between FA and TM: 1. A TM can both write on the tape and read from it. 2. The read-write head can move both to the left and to the right.


Introduction

Definition

Variants of Turing Machines

Differences between FA and TM: 1. A TM can both write on the tape and read from it. 2. The read-write head can move both to the left and to the right. 3. The tape is infinite.


Introduction

Definition

Variants of Turing Machines

Differences between FA and TM: 1. A TM can both write on the tape and read from it. 2. The read-write head can move both to the left and to the right. 3. The tape is infinite. 4. The special states for rejecting and accepting take effect immediately.


Introduction

Example B = {w#w | w ∈ {0, 1}∗ }

Definition

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

Example B = {w#w | w ∈ {0, 1}∗ } M1 = “On input string ω: 1. Zig-zag across the tape to corresponding positions on either side of the # symbol to check whether these positions contain the same symbol. If they do not, or if no # is found, reject. Cross off symbols as they are checked to keep track of which symbols correspond.


Introduction

Definition

Variants of Turing Machines

Example B = {w#w | w ∈ {0, 1}∗ } M1 = “On input string ω: 1. Zig-zag across the tape to corresponding positions on either side of the # symbol to check whether these positions contain the same symbol. If they do not, or if no # is found, reject. Cross off symbols as they are checked to keep track of which symbols correspond. 2. When all symbols to the left of the # have been crossed off, check for any remaining symbols to the right of the #. If any symbols remain, reject; otherwise, accept.”


Introduction

Definition

Variants of Turing Machines

Example B = {w#w | w ∈ {0, 1}∗ } M1 = “On input string ω: 1. Zig-zag across the tape to corresponding positions on either side of the # symbol to check whether these positions contain the same symbol. If they do not, or if no # is found, reject. Cross off symbols as they are checked to keep track of which symbols correspond. 2. When all symbols to the left of the # have been crossed off, check for any remaining symbols to the right of the #. If any symbols remain, reject; otherwise, accept.”


Introduction

Definition

Variants of Turing Machines

Definition A Turing machine is a 7-tuple (Q, Σ, Γ, δ, q0 , qaccept , qreject ), where Q, Σ, Γ are all finite sets and 1. Q is the set of states, 2. Σ is the input alphabet not containing the blank symbol t , 3. Γ is the tape alphabet, where

t

∈ Γ and Σ ⊆ Γ,

4. δ : Q × Γ → Q × Γ × {L, R} is the transistion function, 5. q0 ∈ Q is the start state, 6. qaccept ∈ Q is the accept state, and 7. qreject ∈ Q is the reject state, where qreject 6= qaccept .


Introduction

Definition

C1 yields configuration C2

Variants of Turing Machines


Introduction

Definition

C1 yields configuration C2 Suppose a, b, c ∈ Γ, u, v ∈ Γ∗ and qi , qj ∈ Q.

Variants of Turing Machines


Introduction

Definition

C1 yields configuration C2 Suppose a, b, c ∈ Γ, u, v ∈ Γ∗ and qi , qj ∈ Q. • uaqi bv yields uqj acv if δ(qi , b) = (qj , c, L)

Variants of Turing Machines


Introduction

Definition

C1 yields configuration C2 Suppose a, b, c ∈ Γ, u, v ∈ Γ∗ and qi , qj ∈ Q. • uaqi bv yields uqj acv if δ(qi , b) = (qj , c, L)

(special case:

Variants of Turing Machines


Introduction

Definition

C1 yields configuration C2 Suppose a, b, c ∈ Γ, u, v ∈ Γ∗ and qi , qj ∈ Q. • uaqi bv yields uqj acv if δ(qi , b) = (qj , c, L)

(special case: qi bv yields qj cv

Variants of Turing Machines


Introduction

Definition

C1 yields configuration C2 Suppose a, b, c ∈ Γ, u, v ∈ Γ∗ and qi , qj ∈ Q. • uaqi bv yields uqj acv if δ(qi , b) = (qj , c, L)

(special case: qi bv yields qj cv • uaqi bv yields uacqj v if δ(qi , b) = (qj , c, R)

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

C1 yields configuration C2 Suppose a, b, c ∈ Γ, u, v ∈ Γ∗ and qi , qj ∈ Q. • uaqi bv yields uqj acv if δ(qi , b) = (qj , c, L)

(special case: qi bv yields qj cv • uaqi bv yields uacqj v if δ(qi , b) = (qj , c, R)

A TM M accepts input w if sequence of configurations C1 , C2 , · · · , Ck exists, where


Introduction

Definition

Variants of Turing Machines

C1 yields configuration C2 Suppose a, b, c ∈ Γ, u, v ∈ Γ∗ and qi , qj ∈ Q. • uaqi bv yields uqj acv if δ(qi , b) = (qj , c, L)

(special case: qi bv yields qj cv • uaqi bv yields uacqj v if δ(qi , b) = (qj , c, R)

A TM M accepts input w if sequence of configurations C1 , C2 , · · · , Ck exists, where 1. C1 is the start configuration of M on input w, 2. each Ci yields Ci+1 , and 3. Ck is an accepting configuration.


Introduction

Definition

Variants of Turing Machines

C1 yields configuration C2 Suppose a, b, c ∈ Γ, u, v ∈ Γ∗ and qi , qj ∈ Q. • uaqi bv yields uqj acv if δ(qi , b) = (qj , c, L)

(special case: qi bv yields qj cv • uaqi bv yields uacqj v if δ(qi , b) = (qj , c, R)

A TM M accepts input w if sequence of configurations C1 , C2 , · · · , Ck exists, where 1. C1 is the start configuration of M on input w, 2. each Ci yields Ci+1 , and 3. Ck is an accepting configuration. The collection of strings that M accepts is the language of M, or the language recognized by M, denoted L(M ).


Introduction

Definition

More examples ...

Example n

A = {02 | n ≼ 0}

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

More examples ...

Example n

A = {02 | n ≥ 0} M2 = “On input string w: 1. Sweep left to right across the tape, crossing off every other 0. 2. If in stage 1 the tape contained a single 0, accept. 3. If in stage 1 the tape contained more than a single 0 and the number of 0s was odd, reject. 4. Return the head to the left end of the tape. 5. Go to stage 1.”


Introduction

Definition

More examples ...

Example n

A = {02 | n ≥ 0} M2 = (Q, Σ, Γ, δ, q1 , qaccept , qreject ) where • Q = {q1 , q2 , q3 , q4 , q5 , qaccept , qreject } • Σ = {0} • Γ = {0, x,t }. • δ is described by the state diagram:

Variants of Turing Machines


Introduction

Definition

More examples ...

Example n

A = {02 | n ≥ 0} M2 = (Q, Σ, Γ, δ, q1 , qaccept , qreject ) where • Q = {q1 , q2 , q3 , q4 , q5 , qaccept , qreject } • Σ = {0} • Γ = {0, x,t }. • δ is described by the state diagram:

Variants of Turing Machines


Introduction

Definition

More examples ...

Example B = {w#w | w ∈ {0, 1}∗ }

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

More examples ...

Example B = {w#w | w ∈ {0, 1}∗ } M1 = “On input string w: 1. Zig-zag across the tape to corresponding positions on either side of the # symbol to check whether these positions contain the same symbol. If they do not, or if no # is found, reject. Cross off symbols as they are checked to keep track of which symbols correspond. 2. When all symbols to the left of the # have been crossed off, check for any remaining symbols to the right of the #. If any symbols remain, reject; otherwise, accept.”


Introduction

Definition

Variants of Turing Machines

More examples ...

Example B = {w#w | w ∈ {0, 1}∗ }

Note: To simplify the figure, the reject state is not shown. Transitions going to the reject state occur implicitly whenever a state lacks an outgoing transition for a particular symbol. For completeness, we say that the head moves right in these transitions.


Introduction

Definition

More examples ...

Example C = {ai bj ck | i × j = k and i, j, k ≼ 1}

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

More examples ...

Example C = {ai bj ck | i × j = k and i, j, k ≥ 1} M3 = “On input string w: 1. Scan the input from left to right to determine whether it is a member of a+ b+ c+ and reject if it isn’t. 2. Return the head to the left-hand end of the tape. 3. Cross off an a and scan to the right until a b occurs. Shuttle between the b’s and the c’s, crossing off one of each until all b’s are gone. If all c’s have been crossed off and some b’s remain, reject. 4. Restore the crossed off b’s and repeat stage 3 if there is another a to cross off. If all a’s have been crossed off, determine whether all c’s also have been crossed off. If yes, accept; otherwise, reject.”


Introduction

Definition

Variants of Turing Machines

Definition A language is Turing-recognizable if some Turing machine recognizes it.


Introduction

Definition

Variants of Turing Machines

Definition A language is Turing-recognizable if some Turing machine recognizes it. When we start a Turing machine on an input, three outcomes are possible. The machine may accept, reject or loop. By loop, we mean that the machine simply does not halt.


Introduction

Definition

Variants of Turing Machines

Definition A language is Turing-recognizable if some Turing machine recognizes it. When we start a Turing machine on an input, three outcomes are possible. The machine may accept, reject or loop. By loop, we mean that the machine simply does not halt. A Turing machine can fail to accept an input by entering the qreject state and rejecting, or by looping.


Introduction

Definition

Variants of Turing Machines

Definition A language is Turing-recognizable if some Turing machine recognizes it. When we start a Turing machine on an input, three outcomes are possible. The machine may accept, reject or loop. By loop, we mean that the machine simply does not halt. A Turing machine can fail to accept an input by entering the qreject state and rejecting, or by looping. Turing machines that halt on all inputs (i.e., they never loop) are called deciders because they always make a decision to accept or reject.


Introduction

Definition

Variants of Turing Machines

Definition A language is Turing-recognizable if some Turing machine recognizes it. When we start a Turing machine on an input, three outcomes are possible. The machine may accept, reject or loop. By loop, we mean that the machine simply does not halt. A Turing machine can fail to accept an input by entering the qreject state and rejecting, or by looping. Turing machines that halt on all inputs (i.e., they never loop) are called deciders because they always make a decision to accept or reject. A decider that recognizes some language also is said to decide that language.

Definition A language is Turing-decidable or simply decidable if some Turing machine decides it.


Introduction

Definition

Variants of Turing Machines

Definition A language is Turing-recognizable if some Turing machine recognizes it. When we start a Turing machine on an input, three outcomes are possible. The machine may accept, reject or loop. By loop, we mean that the machine simply does not halt. A Turing machine can fail to accept an input by entering the qreject state and rejecting, or by looping. Turing machines that halt on all inputs (i.e., they never loop) are called deciders because they always make a decision to accept or reject. A decider that recognizes some language also is said to decide that language.

Definition A language is Turing-decidable or simply decidable if some Turing machine decides it.

Theorem Every decidable language is Turing-recognizable.


Introduction

Definition

with Ability to Stay Put

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

with Ability to Stay Put • Suppose that we allow the TM the ability to stay put


Introduction

Definition

Variants of Turing Machines

with Ability to Stay Put • Suppose that we allow the TM the ability to stay put • The transition function would then have the form

δ : Q × Γ → Q × Γ × {L, R, S}


Introduction

Definition

Variants of Turing Machines

with Ability to Stay Put • Suppose that we allow the TM the ability to stay put • The transition function would then have the form

δ : Q × Γ → Q × Γ × {L, R, S} .....


Introduction

Definition

Variants of Turing Machines

with Ability to Stay Put • Suppose that we allow the TM the ability to stay put • The transition function would then have the form

δ : Q × Γ → Q × Γ × {L, R, S} ..... more powerful model???


Introduction

Definition

Variants of Turing Machines

with Ability to Stay Put • Suppose that we allow the TM the ability to stay put • The transition function would then have the form

δ : Q × Γ → Q × Γ × {L, R, S} ..... more powerful model??? • NO! Why?


Introduction

Definition

Variants of Turing Machines

with Ability to Stay Put • Suppose that we allow the TM the ability to stay put • The transition function would then have the form

δ : Q × Γ → Q × Γ × {L, R, S} ..... more powerful model??? • NO! Why?

TO SHOW THAT TWO MODELS ARE EQUIVALENT WE SIMPLY NEED TO SHOW THAT WE CAN SIMULATE ONE BY THE OTHER


Introduction

Definition

Multitape TM

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

Multitape TM • A multitape TM is like an ordinary TM with several tapes


Introduction

Definition

Variants of Turing Machines

Multitape TM • A multitape TM is like an ordinary TM with several tapes • Each tape has its own head for reading and writing


Introduction

Definition

Variants of Turing Machines

Multitape TM • A multitape TM is like an ordinary TM with several tapes • Each tape has its own head for reading and writing • Initially input appears on tape 1, and the others start out blank


Introduction

Definition

Variants of Turing Machines

Multitape TM • A multitape TM is like an ordinary TM with several tapes • Each tape has its own head for reading and writing • Initially input appears on tape 1, and the others start out blank • The transition function would have the form

δ : Q × Γk → Q × Γk × {L, R, S}k where k is the number of tapes


Introduction

Definition

Variants of Turing Machines

Multitape TM • A multitape TM is like an ordinary TM with several tapes • Each tape has its own head for reading and writing • Initially input appears on tape 1, and the others start out blank • The transition function would have the form

δ : Q × Γk → Q × Γk × {L, R, S}k where k is the number of tapes [δ(qi , a1 , · · · , ak ) = (qj , b1 , · · · , bk , L, R, · · · , L)]


Introduction

Definition

Variants of Turing Machines

Multitape TM • A multitape TM is like an ordinary TM with several tapes • Each tape has its own head for reading and writing • Initially input appears on tape 1, and the others start out blank • The transition function would have the form

δ : Q × Γk → Q × Γk × {L, R, S}k where k is the number of tapes [δ(qi , a1 , · · · , ak ) = (qj , b1 , · · · , bk , L, R, · · · , L)] • More powerful than ordinary TM???


Introduction

Definition

Variants of Turing Machines


Introduction

Definition

S = “On input string w = w1 . . . wn :

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

S = “On input string w = w1 . . . wn : 1. First S puts its tape into the format that represents all k tapes of M.


Introduction

Definition

Variants of Turing Machines

S = “On input string w = w1 . . . wn : 1. First S puts its tape into the format that represents all k tapes of M. The formatted tape contains #w˙1 w2 . . . wn #t˙ #t˙ # . . . #


Introduction

Definition

Variants of Turing Machines

S = “On input string w = w1 . . . wn : 1. First S puts its tape into the format that represents all k tapes of M. The formatted tape contains #w˙1 w2 . . . wn #t˙ #t˙ # . . . # 2. To simulate a single move, S scans its tape from the first #, which marks the LH end, to the (k + 1)st #, which marks the RH end, in order to determine the symbols under the virtual heads.


Introduction

Definition

Variants of Turing Machines

S = “On input string w = w1 . . . wn : 1. First S puts its tape into the format that represents all k tapes of M. The formatted tape contains #w˙1 w2 . . . wn #t˙ #t˙ # . . . # 2. To simulate a single move, S scans its tape from the first #, which marks the LH end, to the (k + 1)st #, which marks the RH end, in order to determine the symbols under the virtual heads. Then S makes a second pass to update the tapes according to the way that M ’s transition function dictates.


Introduction

Definition

Variants of Turing Machines

S = “On input string w = w1 . . . wn : 1. First S puts its tape into the format that represents all k tapes of M. The formatted tape contains #w˙1 w2 . . . wn #t˙ #t˙ # . . . # 2. To simulate a single move, S scans its tape from the first #, which marks the LH end, to the (k + 1)st #, which marks the RH end, in order to determine the symbols under the virtual heads. Then S makes a second pass to update the tapes according to the way that M ’s transition function dictates. 3. If at any point S moves one of the virtual heads to the right onto a #, this action signifies that M has moved the corresponding head onto the previously unread blank portion of that tape. S writes a blank symbol on this tape cell and shifts the tape contents, from this cell until the rightmost #, one unit to the


Introduction

Definition

Nondeterministic TM

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM • At any point in a computation the machine may proceed

according to several possibilities


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM • At any point in a computation the machine may proceed

according to several possibilities • The transition function has the form

δ : Q × Γ → ℘(Q × Γ × {L, R})


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM • At any point in a computation the machine may proceed

according to several possibilities • The transition function has the form

δ : Q × Γ → ℘(Q × Γ × {L, R})


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM • At any point in a computation the machine may proceed

according to several possibilities • The transition function has the form

δ : Q × Γ → ℘(Q × Γ × {L, R})

• Tape 1 contains the input string and never altered


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM • At any point in a computation the machine may proceed

according to several possibilities • The transition function has the form

δ : Q × Γ → ℘(Q × Γ × {L, R})

• Tape 1 contains the input string and never altered • Tape 2 maintains a copy of N’s tape on some branch of its

nondeterministic computation


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM • At any point in a computation the machine may proceed

according to several possibilities • The transition function has the form

δ : Q × Γ → ℘(Q × Γ × {L, R})

• Tape 1 contains the input string and never altered • Tape 2 maintains a copy of N’s tape on some branch of its

nondeterministic computation • Tape 3 keeps track of D’s location in N’s nondeterministic

computation tree


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM • At any point in a computation the machine may proceed

according to several possibilities • The transition function has the form

δ : Q × Γ → ℘(Q × Γ × {L, R})

• Tape 1 contains the input string and never altered • Tape 2 maintains a copy of N’s tape on some branch of its

nondeterministic computation • Tape 3 keeps track of D’s location in N’s nondeterministic

computation tree • Every node in the tree can have at most b children, where b is the

size of the largest set of possible choices given by N’s transition function.


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM • At any point in a computation the machine may proceed

according to several possibilities • The transition function has the form

δ : Q × Γ → ℘(Q × Γ × {L, R})

• Tape 1 contains the input string and never altered • Tape 2 maintains a copy of N’s tape on some branch of its

nondeterministic computation • Tape 3 keeps track of D’s location in N’s nondeterministic

computation tree • Every node in the tree can have at most b children, where b is the

size of the largest set of possible choices given by N’s transition function. • To every node in the tree we assign an address that is a string over {1, 2, · · · , b}. (Each symbol in the string tells us which choice to make next when simulating in one branch in computation)


Introduction

Definition

Nondeterministic TM

D = “On input string w:

Variants of Turing Machines


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM

D = “On input string w: 1. Initially tape 1 contains the input w, and tapes 2 and 3 are empty


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM

D = “On input string w: 1. Initially tape 1 contains the input w, and tapes 2 and 3 are empty 2. Copy tape 1 to tape 2


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM

D = “On input string w: 1. Initially tape 1 contains the input w, and tapes 2 and 3 are empty 2. Copy tape 1 to tape 2 3. Use tape2 to simulate N with input w on one branch of its nondeterministic computation. Before each step of N consult the next symbol on tape 3 to determine which choice to make among those allowed by N’s transition function. If no more symbols on tape 3 or if this nondeterministic choice is invalid, abort this branch by going to stage 4.


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM

D = “On input string w: 1. Initially tape 1 contains the input w, and tapes 2 and 3 are empty 2. Copy tape 1 to tape 2 3. Use tape2 to simulate N with input w on one branch of its nondeterministic computation. Before each step of N consult the next symbol on tape 3 to determine which choice to make among those allowed by N’s transition function. If no more symbols on tape 3 or if this nondeterministic choice is invalid, abort this branch by going to stage 4. Also go to stage 4 if a rejecting configuration is encountered. If an accepting configuration is encountered, accept the input.


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM

D = “On input string w: 1. Initially tape 1 contains the input w, and tapes 2 and 3 are empty 2. Copy tape 1 to tape 2 3. Use tape2 to simulate N with input w on one branch of its nondeterministic computation. Before each step of N consult the next symbol on tape 3 to determine which choice to make among those allowed by N’s transition function. If no more symbols on tape 3 or if this nondeterministic choice is invalid, abort this branch by going to stage 4. Also go to stage 4 if a rejecting configuration is encountered. If an accepting configuration is encountered, accept the input. 4. Replace the string on tape 3 with the lexicographically next string. Simulate the next branch of N’s computation by going to stage 2.”


Introduction

Definition

Variants of Turing Machines

Nondeterministic TM

Example N = ({q0 , q1 , q2 }, {0, 1}, {0, 1, t}, δ, q0 , {q2 }) where δ 0 1 q0 {(q0 , 1, R)} {(q1 , 0, R)} q1 {(q1 , 0, R)}, {(q0 , 0, L)} {(q1 , 1, R)}, {(q0 , 1, L)} q2 ∅ ∅

t ∅ {(q2 , t, R)} ∅


Introduction

Definition

Variants of Turing Machines

Enumerators • An enumerator E is a TM with an attached printer


Introduction

Definition

Variants of Turing Machines

Enumerators • An enumerator E is a TM with an attached printer (an output

device to print strings)


Introduction

Definition

Variants of Turing Machines

Enumerators • An enumerator E is a TM with an attached printer (an output

device to print strings) B recursively enumerable = Turing-recognizable


Introduction

Definition

Variants of Turing Machines

Enumerators • An enumerator E is a TM with an attached printer (an output

device to print strings) B recursively enumerable = Turing-recognizable • If the enumerator E does not halt, it may print an infinite list of

strings


Introduction

Definition

Variants of Turing Machines

Enumerators • An enumerator E is a TM with an attached printer (an output

device to print strings) B recursively enumerable = Turing-recognizable • If the enumerator E does not halt, it may print an infinite list of

strings • The language enumerated by E is the collection of all strings it

eventually prints out. E may generate the strings in any order, possibly with repetitions.


Introduction

Definition

Variants of Turing Machines

Enumerators • An enumerator E is a TM with an attached printer (an output

device to print strings) B recursively enumerable = Turing-recognizable • If the enumerator E does not halt, it may print an infinite list of

strings • The language enumerated by E is the collection of all strings it

eventually prints out. E may generate the strings in any order, possibly with repetitions.

M = “On input w: 1. Run E. Every time that E outputs a string, compare it with w. 2. If w ever appears in the output of E, accept.”


Introduction

Definition

Questions? See you next meeting!

Variants of Turing Machines


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.