{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nAn *oracle machine* is a [[Turing machine|758EYCN27B]] with these extra parts:\n\n1. a second tape, the *oracle tape*, on which the machine can read and write;\n2. three special states: a *query state* $q_?$, a *yes state* $q_{\\mathrm{yes}}$ and a *no state* $q_{\\mathrm{no}}$.\n\nLet $O \\subseteq \\N$ be a set, the *oracle*.\nThe machine $M$ *with oracle* $O$, written $M^O$, runs like a Turing machine, except at the query state.\nSuppose $M^O$ enters $q_?$ while the oracle tape holds the binary code of a number $n$.\nThen its next state is $q_{\\mathrm{yes}}$ if $n \\in O$ and $q_{\\mathrm{no}}$ if $n \\notin O$.\nA partial function $f \\colon \\N \\to \\N$ is *computable relative to* $O$ if there is an oracle machine $M$ with this property.\nFor every $x$, the run of $M^O$ on input $x$ halts with output $f(x)$ when $f(x)$ is defined, and does not halt otherwise.\n\n## Remarks\n\nExample: let $M$ copy its input $x$ to the oracle tape, enter $q_?$, and then output $1$ from $q_{\\mathrm{no}}$ and $0$ from $q_{\\mathrm{yes}}$.\nFor each oracle $O$, the machine $M^O$ halts on every input and computes the characteristic function of $\\N \\setminus O$.\n\nNon-example: a device that may query two sets $O_1$ and $O_2$ is not an oracle machine, because an oracle machine queries one fixed set.\nIt can be simulated by an oracle machine with the single oracle $\\set{2n : n \\in O_1} \\cup \\set{2n + 1 : n \\in O_2}$.\n\nA machine that never enters $q_?$ is an ordinary Turing machine, so every computable function is computable relative to every oracle.\nOracle machines can be listed effectively as $M_0, M_1, \\ldots$, and $\\Phi_e^O$ often denotes the partial function computed by $M_e^O$.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "defines": "Z5CCVBME2V",
    "kind": "definition",
    "msc": [
      "03D10",
      "03D30"
    ],
    "name": "Oracle machine",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Oracle_machine"
      }
    ],
    "tag": "DJMXZX0G9G",
    "uses": [
      "758EYCN27B"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/DJMXZX0G9G/",
  "links": [
    {
      "field": "defines",
      "target": "Z5CCVBME2V"
    },
    {
      "field": "uses",
      "target": "758EYCN27B"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/DJMXZX0G9G.md",
  "msc": [
    "03D10",
    "03D30"
  ],
  "name": "Oracle machine",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/DJM/DJMXZX0G9G.md",
  "status": null,
  "tag": "DJMXZX0G9G",
  "uri": "m2://DJMXZX0G9G",
  "url": "https://math2.tamnd.com/wiki/oracle-machine-definition/",
  "writing": {
    "tag": "DJMXZX0G9G",
    "kind": "definition",
    "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
      }
    ]
  }
}
