# 37.pdf - CMPSCI 250 Introduction to Computation Lecture#37...

• Test Prep
• 36

This preview shows pages 1–10. Sign up to view the full content.

CMPSCI 250: Introduction to Computation Lecture #37: Two-Way Automata and Turing Machines David Mix Barrington 6 December 2017

This preview has intentionally blurred sections. Sign up to view the full version.

2WDFA’s and Turing Machines Enhancing a DFA’s Abilities Definition and Semantics of 2WDFA’s Why 2WDFA’s Have Regular Languages (Sketch) Turing Machines The Formal Turing Machine Model A Turing Machine Example The Church-Turing Thesis
Enhancing a DFA’s Abilities DFA’s, and the other models we have now shown to be equivalent to them, model a particular kind of computation. A DFA: (1) can read its input only once, from left to right, (2) can only read, not write to, the memory holding the input, and (3) has only a bounded amount of memory apart from that input.

This preview has intentionally blurred sections. Sign up to view the full version.

Enhancing a DFA’s Abilities In our last week of lectures we will look at another model of computation called a Turing machine , which we can think of as an enhanced DFA. Turing machines: (1) can move both ways on the tape that contains their input, (2) can write new characters into the space that originally holds the input, and (3) can utilize additional memory , as much as they need, as well as the original space.
Enhancing a DFA’s Abilities We’ll begin today by looking at the effect of adding new ability (1) alone to a DFA, producing a new kind of machine called a two-way DFA . In CMPSCI 501 you’ll also look at machines that have new abilities (1) and (2) but not (3) -- these are called linear bounded automata .

This preview has intentionally blurred sections. Sign up to view the full version.

Two-Way Finite Automata Like a DFA, a 2WDFA has a state set Q, start state i, final state set F, input alphabet Σ , and transition function δ . The only difference is that δ goes from Q × Σ to Q × {L, R}. Based on the current state and the letter it sees, the 2WDFA enters a new state and moves either left or right on its tape. It continues taking steps until or unless it moves off one end of the tape.
Semantics of 2WDFA’s We need to define the semantics of the 2WDFA M -- the meaning of each computation in terms of defining a language L(M). We start with the read head on the first letter of the input, and start the computation. If the machine moves off the left end of the tape, we say that it hangs and the input is not in L(M).

This preview has intentionally blurred sections. Sign up to view the full version.

Semantics of 2WDFA’s If it moves off the right end of the tape, we say that it accepts if it goes into a final state and that it rejects if it goes into a nonfinal state. There is a fourth possibility, that it loops or never terminates. The input is in L(M) if and only if M accepts.
A 2WDFA Example Let’s look at the behavior of this 2WDFA on some strings: On a, it moves right off the input in state f and accepts. On b, it moves off the left end and hangs. On aaa, it moves right to state f, right again to state p, left to state f, right to p,..., and thus loops forever.

This preview has intentionally blurred sections. Sign up to view the full version.

This is the end of the preview. Sign up to access the rest of the document.
• Fall '09
• Turing Machines, Alonzo Church

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern