{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\mathbb{A} = (A; R_1, \\dots, R_k)$ be a relational structure with a finite nonempty universe $A$ and finitely many relations.\nThe *constraint satisfaction problem* $\\operatorname{CSP}(\\mathbb{A})$ is the following decision problem.\nThe input is a finite relational structure $\\mathbb{X}$ with relations of the same arities.\nThe question is whether there is a homomorphism from $\\mathbb{X}$ to $\\mathbb{A}$, a map preserving each relation.\nThe *polymorphism clone* of $\\mathbb{A}$ is the [[clone|PTKR703G6A]] $\\operatorname{Pol}(\\mathbb{A})$ of all operations on $A$ that are [[polymorphisms|A0K9EZRM7E]] of every $R_i$.\nThe *algebraic approach* is the study of the computational complexity of $\\operatorname{CSP}(\\mathbb{A})$ through the algebra $(A; \\operatorname{Pol}(\\mathbb{A}))$.\n\n## Remarks\n\nThe approach rests on a reduction principle.\nIf $\\mathbb{A}$ and $\\mathbb{B}$ share the universe $A$ and $\\operatorname{Pol}(\\mathbb{A}) \\subseteq \\operatorname{Pol}(\\mathbb{B})$, then $\\operatorname{CSP}(\\mathbb{B})$ reduces to $\\operatorname{CSP}(\\mathbb{A})$ in polynomial time.\nThe reason is that each relation of $\\mathbb{B}$ is then primitive positive definable from $\\mathbb{A}$, by the [[Pol–Inv Galois connection|BQ0AC9QX7E]].\nExample: for the complete graph $K_2$, $\\operatorname{CSP}(K_2)$ asks whether a graph is $2$-colourable, as a [[graph homomorphism|052JJ9YVNM]] to $K_2$.\nThe majority operation on $\\set{0, 1}$ is a polymorphism of the edge relation $\\set{(0, 1), (1, 0)}$, and the problem is in polynomial time.\nNon-example of tractability: every polymorphism of $K_3$ has the form $\\sigma(x_i)$ for a permutation $\\sigma$ of $\\set{0, 1, 2}$.\nSo $K_3$ has no Taylor polymorphism, and $3$-colouring is NP-complete.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "3EH4F5H7FT",
    "kind": "definition",
    "msc": [
      "08A70",
      "68Q25"
    ],
    "name": "Algebraic approach to constraint satisfaction",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Constraint_satisfaction_problem"
      }
    ],
    "tag": "1H650VRZVT",
    "uses": [
      "A0K9EZRM7E",
      "PTKR703G6A",
      "052JJ9YVNM",
      "BQ0AC9QX7E"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/1H650VRZVT/",
  "links": [
    {
      "field": "defines",
      "target": "3EH4F5H7FT"
    },
    {
      "field": "uses",
      "target": "A0K9EZRM7E"
    },
    {
      "field": "uses",
      "target": "PTKR703G6A"
    },
    {
      "field": "uses",
      "target": "052JJ9YVNM"
    },
    {
      "field": "uses",
      "target": "BQ0AC9QX7E"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/1H650VRZVT.md",
  "msc": [
    "08A70",
    "68Q25"
  ],
  "name": "Algebraic approach to constraint satisfaction",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/1H6/1H650VRZVT.md",
  "status": null,
  "tag": "1H650VRZVT",
  "uri": "m2://1H650VRZVT",
  "url": "https://tamnd.github.io/math2/wiki/algebraic-approach-to-constraint-satisfaction-definition/",
  "writing": {
    "tag": "1H650VRZVT",
    "kind": "definition",
    "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
      }
    ]
  }
}
