{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet a system $S$ of $m$ linear inequalities in real variables $x_1, \\dots, x_n$ be given by\n$$\\sum_{j=1}^{n} a_{ij} x_j \\le b_i, \\qquad i = 1, \\dots, m,$$\nwith $a_{ij}, b_i \\in \\R$.\nSplit the indices into $I_+ = \\set{i : a_{in} \u003e 0}$, $I_- = \\set{i : a_{in} \u003c 0}$ and $I_0 = \\set{i : a_{in} = 0}$.\nThe *Fourier–Motzkin elimination* of $x_n$ from $S$ is the system $S'$ in $x_1, \\dots, x_{n-1}$ consisting of:\n\n1. the inequalities of $S$ with index in $I_0$;\n2. for each pair $(i, k) \\in I_+ \\times I_-$, the inequality\n$$\\sum_{j=1}^{n-1} \\left(a_{in} a_{kj} - a_{kn} a_{ij}\\right) x_j \\le a_{in} b_k - a_{kn} b_i,$$\nobtained by adding $a_{in}$ times inequality $k$ to $-a_{kn}$ times inequality $i$, so that $x_n$ cancels.\n\n## Remarks\n\nThe main property: $(x_1, \\dots, x_{n-1})$ satisfies $S'$ if and only if there is $x_n \\in \\R$ such that $(x_1, \\dots, x_n)$ satisfies $S$.\nIndeed, inequalities in $I_+$ give upper bounds on $x_n$ and those in $I_-$ give lower bounds, and $S'$ says exactly that each lower bound is at most each upper bound.\nSo the solution set of $S'$ is the [[projection|033DA1WE8Y]] of the solution set of $S$ forgetting $x_n$.\n\nExample: for $-x \\le 0$, $-y \\le 0$, $x + y \\le 1$, eliminating $y$ pairs $x + y \\le 1$ (in $I_+$) with $-y \\le 0$ (in $I_-$) and gives $x \\le 1$.\nWith $-x \\le 0$ from $I_0$, the result is $0 \\le x \\le 1$, the projection of the triangle onto the $x$-axis.\n\nNon-example: the method does not work for integer solutions.\nThe system $x - 2y \\le 0$, $-x + 2y \\le 0$ with $x = 1$ has the real solution $y = 1/2$, but no integer solution $y$, while elimination of $y$ gives no condition that excludes $x = 1$.\n\nThe new system can have up to $\\abs{I_0} + \\abs{I_+} \\cdot \\abs{I_-}$ inequalities, at most $m^2/4$ when $I_0$ is empty, so repeated elimination can blow up quickly.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "MJQARBFG10",
    "kind": "definition",
    "msc": [
      "90C05",
      "15A39",
      "52B55"
    ],
    "name": "Fourier–Motzkin elimination",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Fourier%E2%80%93Motzkin_elimination"
      }
    ],
    "tag": "NCZZ90R5Y6",
    "uses": [
      "033DA1WE8Y"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/NCZZ90R5Y6/",
  "links": [
    {
      "field": "defines",
      "target": "MJQARBFG10"
    },
    {
      "field": "uses",
      "target": "033DA1WE8Y"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/NCZZ90R5Y6.md",
  "msc": [
    "90C05",
    "15A39",
    "52B55"
  ],
  "name": "Fourier–Motzkin elimination",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/NCZ/NCZZ90R5Y6.md",
  "status": null,
  "tag": "NCZZ90R5Y6",
  "uri": "m2://NCZZ90R5Y6",
  "url": "https://tamnd.github.io/math2/wiki/fourier-motzkin-elimination-definition/",
  "writing": {
    "tag": "NCZZ90R5Y6",
    "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
      }
    ]
  }
}
