---
title: Weak Compositions in Combinatorics
url: https://www.emergentmind.com/topics/weak-compositions
type: topic
---

# Weak Compositions in Combinatorics

A weak composition of a nonnegative integer $n$ into $l$ parts is an ordered $l$-tuple $x = (x_1, x_2, \dots, x_l)$ of nonnegative integers with $\sum_{i=1}^l x_i = n$. Weak compositions generalize ordinary (strong) compositions by allowing zero parts, providing a fundamental combinatorial structure central to enumerative combinatorics, algebraic combinatorics, extremal set theory, and the theory of codes, and appearing as the basic indexing objects in the structure theory of symmetric and quasi-symmetric functions. Weak analogs of compositional structures also play critical roles in higher category theory, Hopf algebras, coding theory, and extremal combinatorics.

## 1. Combinatorial Definition and Enumeration

A weak composition of $n$ into $l$ parts is a tuple $(x_1, \dots, x_l)\in\mathbb{N}_0^l$ with $x_1+\cdots+x_l = n$. Denote the set of all such by $P(n, l)$. Allowing the number of parts to vary, denote by $WC_n$ the set of all weak compositions of $n$, and $WC = \bigsqcup_n WC_n$. Ordinary compositions, i.e., tuples with $x_i > 0$ for all $i$, form a subfamily.

Enumeration of $P(n, l)$ follows the classical stars-and-bars argument:
\[
|P(n, l)| = \binom{n + l - 1}{l - 1}.
\]
The ordinary generating function with respect to $n$ is
\[
\sum_{n \geq 0} |P(n, l)| x^n = (1-x)^{-l}.
\]
For weak $s$-compositions, i.e., $l = s$ fixed,
\[
|\Delta_s(n)| = \binom{n + s - 1}{s - 1},\quad \Delta_s(n) = \{(a_0, ..., a_{s-1}) \in \mathbb{N}_0^s : \sum_i a_i = n\}.
\]
Explicit inclusion of zeros allows weak compositions to enumerate structures and categories inaccessible to the strict theory, indexing finer algebraic and combinatorial bases and imposing richer lattice structures.

## 2. Structure and Lattice Orders

The set $\Delta_s(n)$ of weak $s$-compositions of $n$ admits a natural partial order, called the dominance or majorization order: for $a, b \in \Delta_s(n)$, define
\[
a \preceq b \iff \sum_{i=0}^j a_i \leq \sum_{i=0}^j b_i,\ \forall j.
\]
Under this order, $(\Delta_s(n), \preceq)$ forms a finite distributive lattice, with join and meet operations given in terms of the prefix sums. The bottom element (minimal) is $(0,\ldots,0, n)$, the top (maximal) is $(n,0,\ldots,0)$. The rank function of $a$ is
\[
\operatorname{rk}(a) = \sum_{i=0}^{s-1}(s-1-i)a_i,
\]
which computes the number of “unit-shifts” needed from the last position to reach $a$ from the minimal element.

Boolean sublattices appear by fixing a and considering all elements reachable by shifting parts among nonzero indices. The Möbius function $\mu(a, b)$ is $(-1)^{\sum (b_j - a_j)}$ if $b$ lies in the Boolean sublattice over $a$, zero otherwise. These explicit formulas enable combinatorial inversion and the development of binomial and weight invariants in lattice-theoretic and algebraic contexts [2601.07725].

## 3. Extremal Set Systems: $r$-Cross $t$-Intersecting Families

In extremal combinatorics, weak compositions underpin sharp analogs of the Erdős–Ko–Rado theorem. Fix positive integers $l_1,\dots,l_r$, let $l = \min\{l_1,\dots,l_r\}$, and for $j=1,\dots,r$ define $\mathcal{A}_j \subseteq P(n_j, l_j)$. These families are $r$-cross $t$-intersecting if for every selection of $r$ elements (one from each $\mathcal{A}_j$), at least $t$ coordinates agree (i.e., have equal values across all $r$ tuples).

