GithubHelp home page GithubHelp logo

mr-eight / turingmachine Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 75 KB

This is a very simple implementation of the Turing Machine. Executing the given commands, it helps testing Turing Machine's transition-functions and is useful for educational purposes.

Java 100.00%

turingmachine's Introduction

TuringMachine

This is a very simple implementation of the Turing Machine. Executing the given commands, it helps testing Turing Machine's transition-functions and is useful for educational purposes.

I did this project for of my Formal Languages and Automata Theory Course.

Model of the implemented machine

Turing Machine

Example

Please input the transitions:
q0,1 = q0,$,R
q0,□ = q1,□,L
q1,1 = q1,1,L
q1,$ = q2,1,R
q2,1 = q2,1,R
q2,□ = q1,1,L
q1,□ = q3,□,R
end

Please input final states:
q3

Please input the content of input-tape:
111

Tape:
□111111

Accepted!
Machine halted in a final state!

Usage

1- Run the program.
2- Input the transitions in the following format:

q0,a = q1,b,L
q1-a = q2,x,R

both of '-' and ',' are ok!

3- Enter your machine's final-states:

Multiple Final-States: q1,q2,q3

Single Final-State: q1

4- Enter content on your tape:

aabbbcdd

5- You'll get the result:

Tape:
□babbbcdd

Accepted!
Machine halted in a final state!

Notes:

Use the following character as the "blank":

Requirements

JRE and JDK.

Authors

MR-EIGHT

Acknowledgment

  • Thanks to my professor Mr. Bagherzadeh: Jamshid Bagherzadeh | LinkedIn

  • Thanks to Peter Linz and his wonderful book: An Introduction to Formal Languages and Automata

turingmachine's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.