{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Summary\n\nGreedy colouring is a simple method that makes a [[colouring|0874138YP6]] of a finite [[graph|0JD5C82QMB]].\nPut the vertices in an order $v_1, v_2, \\dots, v_n$, and use the colours $1, 2, 3, \\dots$.\nFor $i = 1, \\dots, n$, give $v_i$ the smallest colour that no earlier neighbour of $v_i$ has.\n\n## Remarks\n\nA vertex $v_i$ has at most $\\deg(v_i)$ earlier neighbours. Thus greedy colouring uses at most $\\Delta(G) + 1$ colours, where $\\Delta(G)$ is the [[maximum degree|0KNAN9F27P]].\nThe number of colours depends on the order. For each graph, some order gives an optimal colouring, but such an order is hard to find in general.\nGreedy colouring can be done in linear time.\n\n## Explanations\n\n### L1 human\n\nGo through the vertices one by one, and give each one the first colour that its coloured neighbours do not use.\nIt is fast and simple, but it does not always use the least number of colours.\n",
  "commit": "545acf83a9b75c8ddc375ef8b23d2ae101a4d7e4",
  "front": {
    "kind": "concept",
    "msc": [
      "05C15"
    ],
    "name": "Greedy colouring",
    "same_as": {
      "wikidata": "Q5601715",
      "wikipedia": "Greedy coloring"
    },
    "sources": [
      {
        "locator": "Algorithm",
        "url": "https://en.wikipedia.org/wiki/Greedy_coloring"
      }
    ],
    "tag": "04AAKZNXHD"
  },
  "kind": "concept",
  "link": "https://math2.tamnd.com/node/04AAKZNXHD/",
  "links": null,
  "markdown": "https://math2.tamnd.com/node/04AAKZNXHD.md",
  "msc": [
    "05C15"
  ],
  "name": "Greedy colouring",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/04A/04AAKZNXHD.md",
  "status": null,
  "tag": "04AAKZNXHD",
  "uri": "m2://04AAKZNXHD",
  "url": "https://math2.tamnd.com/wiki/greedy-colouring/",
  "writing": {
    "tag": "04AAKZNXHD",
    "kind": "concept",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
