{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $n \\ge 2$ be an integer and let $T$ be a [[tree|0MJ0JS72DZ]] with vertex set $\\{1, \\dots, n\\}$.\nThe Prüfer sequence of $T$ is the sequence $(a_1, \\dots, a_{n-2})$ that this process gives.\nLet $T_0 = T$. For $i = 1, \\dots, n - 2$, let $\\ell_i$ be the leaf of $T_{i-1}$ with the smallest label.\nLet $a_i$ be the unique neighbour of $\\ell_i$ in $T_{i-1}$, and let $T_i = T_{i-1} - \\ell_i$.\n\n## Remarks\n\nThe map $T \\mapsto (a_1, \\dots, a_{n-2})$ is a bijection from the labelled trees on $\\{1, \\dots, n\\}$ to $\\{1, \\dots, n\\}^{n-2}$. This proves [[Cayley's formula|0M2SSGSYPE]].\nA vertex $v$ appears $\\deg(v) - 1$ times in the sequence. Thus the leaves are the labels that do not appear.\nExample: the star with centre $1$ on $\\{1, 2, 3, 4\\}$ has the sequence $(1, 1)$.\n\n## Explanations\n\n### L1 human\n\nRemove the smallest leaf again and again, and each time write down the vertex it was attached to.\nStop when two vertices are left. The list of $n - 2$ numbers fixes the tree.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "defines": "0GDQRETR59",
    "kind": "definition",
    "msc": [
      "05C05"
    ],
    "name": "Prüfer sequence",
    "sources": [
      {
        "locator": "Algorithm to convert a  tree into a Prüfer sequence",
        "url": "https://en.wikipedia.org/wiki/Prüfer_sequence"
      }
    ],
    "tag": "09PV9JSY6E",
    "uses": [
      "0MJ0JS72DZ"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/09PV9JSY6E/",
  "links": [
    {
      "field": "defines",
      "target": "0GDQRETR59"
    },
    {
      "field": "uses",
      "target": "0MJ0JS72DZ"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/09PV9JSY6E.md",
  "msc": [
    "05C05"
  ],
  "name": "Prüfer sequence",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/09P/09PV9JSY6E.md",
  "status": null,
  "tag": "09PV9JSY6E",
  "uri": "m2://09PV9JSY6E",
  "url": "https://math2.tamnd.com/wiki/prufer-sequence-definition/",
  "writing": {
    "tag": "09PV9JSY6E",
    "kind": "definition",
    "level": "W1",
    "next": [
      {
        "what": "edge instance_of in",
        "note": "one example",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge not_instance_of in",
        "note": "one non-example that fails one clause",
        "have": 0,
        "want": 1
      }
    ]
  }
}
