1 / 12

Turing machines

Turing machines. Sipser 2.3 and 3.1 (pages 123-144). A Context-free Grammar for { a n b n c n | n ≥ 0} ?. Theorem 2.34 (Pumping lemma for CFLs ): If A is a CFL, then there is a number p where, if s is any string in A of length ≥ p , then s = uvxyz such that:

teresa
Download Presentation

Turing machines

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Turing machines Sipser 2.3 and 3.1 (pages 123-144)

  2. A Context-free Grammar for {anbncn| n ≥ 0}? • Theorem 2.34 (Pumping lemma for CFLs): If A is a CFL, then there is a number p where, if s is any string in A of length ≥ p, then s = uvxyzsuch that: • For each i ≥ 0, uvixyiz ∈ A, • |vy| > 0, and • |vxy| ≤ p

  3. Proof idea • Surgery on parse trees

  4. So… • Is {anbncn| n ≥ 0} a CFL?

  5. Chomsky hierarchy anbncn Context-free languages Regular languages 0n1n

  6. Introducing… Turing machines Infinite tape a b a b ⨆ ⨆ ⨆ Bi-directional read/write head Finite control

  7. Formally… • A Turing machine is a 7-tuple (Q, Σ, Γ, δ, q0, qaccept, qreject), where • Q is a finite set called the states • Σis a finite set not containing the blank symbol ⨆ called the input alphabet • Γ is a finite set called the tape alphabet with ⨆∈Γand Σ⊆Γ • δ:Q ×Γ→ Q ×Γ ×{L,R} • q0∈Q is the start state • qaccept∈Q is the accept state • qaccept∈Qis the reject state

  8. Recognizing {anbncn| n ≥ 0} Infinite tape a a b b c c ⨆ ⨆ ⨆ Finite control

  9. Configurations • A configurationis • Current state • Current tape contents • Current head location • uqvmeans • Current state is q • Current tape contents isuv • Current head points at first symbol of v • Example • âaq1bbcc • In state q1 • Tape contents are âabbcc • Tape head is on first b

  10. Yields • A configuration C1 yields configuration C2 if the Turing machine can legally go from C1 to C2 in a single step • yields • Written ⊢

  11. Turing-recognizable languages • A Turing machine accepts input w if a sequence of configurations C1,C2,...,Ck exists where • C1 is the start configuration of M on input w • Each Ci yields Ci+1 • Ck is an accepting configuration • Defn 3.5: A language is Turing-recognizable if it is accepted by some Turing machine.

  12. Recognizing .

More Related