{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $G$ be a finite [[graph|0JD5C82QMB]].\nA Hamiltonian path in $G$ is a [[path|0JDE56HWQ8]] in $G$ that contains every vertex of $G$.\n\n## Remarks\n\nSince a path visits each vertex at most once, a Hamiltonian path of a graph with $n$ vertices visits each vertex exactly once and has length $n - 1$.\nDeleting one edge from a [[Hamiltonian cycle|0HKXNG2RS1]] gives a Hamiltonian path, so every [[Hamiltonian graph|090WPKFABX]] has one.\nThe converse fails: the [[Petersen graph|0NR95CTFCZ]] has a Hamiltonian path but no Hamiltonian cycle.\nExample: in the [[cycle graph|0QQ0F12962]] $C_4$ with vertices $1, 2, 3, 4$ in cyclic order, the path $(1, 2, 3, 4)$ contains all four vertices, so it is a Hamiltonian path.\nNon-example: the star $K_{1,3}$ with centre $c$ and leaves $a, b, d$ has no Hamiltonian path.\nEach edge contains $c$, so a path alternates between $c$ and leaves, and since it visits $c$ at most once, it contains at most two leaves.\nA graph with a Hamiltonian path is connected.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "defines": "MBASZABTJ1",
    "kind": "definition",
    "msc": [
      "05C45"
    ],
    "name": "Hamiltonian path",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Hamiltonian_path"
      }
    ],
    "tag": "AT8GWPWQWT",
    "uses": [
      "0JD5C82QMB",
      "0JDE56HWQ8"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/AT8GWPWQWT/",
  "links": [
    {
      "field": "defines",
      "target": "MBASZABTJ1"
    },
    {
      "field": "uses",
      "target": "0JD5C82QMB"
    },
    {
      "field": "uses",
      "target": "0JDE56HWQ8"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/AT8GWPWQWT.md",
  "msc": [
    "05C45"
  ],
  "name": "Hamiltonian path",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/AT8/AT8GWPWQWT.md",
  "status": null,
  "tag": "AT8GWPWQWT",
  "uri": "m2://AT8GWPWQWT",
  "url": "https://math2.tamnd.com/wiki/hamiltonian-path-definition/",
  "writing": {
    "tag": "AT8GWPWQWT",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
