Welcome to the Interactive Twelvefold Way. This tutorial will guide you to use this app! (Press anywhere on the screen to continue)

Interactive Twelvefold Way

Twelvefold Way is a series of twelve formulas relating to two finite sets in Combinatorics. Each formula is set with different constraints and configurations.

Refer to general tips below for more information on terminologies and strategies. If you want to change formulas, click on a formula on the grid to change it!

Cannot add configuration!

All moveable shapes placed. Click submit!

Configuration added!

You got all the configurations! Well done!

Try again?

YesNo

$k$ balls/bars

$n$ bins/stars

Unrestricted

Unrestricted means all bin can have as many or as little balls as they want.

Injective

Injective means that all bins must have at most one ball.

Surjective

Surjective means that all bins must have at least one ball.

distinguishable

distinguishable

$$n^k$$ $$\frac{n!}{(n-k)!}$$ $$S(k,n) × n!$$

distinguishable

indistinguishable

$$\sum_{i=0}^k S(k,i)$$ \[ \begin{cases} 1 & k\leq n \\ 0 & otherwise \end{cases} \] $$S(k,n)$$

indistinguishable

distinguishable

$${n+k-1 \choose n-1}$$ $${n \choose k}$$ $${n-1 \choose k-1}$$

indistinguishable

indistinguishable

$$\sum_{i=0}^k P(k,i)$$ \[ \begin{cases} 1 & k\leq n \\ 0 & otherwise \end{cases} \] $$P(k,n)$$

General Tips