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

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

View Full Document Right Arrow Icon
CMPSCI 250: Introduction to Computation Lecture #37: Two-Way Automata and Turing Machines David Mix Barrington 6 December 2017
Image of page 1

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

View Full Document Right Arrow Icon
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
Image of page 2
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.
Image of page 3

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

View Full Document Right Arrow Icon
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.
Image of page 4
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 .
Image of page 5

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

View Full Document Right Arrow Icon
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.
Image of page 6
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).
Image of page 7

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

View Full Document Right Arrow Icon
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.
Image of page 8
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.
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern