{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe use [[double counting|0F8YBHF2W3]] of vertex–edge incidences.\n\n1. The set $V$ is finite. The [[edge set|0WNGQBPPQX]] $E$ consists of $2$-element subsets of $V$, so $E$ is finite too.\n2. Let $R = \\set{(v, e) \\in V \\times E : v \\in e}$, the set of incidences.\n3. Fix $v \\in V$. The number of $e \\in E$ with $(v, e) \\in R$ is the number of edges that contain $v$. By the definition of the [[degree|0T0F6CCS9W]], this is $\\deg(v)$.\n4. Fix $e \\in E$. The number of $v \\in V$ with $(v, e) \\in R$ is $\\abs{e} = 2$, since each edge of a [[graph|0JD5C82QMB]] is a $2$-element subset of $V$.\n5. Counting $R$ by its first coordinate gives $\\abs{R} = \\sum_{v \\in V} \\deg(v)$, by step 3.\n6. Counting $R$ by its second coordinate gives $\\abs{R} = \\sum_{e \\in E} 2 = 2 \\abs{E}$, by step 4.\n7. Comparing steps 5 and 6 gives $\\sum_{v \\in V} \\deg(v) = 2 \\abs{E}$.\n\n## Idea\n\nEach edge has exactly two ends. Adding up the degrees counts every edge once at each end, so every edge is counted twice.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "05C07"
    ],
    "name": "Proof of the handshaking lemma by double counting",
    "proves": "0XAP8WHNES",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Handshaking_lemma"
      }
    ],
    "tag": "4M6ESXZ5B0",
    "uses": [
      "0JD5C82QMB",
      "0WNGQBPPQX",
      "0T0F6CCS9W",
      "0F8YBHF2W3"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/4M6ESXZ5B0/",
  "links": [
    {
      "field": "proves",
      "target": "0XAP8WHNES"
    },
    {
      "field": "uses",
      "target": "0JD5C82QMB"
    },
    {
      "field": "uses",
      "target": "0WNGQBPPQX"
    },
    {
      "field": "uses",
      "target": "0T0F6CCS9W"
    },
    {
      "field": "uses",
      "target": "0F8YBHF2W3"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/4M6ESXZ5B0.md",
  "msc": [
    "05C07"
  ],
  "name": "Proof of the handshaking lemma by double counting",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/4M6/4M6ESXZ5B0.md",
  "status": null,
  "tag": "4M6ESXZ5B0",
  "uri": "m2://4M6ESXZ5B0",
  "url": "https://math2.tamnd.com/wiki/proof-of-the-handshaking-lemma-by-double-counting/",
  "writing": {
    "tag": "4M6ESXZ5B0",
    "kind": "proof",
    "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
      }
    ]
  }
}
