{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\set{0,1}^*$ be the set of finite binary strings, and let $\\abs{p}$ denote the length of a string $p$.\nFor a partial [[computable function|KZSB5E471K]] $\\varphi \\colon \\set{0,1}^* \\to \\set{0,1}^*$ and a string $x$, let\n$$C_\\varphi(x) = \\min \\set{\\abs{p} : \\varphi(p) = x},$$\nwith $C_\\varphi(x) = \\infty$ if no such $p$ exists.\nFix a partial computable function $U$, given by a [[universal Turing machine|TC69PEHAX7]], with this property.\nFor every partial computable $\\varphi$ there is a string $q_\\varphi$ with $U(q_\\varphi p) = \\varphi(p)$ for all $p$, where $q_\\varphi p$ is the concatenation.\nThe (plain) *Kolmogorov complexity* of $x$ is $C(x) = C_U(x)$.\n\n## Remarks\n\nInvariance theorem: for every partial computable $\\varphi$ and every $x$, $C(x) \\le C_\\varphi(x) + \\abs{q_\\varphi}$.\nSo two choices of $U$ give complexities that differ by at most a constant.\n\nExample: there is a constant $c$ with $C(x) \\le \\abs{x} + c$ for all $x$, by taking $\\varphi$ the identity, which has $C_\\varphi(x) = \\abs{x}$.\nFor the string $0^n$ of $n$ zeros, $C(0^n) \\le \\log_2 n + c'$ for a constant $c'$, because a program can read $n$ in binary and print $n$ zeros.\n\nNon-example: $C_{\\mathrm{id}}(x) = \\abs{x}$, the complexity for the identity function, is not the Kolmogorov complexity.\nThe identity is not universal, and $C_{\\mathrm{id}}(0^n) = n$ exceeds $C(0^n)$ by more than any constant.\n\nFor each $n$ there is a string $x$ of length $n$ with $C(x) \\ge n$, since there are $2^n$ such strings but only $2^n - 1$ strings of length less than $n$.\nThe function $C$ is not computable.\nA variant, the prefix-free complexity $K$, uses a universal machine whose domain is a prefix-free set.\n",
  "commit": "5fc425f97f1f6b11da5892c2948ef8c5d8805665",
  "front": {
    "defines": "8PY3K6NCKF",
    "kind": "definition",
    "msc": [
      "68Q30",
      "03D32"
    ],
    "name": "Kolmogorov complexity",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Kolmogorov_complexity"
      }
    ],
    "tag": "18DPY9J8YP",
    "uses": [
      "TC69PEHAX7",
      "KZSB5E471K"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/18DPY9J8YP/",
  "links": [
    {
      "field": "defines",
      "target": "8PY3K6NCKF"
    },
    {
      "field": "uses",
      "target": "TC69PEHAX7"
    },
    {
      "field": "uses",
      "target": "KZSB5E471K"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/18DPY9J8YP.md",
  "msc": [
    "68Q30",
    "03D32"
  ],
  "name": "Kolmogorov complexity",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/18D/18DPY9J8YP.md",
  "status": null,
  "tag": "18DPY9J8YP",
  "uri": "m2://18DPY9J8YP",
  "url": "https://math2.tamnd.com/wiki/kolmogorov-complexity-definition/",
  "writing": {
    "tag": "18DPY9J8YP",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
