{
  "aliases": null,
  "backlinks": [
    {
      "field": "defines",
      "target": "76NQXSGSHS"
    }
  ],
  "body": "\n## Summary\n\nThis method turns a recurrence for a sequence $(u_n)$ into an equation for its [[generating function|0PHAC833JF]] $U(x) = \\sum_{n \\ge 0} u_n x^n$.\nFor a linear recurrence with constant coefficients, the equation is linear and its solution $U$ is a rational function.\nExpanding $U$ again, for example by partial fractions, gives a closed formula for $u_n$.\nThe method is a standard tool of enumerative combinatorics and of the analysis of algorithms.\n\n## Explanations\n\n### L1 human\n\nA sequence is an infinite list of numbers, which is hard to handle at once.\nPacking the whole list into one power series turns the step-by-step rule into an algebraic equation.\nFor example, if $u_0 = 1$ and $u_{n+1} = 2 u_n$, then $U(x) - 1 = 2 x U(x)$.\nSo $U(x) = 1/(1 - 2x) = \\sum 2^n x^n$, and $u_n = 2^n$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "kind": "concept",
    "msc": [
      "39A06",
      "05A15"
    ],
    "name": "Solution of recurrences by generating functions",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Generating_function"
      }
    ],
    "tag": "WS2E29RZD5"
  },
  "kind": "concept",
  "link": "https://tamnd.github.io/math2/node/WS2E29RZD5/",
  "links": null,
  "markdown": "https://tamnd.github.io/math2/node/WS2E29RZD5.md",
  "msc": [
    "39A06",
    "05A15"
  ],
  "name": "Solution of recurrences by generating functions",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/WS2/WS2E29RZD5.md",
  "status": null,
  "tag": "WS2E29RZD5",
  "uri": "m2://WS2E29RZD5",
  "url": "https://tamnd.github.io/math2/wiki/solution-of-recurrences-by-generating-functions/",
  "writing": {
    "tag": "WS2E29RZD5",
    "kind": "concept",
    "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
      }
    ]
  }
}
