Git Product home page Git Product logo

universalturingmachine's Introduction

Universal Turing Machine

RWU Software design

Prerequisites:

NPM/ NODE: https://nodejs.org/en/download/
Python: https://www.python.org/downloads/

Running Source Code

Setup/ Deployment:

git clone https://github.com/jaysongiroux/universalturingmachine
cd universalturingmachine

Setting up dependancies:

npm i python-shell

Setting up node:

npm install

Starting the program:

npm start

Running From Executable:

Options:

  1. Mac (Darwin)
  2. Win 64

Examples:

  1. Example 1: a*b* - Tape must start at the first character in the tape and be bounded on both sides
    Tape: [,>a,a,a,a,a,b,b,b,b,]
  2. Example 2: (a+b)*c+a* - Tape must start at the first character in the tape and must be bounded on both sides
    Tape: [,>a,b,a,b,a,b,a,b,a,b,a,b,a,b,c,a,]
  3. Example 3: a's in multiples of 3's - Tape must start at the first character in the tape and must be bounded on both sides
    Tape: [,>a,a,a,]
  4. Example 4: Accepts: c a* b* Δ* '[SPACE]'* c, tape can start wherever within bounds. Tape must be bounded on both sides. Accepts both forms of a "space"
    Tape: [,c,a,b,>a,c,] or [,c,a,b,>Δ,c,]

Input:

Tape:

Example Format: "[,>a,b,c,Δ, ,a,b,c,a,b,c"

  • Brackets must be seperated from the tape by commas as seen from the format example above.
  • Spaces can be represented as Δ or " " as long as it is consistent within the tape and transitions

Transitions:

Example Format: "{q0,a,q1,b,R},{q1,c,q2,b,L}"

  • {current state, read, goto state, movement}

Output:

Logging:

In this tab, you can trace the turing machine and follow the movements. With this output it makes it easy for the user to trace the position of the read head and determine the actions it is making.

Encoding:

When the encoding functions were designed, we purposed it to not be limited to a small alphabet. The table below is how each character is decoded. Between characters, there is a trailing "0".
To encode numbers, there is a sense of logic involved. since the only reason to involve numbers is when writing states (for example, "q5"). There is the same number of 1's as the number that follows "q"

Letter/ Symbol Encoding Number
a 1
b 11
c 111
c 111
d 1111
e 11111
f 111111
g 1111111
h 11111111
i 111111111
j 1111111111
k 11111111111
l 111111111111
m 1111111111111
n 11111111111111
o 111111111111111
p 1111111111111111
q 11111111111111111
r 111111111111111111
s 1111111111111111111
t 11111111111111111111
u 111111111111111111111
v 1111111111111111111111
w 11111111111111111111111
x 111111111111111111111111
y 1111111111111111111111111
z 11111111111111111111111111
Δ or Space 111111111111111111111111111
- 1111111111111111111111111111
[ 11111111111111111111111111111
] 111111111111111111111111111111

universalturingmachine's People

Contributors

jaysongiroux avatar

Watchers

James Cloos avatar  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.