{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Example\n\nA *semiautomaton* is a triple $(Q, \\Sigma, \\delta)$ with a set of states $Q$ and a set of input letters $\\Sigma$.\nThe map $\\delta \\colon Q \\times \\Sigma \\to Q$ is the transition function.\nFor each letter $a \\in \\Sigma$ put $\\delta_a(q) = \\delta(q, a)$.\nThen each $\\delta_a$ maps $Q$ to $Q$, so $(Q, (\\delta_a)_{a \\in \\Sigma})$ is a [[unary algebra|XD10P9CJMD]] with index set $\\Sigma$.\nConversely, a unary algebra $(Q, (f_a)_{a \\in \\Sigma})$ gives the semiautomaton with $\\delta(q, a) = f_a(q)$, so the two notions are the same data.\n\nConcretely, let $Q = \\set{\\mathrm{even}, \\mathrm{odd}}$ and $\\Sigma = \\set{0, 1}$, with $\\delta_0$ the identity of $Q$ and $\\delta_1$ the map that swaps $\\mathrm{even}$ and $\\mathrm{odd}$.\nReading a binary word moves the state according to the parity of the number of letters $1$ read so far.\n\nUnder this translation, a homomorphism of unary algebras is a map of states that commutes with every transition.\nA subalgebra is a set of states closed under all transitions.\nA congruence is an equivalence of states compatible with all transitions.\nA deterministic finite automaton is a finite semiautomaton with a start state and a set of accepting states added.\n\n## Explanations\n\n### L1 human\n\nA semiautomaton is a machine that changes its state each time it reads a letter.\nFor each letter there is a rule that sends every state to a new state.\nSo each letter is a map from the set of states to itself, and the machine is a set with a family of such maps.\nThat is exactly a unary algebra, so the tools of universal algebra, such as quotients and homomorphisms, apply directly to machines.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "instance_of": [
      "XD10P9CJMD"
    ],
    "kind": "example",
    "msc": [
      "08A60",
      "20M35",
      "68Q70"
    ],
    "name": "Semiautomaton as a unary algebra",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Semiautomaton"
      }
    ],
    "tag": "RTMYXRDGWR"
  },
  "kind": "example",
  "link": "https://tamnd.github.io/math2/node/RTMYXRDGWR/",
  "links": [
    {
      "field": "instance_of",
      "target": "XD10P9CJMD"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/RTMYXRDGWR.md",
  "msc": [
    "08A60",
    "20M35",
    "68Q70"
  ],
  "name": "Semiautomaton as a unary algebra",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/RTM/RTMYXRDGWR.md",
  "status": null,
  "tag": "RTMYXRDGWR",
  "uri": "m2://RTMYXRDGWR",
  "url": "https://tamnd.github.io/math2/wiki/semiautomaton-as-a-unary-algebra/",
  "writing": {
    "tag": "RTMYXRDGWR",
    "kind": "example",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
