Math 2.0

Combinatorics Lemma

Number of functions that avoid a given set of values

Builds on Cardinality of a finite setNumber of functions between finite setsImage of a set

Statement

Let mm and nn be positive integers. Put [m]={1,…,m}[m]=\{1,\dots,m\} and [n]={1,…,n}[n]=\{1,\dots,n\}.

For a subset S⊆[m]S\subseteq[m], let N(S)N(S) be the number of functions from [n][n] to [m][m] whose image contains no element of SS.

Then N(S)N(S) depends only on the cardinality of SS. If ∣S∣=k|S|=k, then N(S)=(m−k)n.N(S)=(m-k)^n.

Remarks

A function that avoids SS is the same as a function from [n][n] to the set [m]∖S[m]\setminus S, which has m−km-k elements. The count of functions between finite sets gives (m−k)n(m-k)^n.

For k=mk=m the value is 00, since n≥1n\ge 1 and there is no function into the empty set.

Reading path

To understand this page from the ground up, read these 18 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Cardinality of a finite set definition
  2. Element definition
  3. Proposition concept
  4. Rule of product statement
  5. Set definition
  6. Implication definition
  7. Predicate definition
  8. Number of functions between finite sets statement
  9. Ordered pair definition
  10. Existential quantifier definition
  11. Universal quantifier definition
  12. Cartesian product definition
  13. Subset definition
  14. Uniqueness quantifier definition
  15. Binary relation definition
  16. Function definition
  17. Image of a set definition
  18. Number of functions that avoid a given set of values statement

Further reading

  1. Web https://github.com/mitchkeller/applied-combinatorics/blob/ebd95d6bd59e23c633c65cf560bcb93efa912aae/source/s_inclusion-exclusion_surjections.ptx#L9, source/s_inclusion-exclusion_surjections.ptx:9
About this page
TagPDPZXDA32Q
URIm2://PDPZXDA32Q
Kindstatement, lemma
WritingW1 stated
MSC05A05
StatusThis copy of the site has no build data. Run m2 status PDPZXDA32Q.
UsesCardinality of a finite set, Number of functions between finite sets, Image of a set
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W2

  • edge about out: the concepts that the statement is about (0 of 1)
  • edge proves in: at least one proof node (0 of 1)
  • edge instance_of or illustrates in: one example that shows the statement at work (0 of 1)
  • explanation L2 (0 of 1)

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

What links here

No page links to this page yet.