Skip to content

Instantly share code, notes, and snippets.

@gilamor
Last active September 16, 2020 08:14
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 gilamor/1c416190ed0a5e2fd1723da2ae93ec51 to your computer and use it in GitHub Desktop.
Save gilamor/1c416190ed0a5e2fd1723da2ae93ec51 to your computer and use it in GitHub Desktop.
determines 0S^*
name: 0S*
source code: |-
# L= 0{0,1}*
input: '1001' # try '1111' (15), '10100' (20), '111001' (57)
blank: '_'
# TM
start state: q0
table:
q0:
' ': {write: '_', R: reject}
'0': {write: '0', R: accept}
'1': {write: '1', R: reject}
accept:
reject:
positions:
q0: {x: 213.22, y: 133.12}
accept: {x: 528.56, y: 67.43}
reject: {x: 486.71, y: 267.22}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment