Your SlideShare is downloading. ×
TuringSlashPython - Undergraduate Final Year Project
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

TuringSlashPython - Undergraduate Final Year Project

280
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
280
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. TuringSlashPython A Turing Machine simulator for academic uses Alexandros James Psarras Final Year Project The University of Leeds May 2010
  • 2. Turing Machines
    • A Turing Machine (TM) is a theoretical computing machine, first described by Alan Turing [1].
    • A Turing Machine has three parts:
          • 1. An infinite tape .
          • 2. A head that scans the tape. The head has a property known as a “ state ”, that determines the action the head will take.
          • 3. A set of instructions
  • 3. Deterministic TM (DTM) A deterministic Turing Machine (DTM) is described by the 7-tuple M = (Q, S, G, d , q0, b, F)[2] Q:      set of states S:      language G:      tape language d:       transition function, q0 0 -> q0 1 R q0:    initial state b:      blank symbol F: halting states
  • 4. TuringSlashPython
  • 5. Objectives
      • Analysis of the problem and investigation of other Turing Machine simulators
      • Formulation of an appropriate development process
      • Development of the simulator in wxPython
      • Evaluation of the final version of the program.
  • 6. Initial Goals
      • The creation of a ‘one tape deterministic’ Turing Machine.
      • The use of XML to input and output Turing Machines
      • Conversion from and to the JFlap Turing Machine format
  • 7. Extensions
      • Two tape & non-deterministic features
      • A more detailed output, including the initial, final and maximum length of the tape
      • Autofill / autocorrect features
      • High-level command features
  • 8. Schedule
  • 9. TuringSlashPython
      • Aimed at students who are new to Turing Machines
      • Support for assignments
      • High-level commands for advanced users
  • 10. Task 1 – Palindrome checker A Turing Machine that accepts a string that is in the format: { wwR | w { 0, 1 }* }
  • 11. Task 2 – Binary addition with 2 tapes A Turing Machine that does binary additions with 2 tapes
  • 12. Task 3 – High-level commands TuringSlashPython introduces a set of high-level commands that make it easier for a user to create a complex Turing Machine. copy(q0, q1, #, %) | _ | # | 1 | 0 | 0 | 1 | 1 | # | _ | % | % | _ |
  • 13. One tape high-level commands
      • go2start(q0, q1)
      • go2end(q0, q1)
      • add2start(q0, q1, a)
      • add2end(q0, q1, a)
      • find(q0, q1, q2, 1, D)
      • replace(q0, q1, q2, 1, a, D)
      • replaceall(q0, q1, q2, 1, a)
      • remove(q0, q1, a)
      • copy(q0, q1, #, %)
      • compare(q0, q1, q2, #, %)
  • 14. Two tape high-level commands
      • go2start(q0, q1)
      • go2start1(q0, q1)
      • go2start2(q0, q1)
      • go2end(q0, q1)
      • go2end1(q0, q1)
      • go2end2(q0, q1)
      • add2start(q0, q1, a, b)
      • add2start1(q0, q1, a)
      • add2start2(q0, q1, a)
      • add2end(q0, q1, a, b)
      • add2end1(q0, q1, a)
      • add2end2(q0, q1, a)
      • find(q0, q1, q2, 1, 2, D)
      • find1(q0, q1, q2, 1, D)
      • find2(q0, q1, q2, 1, D)
      • replace(q0, q1, q2, 1, 2, a, b, D)
      • replace1(q0, q1, q2, 1, a, D)
      • replace2(q0, q1, q2, 1, a, D)
      • replaceall(q0, q1, q2, 1, 2, a, b)
      • replaceall1(q0, q1, q2, 1, a)
      • replaceall2(q0, q1, q2, 1, a)
      • remove(q0, q1, 1, 2)
      • remove1(q0, q1, 1)
      • remove2(q0, q1, 1)
      • copy(q0, q1, #, %)
      • copy1(q0, q1, #, %)
      • copy2(q0, q1, #, %)
      • compare(q0, q1, q2, #, %)
      • compare1(q0, q1, q2, #, %)
      • compare2(q0, q1, q2, #, %)
  • 15. Questions ? Thank you!
  • 16. References [1] Turing, Alan M. (1936) “On Computable Numbers, with an Application to the Entscheidungsproblem”. Proceedings of the London Mathematical Society . 2 42, 230-265, 1937. [2] Hopcroft, John E.; Rajeev Motwani and Ullman, Jeffrey D., 2000, Introduction to Automata Theory, Languages, and Computation (2nd ed), Addison-Wesley.