Skip to content

Instantly share code, notes, and snippets.

@ADCDS
Created December 2, 2018 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ADCDS/e5c4601fa9cbcc5332bcc063d3948573 to your computer and use it in GitHub Desktop.
Save ADCDS/e5c4601fa9cbcc5332bcc063d3948573 to your computer and use it in GitHub Desktop.
#turing machine that tests if the number of blank spaces between zero is even
input: '0 0'
blank: ' '
start state: start
table:
start:
0: {write: 0, R: B}
B:
' ': {write: ' ', R: C}
0: {write: 0, R: accept}
C:
' ': {write: ' ', R: B}
accept:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment