Imagine laying out every kind of piece in a mathematical object, then scanning upward through the possible sizes: one, two, three, four. The first size that never appears is a tiny gap in the inventory. But that gap can reveal a surprising amount about the whole object. In combinatorics, this first missing value is called the mex, short for minimal excluded value. A new study follows it far beyond number lists, into mountain-shaped paths, branching trees, and ways of grouping objects.
The idea begins with integer partitions: ways to write a number as a sum while ignoring the order of the parts. In the partition of ten into parts five, three, and two, the sizes one and four are missing, so the first missing part size is one. In a composition, order matters, but the same question applies. A set partition groups labeled items into blocks, so the pieces to inspect are block sizes. For a tree, they are the numbers of children at its vertices. One simple question—what is the first size absent?—can be asked of very different mathematical landscapes.
For a Dyck path, the landscape is literal. Picture a route made of upward and downward steps that never dips below its starting level and eventually returns there. Its peaks rise to particular heights. The mex is the smallest positive height at which no peak occurs. A path might have peaks at heights one and three but none at height two; its first missing peak height is two. The rule has changed its scenery, yet its basic rhythm remains: list the possible features, then find the first gap.
That is the paper’s central shift of perspective. Instead of treating each object as a special case, the authors build a general framework: identify the object’s pieces, assign each piece a weight, and ask which weights occur. For a partition, the weight is a part’s size; for a peak, its height; for a tree vertex, its number of children. The object itself also has a size, such as the sum being partitioned or the number of steps in a path. With those choices in place, the same counting strategy can travel from one structure to another.
The key is a familiar counting technique called inclusion-exclusion. To have mex four, for example, an object must contain at least one piece of each of the first three weights, while containing no piece of weight four. Counting objects that avoid selected weights is often easier than counting those that include every required weight. Inclusion-exclusion combines those easier counts, correcting for objects that were counted more than once. The result is a generating function: a compact bookkeeping device whose entries record how many qualifying objects exist at each size.
That bookkeeping exposes different kinds of order hiding in the examples. For integer compositions, the authors prove that the generating function for any fixed mex is rational—meaning it can be built from polynomial expressions using ordinary division. For Dyck paths, the corresponding count can be expressed using rational operations and the Catalan counting series, the familiar series that also counts many families of recursively built objects. For planar trees, the generating functions are algebraic: each obeys a polynomial relationship, even when its explicit expression would be cumbersome.
Some of the results reconnect the new framework to old mathematical landmarks. A Dyck path with mex one has no peak at height one, often called a hill; that family is counted by the Fine numbers. A planar tree with mex one has no vertex with exactly one child, and its counts are the Riordan numbers. For set partitions, mex one means there are no singleton blocks. These cases were already studied in other forms. The framework’s contribution is to place them alongside more complicated missing-weight questions and give mathematicians a shared way to count them.
The next gap can be more revealing than the first. A set partition with mex two has no block of size two, but it must have at least one singleton block: size one appears, size two does not. A planar tree with mex two must have at least one one-child vertex, but no two-child vertex. The distinction matters. Merely forbidding a size does not identify the mex; every smaller size must also be present somewhere. That constraint is what turns an absence into a precise counting signal.
The study also moves into inversion sequences, lists used to encode permutations. In the standard encoding, each entry records how many earlier elements of the permutation form an inversion with it. The researchers count these sequences by the first value that does not appear. Then they notice a curious echo: their table of mex counts, with its rows reversed, appears to match a known table describing the distribution of the maximum entry in inversion sequences.
That resemblance is not a proved theorem. The authors explicitly say they have not established why the two tables line up. It is a clue, not a conclusion—and that uncertainty makes it especially intriguing. A statistic built by looking for the first thing missing seems to mirror one built by looking for the largest thing present. Whether the match reflects a deeper connection or a numerical coincidence remains open.
Across these examples, the mex acts like a small probe sent into a much larger structure. It does not describe every detail of a partition, path, or tree. Instead, it asks what the object is forced to contain before its first gap can appear. Once that question is translated into a common counting language, familiar sequences re-emerge, new counting problems become tractable, and an unexplained pattern surfaces in permutation encodings. The missing number, it turns out, can be a surprisingly sharp way to see what is there.