The main extremal theorem asserts: for $l \geq t + 2$, there exists $n_0$ (depending only on the $l_j$ and $t$) such that, for all $n_j \geq n_0$, if the $\mathcal{A}_j$ are $r$-cross $t$-intersecting,
\[
\prod_{j=1}^r |\mathcal{A}_j| \leq \prod_{j=1}^r \binom{n_j + l_j - t - 1}{l_j - t - 1},
\]
with equality if and only if each $\mathcal{A}_j$ consists of those compositions with zeros in a common $t$-subset of coordinates. This generalizes set-system intersection theorems and establishes the “zero-set” paradigm for weak compositions [1311.1813].

## 4. Weak Compositions in Algebraic Structures

Weak compositions index key algebraic structures, notably in the theory of quasi-symmetric and weak quasisymmetric functions and related Hopf algebras. In the Hopf algebra RQSym of weak quasisymmetric functions, the monomial basis $M_I$ and the fundamental basis $F_I$ are indexed by weak compositions $I$. The product is governed by a quasi-shuffle operation on weak compositions, while the deconcatenation is the Hopf coproduct. A projection $\pi: \text{RQSym} \to \text{QSym}$ collapses zero parts, sending weak compositions with zeros to zero and restricting to ordinary quasi-symmetric functions when only positive parts (ordinary compositions) are present.

The quasi-shuffle on indices allows RQSym to be a nontrivial extension of QSym, and the combinatorial richness of weak descents (as captured in $F_I$) is directly tied to the behavior of weak compositions [1912.12721].

## 5. Explicit Enumeration and Identities

The number of weak compositions of $n$ with exactly $k$ zeros, $cw(n,k)$, satisfies the explicit formula
\[
cw(n,k) = \sum_{\substack{j_1+\cdots+j_{k+1}=n\\ j_t\geq 0}} c(j_1) \cdots c(j_{k+1}),
\]
where $c(j)$ is the number of ordinary compositions of $j$; $c(0) = 1$. Special cases include:
- All parts unrestricted: $c(j) = 2^{j-1}$, yielding
  \[
  cw(n,k) = \sum_{m=0}^k \binom{k+1}{m} \binom{n-1}{k-m}.
  \]
- Parts in $\{1,2\}$ (Fibonacci case): $cw(n,k,[2]) = \sum_{i\geq 0} \binom{k+1}{i} \binom{n+k-i}{n-2i}$.
- Parts $ \geq 2$: A similar double-binominal formula involving shifted Fibonacci numbers.

Further, such enumerations link weak compositions to the characteristic polynomials of Hessenberg–Toeplitz matrices, i.e., certain minors and coefficients of these polynomials enumerate weak compositions with fixed zeros and other restrictions [1007.0526].

## 6. Categorical Weak Compositions

In higher category theory, “weak composition” refers to composition laws that hold only up to coherent isomorphism. Weak vertical composition—for instance, in semi-strict tricategories—manifests when vertical composition of 2-cells is associative and unital only up to specified coherent (invertible) 3-cells, but all horizontal compositions remain strict [2212.11865, 2308.09806]. Such weakening fundamentally alters both axiomatic and model-theoretic properties, and in doubly-degenerate contexts, precisely recovers the 2-category of braided monoidal categories.

More generally, doubly weak double categories [2506.23651]—structures in which both horizontal and vertical compositions of 1-cells are weak and satisfy bicategory-level coherence in both directions—provide a two-dimensional generalization. Here, weak composition is formalized via representability criteria on double computads, and the coherence data is organized by finite “tidiness” conditions, unifying double bicategories and cubical bicategories.

## 7. Applications and Connections

The study of weak composition lattices admits powerful applications in coding theory. In the context of optimal Lee-metric anticodes over $\mathbb{Z}/p^s\mathbb{Z}$, optimal anticodes correspond bijectively to weak compositions, with set inclusion of anticodes corresponding exactly to the dominance order for weak compositions. This facilitates explicit structure theorems, binomial invariants, and generalizations of classical code distances [2601.07725].

Weak composition theory also permeates the construction of bases for algebraic structures, the classification of combinatorial invariants, and the extremal enumeration of intersecting families. Connections to Rota–Baxter algebras, convolution identities, and “failure of compositionality” in category theory—where the lack of strictness is measured by certain homotopy posets—underscore the unifying role that weak composition frameworks play across modern mathematics [1912.12721, 2307.14461].

Source: https://www.emergentmind.com/topics/weak-compositions