How this calculation works
Count functions that hit every target label at least once.
Σ (−1)ᵏ C(m,k)(m−k)ⁿA worked example
From four labels onto three, 81−3×16+3=36.
Good to know
The empty set has one function onto itself.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Read the result
Count functions that hit every target label at least once.
The primary result is labeled “Surjections”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
The empty set has one function onto itself.
For a related exercise, try the greatest common divisor.
A few questions, answered
How can I check the default inputs by hand?
From four labels onto three, 81−3×16+3=36.
Which rule does this calculator apply?
Σ (−1)ᵏ C(m,k)(m−k)ⁿ