{
  "format": "automata-studio/workspace",
  "schema": 1,
  "app": "dev",
  "machine": "ITM",
  "config": {
    "sym": {
      "eps": "ε",
      "any": "Σ",
      "blank": "⊔",
      "leftMarker": "⊢",
      "rightMarker": "⊣",
      "stackBottom": "Z",
      "lambda": "λ"
    }
  },
  "sigma": [
    "0",
    "1"
  ],
  "stackAlpha": [
    "0",
    "1",
    "w",
    " ",
    "=",
    ">",
    "'",
    ".",
    "r",
    "e",
    "p",
    "a",
    "t",
    "(",
    "s",
    "I",
    "n",
    "|",
    ",",
    "2",
    ")",
    "⊔",
    "x"
  ],
  "outputAlpha": [],
  "tapeCount": 1,
  "states": [
    {
      "id": "s1",
      "x": 140,
      "y": 255,
      "name": "scan0"
    },
    {
      "id": "s2",
      "x": 319,
      "y": 303,
      "name": "scan1"
    },
    {
      "id": "s3",
      "x": 319,
      "y": 208,
      "name": "zero"
    },
    {
      "id": "s4",
      "x": 498,
      "y": 255,
      "name": "dec"
    },
    {
      "id": "s5",
      "x": 677,
      "y": 255,
      "name": "mark"
    },
    {
      "id": "s6",
      "x": 856,
      "y": 255,
      "name": "back"
    },
    {
      "id": "s7",
      "x": 498,
      "y": 160,
      "name": "conv"
    },
    {
      "id": "s8",
      "x": 498,
      "y": 350,
      "name": "done"
    }
  ],
  "transitions": [
    {
      "id": "t1",
      "from": "s1",
      "to": "s1",
      "symbol": "0",
      "write": "0",
      "dir": "R"
    },
    {
      "id": "t2",
      "from": "s1",
      "to": "s2",
      "symbol": "1",
      "write": "1",
      "dir": "R"
    },
    {
      "id": "t3",
      "from": "s1",
      "to": "s3",
      "symbol": "⊔",
      "write": "⊔",
      "dir": "L"
    },
    {
      "id": "t4",
      "from": "s2",
      "to": "s2",
      "symbol": "0",
      "write": "0",
      "dir": "R"
    },
    {
      "id": "t5",
      "from": "s2",
      "to": "s2",
      "symbol": "1",
      "write": "1",
      "dir": "R"
    },
    {
      "id": "t6",
      "from": "s2",
      "to": "s4",
      "symbol": "⊔",
      "write": "⊔",
      "dir": "L"
    },
    {
      "id": "t7",
      "from": "s4",
      "to": "s4",
      "symbol": "0",
      "write": "1",
      "dir": "L"
    },
    {
      "id": "t8",
      "from": "s4",
      "to": "s5",
      "symbol": "1",
      "write": "0",
      "dir": "L"
    },
    {
      "id": "t9",
      "from": "s5",
      "to": "s5",
      "symbol": "0",
      "write": "0",
      "dir": "L"
    },
    {
      "id": "t10",
      "from": "s5",
      "to": "s5",
      "symbol": "1",
      "write": "1",
      "dir": "L"
    },
    {
      "id": "t11",
      "from": "s5",
      "to": "s5",
      "symbol": "x",
      "write": "x",
      "dir": "L"
    },
    {
      "id": "t12",
      "from": "s5",
      "to": "s6",
      "symbol": "⊔",
      "write": "x",
      "dir": "R"
    },
    {
      "id": "t13",
      "from": "s6",
      "to": "s6",
      "symbol": "x",
      "write": "x",
      "dir": "R"
    },
    {
      "id": "t14",
      "from": "s6",
      "to": "s1",
      "symbol": "0",
      "write": "0",
      "dir": "S"
    },
    {
      "id": "t15",
      "from": "s6",
      "to": "s1",
      "symbol": "1",
      "write": "1",
      "dir": "S"
    },
    {
      "id": "t16",
      "from": "s3",
      "to": "s3",
      "symbol": "0",
      "write": "⊔",
      "dir": "L"
    },
    {
      "id": "t17",
      "from": "s3",
      "to": "s7",
      "symbol": "x",
      "write": "1",
      "dir": "L"
    },
    {
      "id": "t18",
      "from": "s3",
      "to": "s8",
      "symbol": "⊔",
      "write": "⊔",
      "dir": "S"
    },
    {
      "id": "t19",
      "from": "s7",
      "to": "s7",
      "symbol": "x",
      "write": "1",
      "dir": "L"
    },
    {
      "id": "t20",
      "from": "s7",
      "to": "s8",
      "symbol": "⊔",
      "write": "⊔",
      "dir": "S"
    }
  ],
  "startId": "s1",
  "accepts": [
    "s8"
  ],
  "notes": [],
  "dividers": [],
  "blocks": [],
  "meta": {
    "title": "Binary to unary: counting down",
    "blurb": "Input n in binary; output n ones. Subtract 1 from the binary number, add a mark at the far left, and repeat until the number is all zeros; then erase it and turn the marks into 1s. The output is exponentially longer than the input, and so is the running time — there is no faster way to write it.",
    "inputs": [
      {
        "w": "",
        "expect": "accept",
        "label": "0"
      },
      {
        "w": "00110",
        "expect": "accept",
        "label": "6"
      },
      {
        "w": "0",
        "expect": "accept",
        "label": "0"
      },
      {
        "w": "0001100",
        "expect": "accept",
        "label": "12"
      }
    ],
    "library": {
      "author": {
        "login": "thethinkmachine"
      },
      "license": "CC-BY-4.0",
      "tags": [
        "binary-numbers",
        "unary",
        "number-bases",
        "exponential"
      ],
      "difficulty": "intermediate"
    }
  }
}
