Skip to content

Instantly share code, notes, and snippets.

@gimiki
Last active December 1, 2021 17:42
Show Gist options
  • Save gimiki/8218d77dc2fd48cdf71ad702da6a09a9 to your computer and use it in GitHub Desktop.
Save gimiki/8218d77dc2fd48cdf71ad702da6a09a9 to your computer and use it in GitHub Desktop.

Revisions

  1. gimiki revised this gist Dec 1, 2021. No changes.
  2. gimiki revised this gist Dec 1, 2021. No changes.
  3. gimiki revised this gist Dec 1, 2021. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions func_ID_01.yaml
    Original file line number Diff line number Diff line change
    @@ -35,10 +35,10 @@ source code: |
    Y: {write: 1, R: q0}
    HALT:
    positions:
    q0: {x: 409.86, y: 239.13, fixed: false}
    q1: {x: 535.49, y: 310.48, fixed: false}
    q2: {x: 327.93, y: 120.15, fixed: false}
    q3: {x: 437.46, y: 415.06, fixed: false}
    q4: {x: 232.23, y: 226.88, fixed: false}
    q5: {x: 311.98, y: 345.9, fixed: false}
    HALT: {x: 506.83, y: 133.46, fixed: false}
    q0: {x: 170.77, y: 298.7}
    q1: {x: 226.17, y: 178.32}
    q2: {x: 272.32, y: 413.64}
    q3: {x: 398.14, y: 148.44}
    q4: {x: 450.91, y: 371.32}
    q5: {x: 458.67, y: 237.28}
    HALT: {x: 96.4, y: 421.26}
  4. gimiki renamed this gist Dec 1, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. gimiki created this gist Dec 1, 2021.
    44 changes: 44 additions & 0 deletions func_ID_01
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    name: func_ID_01
    source code: |
    # Macchina di Turing che calcola la funzione f(x)=x
    # Alfabeto: {0,1, ' '}

    blank: ' '
    input: '10110'
    start state: q0
    table:
    q0:
    ' ': {write: ' ', R: HALT}
    0: {write: X, R: q1}
    1: {write: Y, R: q2}
    q1:
    0: {write: 0, R: q1}
    1: {write: 1, R: q1}
    ' ': {write: ' ', R: q3}
    q2:
    0: {write: 0, R: q2}
    1: {write: 1, R: q2}
    ' ': {write: ' ', R: q4}
    q3:
    0: {write: 0, R: q3}
    1: {write: 1, R: q3}
    ' ': {write: 0, L: q5}
    q4:
    0: {write: 0, R: q4}
    1: {write: 1, R: q4}
    ' ': {write: 1, L: q5}
    q5:
    0: {write: 0, L: q5}
    1: {write: 1, L: q5}
    ' ': {write: ' ', L: q5}
    X: {write: 0, R: q0}
    Y: {write: 1, R: q0}
    HALT:
    positions:
    q0: {x: 409.86, y: 239.13, fixed: false}
    q1: {x: 535.49, y: 310.48, fixed: false}
    q2: {x: 327.93, y: 120.15, fixed: false}
    q3: {x: 437.46, y: 415.06, fixed: false}
    q4: {x: 232.23, y: 226.88, fixed: false}
    q5: {x: 311.98, y: 345.9, fixed: false}
    HALT: {x: 506.83, y: 133.46, fixed: false}