multitape turing machines
play

Multitape Turing Machines CSC 540 Christopher Siu 1 / 8 Multitape - PowerPoint PPT Presentation

Multitape Turing Machines CSC 540 Christopher Siu 1 / 8 Multitape Turing Machines Defjnition A k -tape machine has k tapes and k independent tape heads. The machine reads the tapes simultaneously, but has only one state. Tape 3 Tape 2 Tape


  1. Multitape Turing Machines CSC 540 Christopher Siu 1 / 8

  2. Multitape Turing Machines Defjnition A k -tape machine has k tapes and k independent tape heads. The machine reads the tapes simultaneously, but has only one state. Tape 3 Tape 2 Tape 1 q i 2 / 8

  3. Multitape Turing Machines A multitape machine begins with the input in the standard position on Tape 1. Tape 3 Tape 2 a a b a Tape 1 3 / 8 q 0

  4. Multitape Turing Machines During each transition, a multitape machine may: 1 Change the state. 2 Write (potentially difgerent) symbols to each tape. 3 Independently reposition each tape head. Defjnition The transition function of a two-tape machine is of the form: 4 / 8 δ ( q i , x 1 , x 2 ) = ( q j , y 1 , d 1 , y 2 , d 2 ) q i , q j ∈ Q are the starting and ending states. x 1 , x 2 ∈ Γ are scanned from Tape 1 and Tape 2. y 1 , y 2 ∈ Γ are written to Tape 1 and Tape 2. d 1 , d 2 ∈ { L , R , S } are the directions for Head 1 and Head 2.

  5. Multitape Turing Machines : Construct a multitape machine that, given an input BwB (on Tape Example Example 5 / 8 Consider the following two-tape machine to accept a i ba i | i ≥ 0 � � ( a / a R , ( a / a R , B / a R ) a / a L ) ( B / B R , ( b / b R , ( B / B R , B / B R ) B / B L ) B / B R ) > q 0 q 1 q 2 q 3 1), where w ∈ { a , b } ∗ , produces the output BwwB (on Tape 1).

  6. Converting Multitape to Multitrack Machines Track 5 Track 1 a b a Track 2 X Track 3 a b Track 4 X # Theorem q i Tape 1 a b a Tape 2 a b Example if it is accepted by a standard Turing machine A language L is accepted by a multitape Turing machine if and only 6 / 8 Note that a k tapes can be simulated by (2 k + 1) tracks.

  7. Converting Multitape to Multitrack Machines 1 Find the ‘ X ’ on track 2; transition based on track 1. 2 Find the ‘ X ’ on track 4; transition based on track 3. Note that we now know the symbols scanned from the “tapes”, so 3 Write to tracks 1 and 3; move the ‘ X ’s on tracks 2 and 4. Example q i q j 7 / 8 To simulate a transition of a 2 -tape M , a 5 -track M ′ must: we know — at machine-design-time — the desired output of δ . Consider simulating δ ( q i , a , b ) = ( q j , b , L , aR ) : ( a / b L , b / a R )

  8. Converting Multitape to Multitrack Machines Example (cont.) 8 / 8 (where ∗ indicates “any symbol”, and { c } , “any symbol other than c ”) ( a , X , ∗ , ∗ , ∗ )/ ( ∗ , { X } , ∗ , ∗ , ∗ )/ ( ∗ , ∗ , ∗ , ∗ , { # } )/ ( a , X , ∗ , ∗ , ∗ ) L ( ∗ , { X } , ∗ , ∗ , ∗ ) R ( ∗ , ∗ , ∗ , ∗ , { # } ) R ( b , X , ∗ , ∗ , ∗ )/ ( b , X , ∗ , ∗ , ∗ ) L ( ∗ , ∗ , ∗ , ∗ , # )/ ( ∗ , ∗ , ∗ , ∗ , # ) R ( ∗ , ∗ , ∗ , { X } , ∗ )/ ( ∗ , ∗ , ∗ , ∗ , { # } )/ ( ∗ , ∗ , ∗ , { X } , ∗ ) R ( ∗ , ∗ , ∗ , ∗ , { # } ) R ( ∗ , ∗ , b , X , ∗ )/ ( ∗ , ∗ , a , X , ∗ )/ ( ∗ , ∗ , b , X , ∗ ) L ( ∗ , ∗ , a , X , ∗ ) L

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend