{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $G$ be a finite acyclic [[directed graph|0KFYGSHHF5]] whose edges carry weights in a [[commutative ring|0310REJJY8]].\nThe weight $\\omega(P)$ of a directed [[path|03NAMV1DHJ]] $P$ is the product of the weights of its edges.\nFor vertices $a, b$, let $e(a, b) = \\sum_P \\omega(P)$, the sum over all paths $P$ from $a$ to $b$.\nLet $a_1, \\dots, a_n$ and $b_1, \\dots, b_n$ be vertices of $G$ and let $M$ be the $n \\times n$ matrix with entries $M_{ij} = e(a_i, b_j)$.\nLet $\\mathcal{F}$ be the set of all tuples $(\\sigma, P_1, \\dots, P_n)$, where $\\sigma$ is a permutation of $\\set{1, \\dots, n}$ and $P_1, \\dots, P_n$ are pairwise vertex-disjoint paths.\nHere $P_i$ goes from $a_i$ to $b_{\\sigma(i)}$ for each $i$.\nThen\n$$\\det M = \\sum_{(\\sigma, P_1, \\dots, P_n) \\in \\mathcal{F}} \\sgn(\\sigma) \\prod_{i=1}^{n} \\omega(P_i).$$\n\n## Remarks\n\nExpand the [[determinant|00KDZRW4C0]] by the Leibniz formula: it is a signed sum over all families of paths $P_i$ from $a_i$ to $b_{\\sigma(i)}$, disjoint or not.\nOn the families that meet, define an involution as follows.\nTake the smallest $i$ such that $P_i$ meets another path, and the first vertex $v$ on $P_i$ that lies on another path.\nTake the smallest $j \\ne i$ with $v \\in P_j$, and swap the parts of $P_i$ and $P_j$ after $v$.\nThe involution keeps the product of weights and changes the [[sign|02DKV69ZH0]] of $\\sigma$, so these terms cancel.\n\nOften the vertices are placed so that only $\\sigma = \\id$ admits disjoint paths.\nThen $\\det M$ is the weighted number of families of disjoint paths from $a_i$ to $b_i$.\n\nExample: in the grid $\\Z^2$ with unit steps to the east and to the north and all weights $1$, take $a_1 = (0, 1)$, $a_2 = (1, 0)$, $b_1 = (1, 2)$, $b_2 = (2, 1)$.\nThe path counts are binomial coefficients, $M = \\begin{pmatrix} 2 \u0026 1 \\\\ 1 \u0026 2 \\end{pmatrix}$, and $\\det M = 3$.\nOf the $4$ pairs of paths $a_1 \\to b_1$, $a_2 \\to b_2$, exactly one meets (both pass through $(1, 1)$), and no disjoint pair goes $a_1 \\to b_2$, $a_2 \\to b_1$; so there are $3$ disjoint pairs.\n\n## Explanations\n\n### L1 human\n\nCounting families of paths that never touch each other is hard to do directly.\nThe lemma says that a determinant does it for you: the entries count single paths, and the signs in the determinant cancel every family in which paths touch.\nThe trick is to swap the tails of two touching paths at their first meeting point.\n\n### L2 human\n\nThe lemma is a standard way to turn a determinant into a count, or a count into a determinant.\nIt proves the Jacobi–Trudi formula for Schur functions, where semistandard tableaux become families of disjoint lattice paths.\nIt also counts plane partitions in a box and rhombus tilings of hexagons.\nIt is due to Lindström, and Gessel and Viennot brought it into enumerative combinatorics.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "about": [
      "0KFYGSHHF5",
      "00KDZRW4C0"
    ],
    "kind": "statement",
    "msc": [
      "05A15",
      "05C38",
      "15A15"
    ],
    "name": "Lindström–Gessel–Viennot lemma",
    "role": "lemma",
    "same_as": {
      "wikidata": "Q6552939",
      "wikipedia": "Lindström–Gessel–Viennot lemma"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Lindstr%C3%B6m%E2%80%93Gessel%E2%80%93Viennot_lemma"
      }
    ],
    "tag": "JV24HVZPJ0",
    "uses": [
      "0KFYGSHHF5",
      "03NAMV1DHJ",
      "00KDZRW4C0",
      "02DKV69ZH0",
      "0310REJJY8"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/JV24HVZPJ0/",
  "links": [
    {
      "field": "about",
      "target": "0KFYGSHHF5"
    },
    {
      "field": "about",
      "target": "00KDZRW4C0"
    },
    {
      "field": "uses",
      "target": "0KFYGSHHF5"
    },
    {
      "field": "uses",
      "target": "03NAMV1DHJ"
    },
    {
      "field": "uses",
      "target": "00KDZRW4C0"
    },
    {
      "field": "uses",
      "target": "02DKV69ZH0"
    },
    {
      "field": "uses",
      "target": "0310REJJY8"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/JV24HVZPJ0.md",
  "msc": [
    "05A15",
    "05C38",
    "15A15"
  ],
  "name": "Lindström–Gessel–Viennot lemma",
  "prov": null,
  "role": "lemma",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/JV2/JV24HVZPJ0.md",
  "status": null,
  "tag": "JV24HVZPJ0",
  "uri": "m2://JV24HVZPJ0",
  "url": "https://math2.tamnd.com/wiki/lindstrom-gessel-viennot-lemma/",
  "writing": {
    "tag": "JV24HVZPJ0",
    "kind": "statement",
    "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
      }
    ]
  }
}
