{
  "id": "set-partition",
  "title": "Set Partition",
  "lang": "en",
  "source_lang": "en",
  "summary": "A set partition divides a set into nonempty, mutually disjoint subsets whose union is the entire set.",
  "category": "mathematics",
  "subcategory": "discrete-logic",
  "type": "concept",
  "aliases": [
    "Partition of a set"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/set-partition/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/set-partition/",
      "json": "https://aiwiki.page/zh/set-partition.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A set partition is a collection of nonempty, mutually disjoint subsets, called blocks, that together contain every element of a given set. Each element therefore belongs to exactly one block. Partitions describe grouping without assigning an order to the groups or to their members. They are fundamental objects in set theory and combinatorics, and correspond precisely to equivalence relations. (web.mit.edu)"
    },
    {
      "heading": "Definition and examples",
      "text": "A partition \\(\\pi\\) of a set \\(X\\) is a collection of subsets of \\(X\\) satisfying three conditions:\n\n- Nonemptiness: \\(A\\ne\\varnothing\\) for every \\(A\\in\\pi\\).\n- Disjointness: \\(A\\cap B=\\varnothing\\) whenever \\(A,B\\in\\pi\\) and \\(A\\ne B\\).\n- Exhaustiveness: \\(\\displaystyle\\bigcup_{A\\in\\pi}A=X\\).\n\nThus, a partition is a set of subsets, not a subset of elements of \\(X\\). The number of blocks need not be finite. (web.mit.edu)\n\nFor example, the five partitions of \\(\\{1,2,3\\}\\) are\n\n\\[\\begin{aligned} &\\{\\{1,2,3\\}\\},\\\\ &\\{\\{1\\},\\{2,3\\}\\},\\\\ &\\{\\{2\\},\\{1,3\\}\\},\\\\ &\\{\\{3\\},\\{1,2\\}\\},\\\\ &\\{\\{1\\},\\{2\\},\\{3\\}\\}. \\end{aligned}\\]\n\nReordering the blocks does not produce another partition. The collection \\(\\{\\{1,2\\},\\{2,3\\}\\}\\) fails because its blocks overlap. These examples follow directly from the definition. (web.mit.edu)\n\nFor a nonempty set \\(X\\), the discrete partition consists of all singleton subsets, while the indiscrete partition has the single block \\(X\\). Under the nonempty-block convention, the empty set has exactly one partition: the empty collection of blocks. (math.ucr.edu)"
    },
    {
      "heading": "Equivalence relations and quotient sets",
      "text": "Every partition \\(\\pi\\) defines an equivalence relation by\n\n\\[x\\sim_\\pi y \\quad\\Longleftrightarrow\\quad x\\text{ and }y\\text{ belong to the same block}.\\]\n\nThis relation is reflexive, symmetric, and transitive. Conversely, the equivalence classes of any equivalence relation on \\(X\\) form a partition of \\(X\\). The two constructions are inverse to one another: specifying a partition and specifying an equivalence relation are equivalent descriptions of the same grouping structure. (web.mit.edu)\n\nThe collection of equivalence classes is called the quotient set, written \\(X/{\\sim}\\). For example, congruence modulo a positive integer \\(m\\) partitions the integers into \\(m\\) blocks:\n\n\\[[r]=\\{r+km:k\\in\\mathbb Z\\}, \\qquad r=0,\\ldots,m-1.\\]\n\nBoth the underlying set and each block are infinite, although the number of blocks is finite. (web.mit.edu)\n\nA related construction uses a function \\(f:X\\to Y\\). Equality of outputs, \\(f(x)=f(x')\\), is an equivalence relation, so its nonempty fibers \\(f^{-1}(\\{y\\})\\), for \\(y\\in f(X)\\), partition \\(X\\). This follows from the equivalence-relation correspondence; different labels for the same fibers do not change the partition. (math.ucr.edu)"
    },
    {
      "heading": "Counting finite partitions",
      "text": "The number of partitions of an \\(n\\)-element set into exactly \\(k\\) blocks is the Stirling number of the second kind, denoted\n\n\\[S(n,k) \\quad\\text{or}\\quad \\left\\{\\begin{matrix}n\\\\k\\end{matrix}\\right\\}.\\]\n\nThe elements are distinguishable, but the blocks are unlabeled. The boundary conditions include \\(S(0,0)=1\\), \\(S(n,0)=0\\) for \\(n>0\\), and \\(S(n,n)=1\\). (dlmf.nist.gov)\n\nThese numbers satisfy the recurrence\n\n\\[S(n,k)=S(n-1,k-1)+kS(n-1,k), \\qquad n,k\\ge1.\\]\n\nTo see why, distinguish one element. It either forms a singleton block, leaving \\(k-1\\) blocks among the remaining elements, or joins one of their \\(k\\) existing blocks. An explicit formula is\n\n\\[S(n,k)=\\frac1{k!} \\sum_{j=0}^{k}(-1)^{k-j}\\binom{k}{j}j^n, \\qquad n,k\\ge1,\\]\n\nwhere \\(k!\\) is a factorial and \\(\\binom{k}{j}\\) is a binomial coefficient. In particular, assigning distinct labels to all \\(k\\) blocks gives \\(k!S(n,k)\\) surjective functions onto a fixed \\(k\\)-element set. (dlmf.nist.gov)\n\nThe total number of partitions is the Bell number\n\n\\[B_n=\\sum_{k=0}^{n}S(n,k).\\]\n\nBeginning at \\(n=0\\), the values are\n\n\\[1,\\ 1,\\ 2,\\ 5,\\ 15,\\ 52,\\ 203,\\ 877,\\ldots.\\]\n\nThus, a four-element set has 15 partitions, whereas a ten-element set has 115,975. Bell numbers also count equivalence relations on a finite set, by the correspondence described above. (dlmf.nist.gov)\n\nTheir exponential generating function is\n\n\\[\\sum_{n=0}^{\\infty}B_n\\frac{x^n}{n!} =\\exp(e^x-1).\\]\n\nThey satisfy the recurrence\n\n\\[B_{n+1}=\\sum_{j=0}^{n}\\binom nj B_j.\\]\n\nA combinatorial explanation chooses the \\(j\\) elements outside the block containing a distinguished new element, then partitions those \\(j\\) elements arbitrarily. (dlmf.nist.gov)"
    },
    {
      "heading": "Refinement and the partition lattice",
      "text": "A partition \\(\\pi\\) refines a partition \\(\\sigma\\), written \\(\\pi\\le\\sigma\\), if every block of \\(\\pi\\) is contained in a block of \\(\\sigma\\). Equivalently, \\(\\sigma\\) can be obtained by merging blocks of \\(\\pi\\). Refinement defines a partial order, whose least element is the discrete partition and whose greatest element is the indiscrete partition. (math.ucr.edu)\n\nUnder this order, partitions form a lattice:\n\n- The meet \\(\\pi\\wedge\\sigma\\), their greatest common refinement, consists of all nonempty intersections \\(A\\cap B\\), with \\(A\\in\\pi\\) and \\(B\\in\\sigma\\).\n- The join \\(\\pi\\vee\\sigma\\), their least common coarsening, groups elements connected by chains in which consecutive elements share a block of either partition.\n\nThe lattice of partitions of \\(\\{1,\\ldots,n\\}\\) is conventionally denoted \\(\\Pi_n\\). It organizes the relationships between different groupings, rather than merely counting them. (ocw.mit.edu)"
    },
    {
      "heading": "Distinction from integer partitions",
      "text": "A set partition must not be confused with an integer partition, which expresses a positive integer as an unordered sum of positive integers. For a finite set partition, the block sizes determine an integer partition, but discard information about which elements belong together. For example,\n\n\\[\\{\\{1,2\\},\\{3,4\\}\\} \\quad\\text{and}\\quad \\{\\{1,3\\},\\{2,4\\}\\}\\]\n\nare different set partitions with the same block sizes \\(2+2\\). Counting block-size patterns therefore differs from counting partitions of distinguishable elements. (dlmf.nist.gov)"
    }
  ],
  "links": [
    "set-theory",
    "combinatorics",
    "subset",
    "empty-set",
    "equivalence-relation",
    "equivalence-class",
    "quotient-set",
    "modular-arithmetic",
    "integer",
    "mathematical-function",
    "stirling-numbers",
    "recurrence-relation",
    "factorial",
    "binomial-coefficient",
    "surjective-function",
    "bell-number",
    "generating-function",
    "partial-order",
    "integer-partition"
  ],
  "sources": [
    {
      "title": "Mathematics for Computer Science",
      "url": "https://web.mit.edu/broder/Public/6.042-lecture-notes/lecture-notes.pdf"
    },
    {
      "title": "Lecture 11: The Poset of Partitions",
      "url": "https://math.ucr.edu/home/baez/act_course/lecture_11.html"
    },
    {
      "title": "DLMF: §26.8 Set Partitions: Stirling Numbers",
      "url": "https://dlmf.nist.gov/26.8"
    },
    {
      "title": "DLMF: §26.7 Set Partitions: Bell Numbers",
      "url": "https://dlmf.nist.gov/26.7"
    },
    {
      "title": "212 S19 Algebraic Combinatorics, Lecture 15: Posets and lattices. Boolean lattice. Partition lattice. Young's lattice",
      "url": "https://ocw.mit.edu/courses/18-212-algebraic-combinatorics-spring-2019/7594ef552f84d611f76d9b01cc796260_MIT18_212S19_lec15.pdf"
    },
    {
      "title": "Some of My Favorite Posets",
      "url": "https://math.mit.edu/~rstan/transparencies/posets.pdf"
    },
    {
      "title": "DLMF: Chapter 26 Combinatorial Analysis",
      "url": "https://dlmf.nist.gov/26"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}