Lecture9x - 15-453 FORMAL LANGUAGES AUTOMATA AND...

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

View Full Document Right Arrow Icon
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY 15-453 * Read chapter 4 of the book for next time * Lecture9x.ppt
Image of page 1

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

View Full Document Right Arrow Icon
REVIEW
Image of page 2
A Turing Machine is represented by a 7-tuple T = (Q, Σ, Γ, δ , q 0 , q accept , q reject ): Q is a finite set of states Γ is the tape alphabet, a superset of Σ ; Γ q 0 Q is the start state Σ is the input alphabet, where Σ δ : Q × Γ → Q × Γ × {L, R} is the transition func q accept Q is the accept state q reject Q is the reject state, and q reject q accept
Image of page 3

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

View Full Document Right Arrow Icon
CONFIGURATION: (1) tape contents, (2) current state, (3) location of read/write head. 11010 q 7 00110 q 7 1 0 0 0 0 0 1 1 1 1
Image of page 4
A TM recognizes a language iff it accepts all and only those strings in the language. A TM decides a language L iff it accepts all strings in L and rejects all strings not in L. A language L is called Turing-recognizable or recursively enumerable iff some TM recognizes L. A language L is called decidable or recursive iff some TM decides L.
Image of page 5

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

View Full Document Right Arrow Icon
A language is called Turing-recognizable or recursively enumerable (r.e.) if some TM recognizes it. A language is called decidable or recursive if some TM decides it. recursive languages r.e. languages
Image of page 6
Theorem: If A and ¬ A are r.e. then A is decidable. Given: a Turing Machine TM A that recognizes A and a Turing Machine TM R that recognizes ¬ A, we can build a new machine that decides A. How can we prove this? Run TM A and TM R in parallel. (Or more precisely, interleave them.) One of them will eventually recognize the input string. If TM A recognizes it, then accept. If TM R recognizes it, then reject.
Image of page 7

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

View Full Document Right Arrow Icon
A TM that decides { 0 | n ≥ 0 } High-Level Idea. Repeatedly divide the number of zeros in half until it becomes an odd number. If we are left with a single zero, then accept. Otherwise, reject. 2 n We want to accept iff: the input string consists entirely of zeros, and the number of zeros is a power of 2.
Image of page 8
A TM that decides { 0 | n ≥ 0 } 1. Sweep from left to right, cross out every other 0 . (Divides number in half.) 2. If in step 1, the tape had only one 0 , accept . 3. Else if the tape had an odd number of 0 ’s, reject . 4. Move the head back to the first input symbol. 5. Go to step 1. PSEUDOCODE: 2 n
Image of page 9

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

View Full Document Right Arrow Icon
0 → , R , R q accept q reject 0 → x, R x → x, R , R x → x, R 0 → 0, L x → x, L x → x, R , L , R 0 → x, R 0 → 0, R , R x → x, R { 0 | n ≥ 0 } 2 n q 0 q 1 q 2 q 3 q 4
Image of page 10
0 → , R , R q accept
Image of page 11

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

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