Math 2.0

statement theorem

Number of compositions

Statement

Let nn be a positive integer. Then the number of compositions of nn is 2n−12^{n-1}.

Remarks

Proof: write nn as a row of nn ones. A composition is a choice of where to cut among the n−1n - 1 gaps between them. The number of compositions of nn into exactly kk parts is (n−1k−1)\binom{n-1}{k-1}. For n=0n = 0 there is one composition, the empty one.

Explanations

L1 human

Put nn dots in a row. Between two neighbours you either draw a bar or you do not. There are n−1n - 1 gaps with 22 choices each, so there are 2n−12^{n-1} compositions.

What this node needs for W1
  • an inventory row: the row of the inventory that the node accounts for (0 of 1)

The writing levels say how complete the text of a node is. They do not measure its truth.

What this needs

To read this node, read these 2 nodes in this order. The foundations come first, and the list ends with this node.

Each node uses the nodes above it. The colour of the bar on a box shows the evidence level, and the box also gives it as text. The list below has the same nodes.
  • no evidence level
  1. Composition of an integer definition
  2. Number of compositions statement

Sources

  1. Web https://en.wikipedia.org/wiki/Composition_(combinatorics), Number of compositions