{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $m$ and $n$ be positive integers. Put $[m]=\\{1,\\dots,m\\}$ and $[n]=\\{1,\\dots,n\\}$.\n\nFor a subset $S\\subseteq[m]$, let $N(S)$ be the number of functions from $[n]$ to $[m]$ whose [[image|0Q3F20XB0A]] contains no element of $S$.\n\nThen $N(S)$ depends only on the [[cardinality|05099E1NMJ]] of $S$. If $|S|=k$, then\n$$N(S)=(m-k)^n.$$\n\n## Remarks\n\nA function that avoids $S$ is the same as a function from $[n]$ to the set $[m]\\setminus S$, which has $m-k$ elements. The [[count of functions between finite sets|08QQH9F7G0]] gives $(m-k)^n$.\n\nFor $k=m$ the value is $0$, since $n\\ge 1$ and there is no function into the empty set.\n",
  "commit": "bdea0329dc328964ec62566e23a0159c6ce93f2d",
  "front": {
    "kind": "statement",
    "msc": [
      "05A05"
    ],
    "name": "Number of functions that avoid a given set of values",
    "role": "lemma",
    "sources": [
      {
        "locator": "source/s_inclusion-exclusion_surjections.ptx:9",
        "url": "https://github.com/mitchkeller/applied-combinatorics/blob/ebd95d6bd59e23c633c65cf560bcb93efa912aae/source/s_inclusion-exclusion_surjections.ptx#L9"
      }
    ],
    "tag": "PDPZXDA32Q",
    "uses": [
      "05099E1NMJ",
      "08QQH9F7G0",
      "0Q3F20XB0A"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/PDPZXDA32Q/",
  "links": [
    {
      "field": "uses",
      "target": "05099E1NMJ"
    },
    {
      "field": "uses",
      "target": "08QQH9F7G0"
    },
    {
      "field": "uses",
      "target": "0Q3F20XB0A"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/PDPZXDA32Q.md",
  "msc": [
    "05A05"
  ],
  "name": "Number of functions that avoid a given set of values",
  "prov": null,
  "role": "lemma",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/PDP/PDPZXDA32Q.md",
  "status": null,
  "tag": "PDPZXDA32Q",
  "uri": "m2://PDPZXDA32Q",
  "url": "https://math2.tamnd.com/wiki/number-of-functions-that-avoid-a-given-set-of-values/",
  "writing": {
    "tag": "PDPZXDA32Q",
    "kind": "statement",
    "level": "W1",
    "next": [
      {
        "what": "edge about out",
        "note": "the concepts that the statement is about",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge proves in",
        "note": "at least one proof node",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge instance_of or illustrates in",
        "note": "one example that shows the statement at work",
        "have": 0,
        "want": 1
      },
      {
        "what": "explanation L2",
        "have": 0,
        "want": 1
      }
    ]
  }
}
