{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $n$ be a positive integer.\nThen the number of [[compositions|0J8ANSYKAC]] of $n$ is $2^{n-1}$.\n\n## Remarks\n\nProof: write $n$ as a row of $n$ ones. A composition is a choice of where to cut among the $n - 1$ gaps between them.\nThe number of compositions of $n$ into exactly $k$ parts is $\\binom{n-1}{k-1}$.\nFor $n = 0$ there is one composition, the empty one.\n\n## Explanations\n\n### L1 human\n\nPut $n$ dots in a row. Between two neighbours you either draw a bar or you do not.\nThere are $n - 1$ gaps with $2$ choices each, so there are $2^{n-1}$ compositions.\n",
  "commit": "f591989ed15704e9d8755a7a5a6426d73de7a3ae",
  "front": {
    "kind": "statement",
    "msc": [
      "05A17"
    ],
    "name": "Number of compositions",
    "role": "theorem",
    "sources": [
      {
        "locator": "Number of compositions",
        "url": "https://en.wikipedia.org/wiki/Composition_(combinatorics)"
      }
    ],
    "tag": "057H72B2MB",
    "uses": [
      "0J8ANSYKAC"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/057H72B2MB/",
  "links": [
    {
      "field": "uses",
      "target": "0J8ANSYKAC"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/057H72B2MB.md",
  "msc": [
    "05A17"
  ],
  "name": "Number of compositions",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/057/057H72B2MB.md",
  "status": null,
  "tag": "057H72B2MB",
  "uri": "m2://057H72B2MB",
  "url": "https://math2.tamnd.com/wiki/number-of-compositions/",
  "writing": {
    "tag": "057H72B2MB",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
