{
  "format": "automata-studio/workspace",
  "schema": 1,
  "app": "dev",
  "machine": "ITM",
  "config": {
    "sym": {
      "eps": "ε",
      "any": "Σ",
      "blank": "⊔",
      "leftMarker": "⊢",
      "rightMarker": "⊣",
      "stackBottom": "Z",
      "lambda": "λ"
    }
  },
  "sigma": [
    "1"
  ],
  "stackAlpha": [
    "1",
    "⊔",
    "#",
    "m",
    "x",
    "y"
  ],
  "outputAlpha": [],
  "tapeCount": 1,
  "states": [
    {
      "id": "s1",
      "x": 140,
      "y": 208,
      "name": "init"
    },
    {
      "id": "s2",
      "x": 319,
      "y": 255,
      "name": "yes"
    },
    {
      "id": "s3",
      "x": 319,
      "y": 160,
      "name": "toEnd"
    },
    {
      "id": "s4",
      "x": 498,
      "y": 208,
      "name": "ruler1"
    },
    {
      "id": "s5",
      "x": 677,
      "y": 208,
      "name": "home"
    },
    {
      "id": "s6",
      "x": 856,
      "y": 208,
      "name": "nextM"
    },
    {
      "id": "s7",
      "x": 1035,
      "y": 208,
      "name": "scanM"
    },
    {
      "id": "s8",
      "x": 1214,
      "y": 208,
      "name": "findM"
    },
    {
      "id": "s9",
      "x": 1393,
      "y": 255,
      "name": "back1"
    },
    {
      "id": "s10",
      "x": 1393,
      "y": 160,
      "name": "grow"
    },
    {
      "id": "s11",
      "x": 1572,
      "y": 255,
      "name": "back2"
    },
    {
      "id": "s12",
      "x": 1751,
      "y": 255,
      "name": "cross"
    },
    {
      "id": "s13",
      "x": 1930,
      "y": 208,
      "name": "scanX"
    },
    {
      "id": "s14",
      "x": 1572,
      "y": 160,
      "name": "ext"
    },
    {
      "id": "s15",
      "x": 1751,
      "y": 160,
      "name": "ext2"
    }
  ],
  "transitions": [
    {
      "id": "t1",
      "from": "s1",
      "to": "s2",
      "symbol": "⊔",
      "write": "⊔",
      "dir": "S"
    },
    {
      "id": "t2",
      "from": "s1",
      "to": "s3",
      "symbol": "1",
      "write": "1",
      "dir": "R"
    },
    {
      "id": "t3",
      "from": "s3",
      "to": "s3",
      "symbol": "1",
      "write": "1",
      "dir": "R"
    },
    {
      "id": "t4",
      "from": "s3",
      "to": "s4",
      "symbol": "⊔",
      "write": "#",
      "dir": "R"
    },
    {
      "id": "t5",
      "from": "s4",
      "to": "s5",
      "symbol": "⊔",
      "write": "m",
      "dir": "L"
    },
    {
      "id": "t6",
      "from": "s5",
      "to": "s5",
      "symbol": "1",
      "write": "1",
      "dir": "L"
    },
    {
      "id": "t7",
      "from": "s5",
      "to": "s5",
      "symbol": "x",
      "write": "x",
      "dir": "L"
    },
    {
      "id": "t8",
      "from": "s5",
      "to": "s5",
      "symbol": "#",
      "write": "#",
      "dir": "L"
    },
    {
      "id": "t9",
      "from": "s5",
      "to": "s5",
      "symbol": "m",
      "write": "m",
      "dir": "L"
    },
    {
      "id": "t10",
      "from": "s5",
      "to": "s5",
      "symbol": "y",
      "write": "y",
      "dir": "L"
    },
    {
      "id": "t11",
      "from": "s5",
      "to": "s6",
      "symbol": "⊔",
      "write": "⊔",
      "dir": "R"
    },
    {
      "id": "t12",
      "from": "s6",
      "to": "s6",
      "symbol": "x",
      "write": "x",
      "dir": "R"
    },
    {
      "id": "t13",
      "from": "s6",
      "to": "s7",
      "symbol": "1",
      "write": "1",
      "dir": "R"
    },
    {
      "id": "t14",
      "from": "s6",
      "to": "s2",
      "symbol": "#",
      "write": "#",
      "dir": "S"
    },
    {
      "id": "t15",
      "from": "s7",
      "to": "s7",
      "symbol": "1",
      "write": "1",
      "dir": "R"
    },
    {
      "id": "t16",
      "from": "s7",
      "to": "s8",
      "symbol": "#",
      "write": "#",
      "dir": "R"
    },
    {
      "id": "t17",
      "from": "s8",
      "to": "s8",
      "symbol": "y",
      "write": "y",
      "dir": "R"
    },
    {
      "id": "t18",
      "from": "s8",
      "to": "s9",
      "symbol": "m",
      "write": "y",
      "dir": "L"
    },
    {
      "id": "t19",
      "from": "s8",
      "to": "s10",
      "symbol": "⊔",
      "write": "⊔",
      "dir": "L"
    },
    {
      "id": "t20",
      "from": "s9",
      "to": "s9",
      "symbol": "y",
      "write": "y",
      "dir": "L"
    },
    {
      "id": "t21",
      "from": "s9",
      "to": "s9",
      "symbol": "m",
      "write": "m",
      "dir": "L"
    },
    {
      "id": "t22",
      "from": "s9",
      "to": "s11",
      "symbol": "#",
      "write": "#",
      "dir": "L"
    },
    {
      "id": "t23",
      "from": "s11",
      "to": "s11",
      "symbol": "1",
      "write": "1",
      "dir": "L"
    },
    {
      "id": "t24",
      "from": "s11",
      "to": "s12",
      "symbol": "x",
      "write": "x",
      "dir": "R"
    },
    {
      "id": "t25",
      "from": "s11",
      "to": "s12",
      "symbol": "⊔",
      "write": "⊔",
      "dir": "R"
    },
    {
      "id": "t26",
      "from": "s12",
      "to": "s13",
      "symbol": "1",
      "write": "x",
      "dir": "R"
    },
    {
      "id": "t27",
      "from": "s13",
      "to": "s13",
      "symbol": "1",
      "write": "1",
      "dir": "R"
    },
    {
      "id": "t28",
      "from": "s13",
      "to": "s8",
      "symbol": "#",
      "write": "#",
      "dir": "R"
    },
    {
      "id": "t29",
      "from": "s10",
      "to": "s10",
      "symbol": "y",
      "write": "m",
      "dir": "L"
    },
    {
      "id": "t30",
      "from": "s10",
      "to": "s14",
      "symbol": "#",
      "write": "#",
      "dir": "R"
    },
    {
      "id": "t31",
      "from": "s14",
      "to": "s14",
      "symbol": "m",
      "write": "m",
      "dir": "R"
    },
    {
      "id": "t32",
      "from": "s14",
      "to": "s15",
      "symbol": "⊔",
      "write": "m",
      "dir": "R"
    },
    {
      "id": "t33",
      "from": "s15",
      "to": "s5",
      "symbol": "⊔",
      "write": "m",
      "dir": "L"
    }
  ],
  "startId": "s1",
  "accepts": [
    "s2"
  ],
  "notes": [],
  "dividers": [],
  "blocks": [],
  "meta": {
    "title": "Is n a perfect square? 1 + 3 + 5 + …",
    "blurb": "A square is a sum of consecutive odd numbers: 16 = 1 + 3 + 5 + 7. A ruler after a # starts with one mark; each round crosses off as many of the input’s 1s as the ruler has marks, then lengthens the ruler by two. The input is a square exactly when it runs out at the end of a round. The machine finds its left end by walking to a blank, so its tape extends both ways.",
    "inputs": [
      {
        "w": "",
        "expect": "accept"
      },
      {
        "w": "1",
        "expect": "accept"
      },
      {
        "w": "1111",
        "expect": "accept"
      },
      {
        "w": "111111111",
        "expect": "accept"
      },
      {
        "w": "11",
        "expect": "reject"
      },
      {
        "w": "111",
        "expect": "reject"
      },
      {
        "w": "11111",
        "expect": "reject"
      },
      {
        "w": "11111111",
        "expect": "reject"
      }
    ],
    "library": {
      "author": {
        "login": "thethinkmachine"
      },
      "license": "CC-BY-4.0",
      "tags": [
        "number-theory",
        "unary",
        "squares"
      ],
      "difficulty": "advanced"
    }
  }
}
