Abstract data type invariant Created 2026-10-24 Updated 2026-10-31
A condition describing legal abstract states, independently of their concrete storage. A bounded-key multiset has nonnegative counts and zero counts outside its allowed range. A representation invariant instead constrains implementation states; an abstraction function connects a valid representation to its abstract state. The two kinds of invariant should not be conflated.
Array multiset Created 2026-10-25 Updated 2026-10-31
A multiset of keys in a fixed finite integer range represented by one nonnegative count per key. The abstraction function extends the stored array counts by zero outside the range. Single-key additions, removals and queries use constant array work, provided overflow and operation preconditions are handled. Encapsulation of the count array is necessary to preserve its representation invariant.
An original counterexample explains why a Sholl profile does not determine rooted tree topology. Construct two embedded rooted trees whose distance from the root increases along every edge. Both have one initial segment, three branch points of a tree at distances , and four rooted tree leaves at distance . In tree A the second and third branch points lie on different children of the first; in tree B all three branch points lie along one lineage. Their common profile is
At a branch-point radius the shared endpoint is counted once. This convention also gives equal profiles at all three branch-point radii, not just between them.
The multiset of numbers of branch points of a tree along the four root-to-leaf paths is for tree A and for tree B. A graph isomorphism preserving the root would preserve those path counts. The different multisets prove that the rooted trees are different despite identical profiles. The radial summary loses connectivity information.
Figure 1.
Different rooted trees with identical radial intersection profiles
. Original geometric counterexample with checked outward edges, noncrossing embeddings and distinct-intersection counts. Chosen coordinates, not measured anatomy. Details.
Bitonic sorting algorithm 2026-10-24
A divide-and-conquer algorithm that sorts two halves, reverses one result to form a bitonic sequence, then performs a bitonic merge. For the shuffle-and-adjacent-comparison merging network on entries, passes each cost , so merging costs . The complete recurrence relation is , giving time. A compare-exchange operation preserves the multiset of entries while putting its two selected entries in order.
Coin-change counting 2026-10-20
Count multisets of allowed positive coin values whose sum is a target. Initialize and for . For each coin , update in increasing order of . The outer loop over coins counts each multiset once while allowing repeated use of a coin.
A choice of distinct elements from a set of elements, with order ignored. Equivalently it is a -element subset. The binomial coefficient counts such choices; choosing with repetition instead produces a multiset.
A union-intersection compression can only decrease the sum of information entropies for a finite-valued random vector . Each elementary step follows from entropy submodularity; iteration proves the assertion with multiset multiplicities. Uniform coordinate multiplicity gives Shearer inequality by compressing to repeated full sets and empty sets.
An immutable multiset can expose a covariant type parameter because reading an element only produces that type. Addition accepts a new type parameter with a lower type bound, add[U >: T](x: U), and returns a new ISet[U]. The old ISet[T] retains its contents and original element guarantee. Deletion returns both the removed value and a new remaining multiset; it does not mutate the old one. Duplicate occurrences are preserved.
Digit permutation 2026-10-20
A rearrangement of the numerical digits of a numeral. Two numerals have the same digit permutation class exactly when their digit multisets agree. If they represent numbers of the same length, a leading zero must be disallowed.
The Euler transform of a sequence has coefficients defined by . In unlabelled counting, may count connected components of size , while counts multisets of components.
Factorization tree Created 2026-10-14 Updated 2026-10-20
A factorization tree is a rooted tree whose root is an integer . Each nonleaf label is a composite number split into two factors greater than one whose product equals that label; the leaves are prime numbers. Multiplying the leaves recovers . Many factorization trees can have the same root, but the fundamental theorem of arithmetic gives them the same leaf multiset.
Fundamental theorem of arithmetic Created 2026-09-24 Updated 2026-10-20
Every integer is a product of prime numbers, uniquely up to reordering the factors. More precisely, there are unique distinct prime numbers and unique positive integer exponents such that
In the header's displayed form, is the prime valuation, the exponent of in this prime factorization; it is zero when does not divide . Reordering or regrouping the prime factors does not give a different prime factorization.
For , repeated division gives , , , then , , and . Thus
Its nonzero prime valuations are , and . Recording only the distinct prime factors would lose the difference between and .
This turns divisibility into coordinatewise comparison of nonnegative exponents. A positive divisor of chooses an exponent from for , from for , and from for , giving positive divisors. The greatest common divisor takes the smaller exponent at each prime number; the least common multiple takes the larger. The theorem is a structural description, not an assertion that finding the factors of every large integer is computationally easy.
In general, for positive integers , the exact divisibility criterion is
For example, divides , with quotient , whereas does not: it requires four factors of two, but supplies only three. Both use only prime factors of , so membership in that list alone does not establish divisibility. Every positive divisor of is uniquely with , , . Sorted, all 24 positive divisors are
Thus the divisor function gives . These include divisors that are composite numbers, as well as the prime factors and one.
For another positive integer , the prime valuations give exact formulas for the greatest common divisor and least common multiple:
With and , their prime valuations at are and . The smaller exponents give , and the larger give , hence
Indeed, , , and . The same rules also explain : the smaller and larger exponents sum to the two original exponents. Here .
Figure 1. . The upper table compares exponents at the prime numbers for and , then takes their columnwise minimum and maximum. The lower tables enumerate for and ; each cell gives one positive divisor. Details.
The useful change of viewpoint is that multiplication becomes addition of prime valuations, , and divisibility becomes comparison. Many different-looking calculations therefore share one representation. The prime valuations are coordinates for multiplication, rather than digits in positional notation: they do not turn ordinary addition of integers into coordinatewise addition.
Different intermediate splits lead to the same prime ingredients. Starting with gives and ; starting with gives and . Continuing to split the composite numbers produces the same multiset of prime factors: three twos, two threes, and one five. The factorization tree records choices in the calculation, while the prime factorization records the invariant result.
Figure 2.
Two factorization trees for give the same prime factorization
. Details.
The proof outline explains the uniqueness. Existence follows by splitting a composite number into smaller factors until only prime numbers remain. For uniqueness, Euclid's lemma says that a prime factor of one product must divide one factor of any other prime product equal to it. That factor must be the same prime number; cancel it and repeat. The crucial divisibility step appears in Book VII, Proposition 30 of Euclid's Elements. [ref]
The ancient text supplies specific precursors to the modern statement: Book VII, Proposition 31 establishes that every composite number has a prime factor, and Book IX, Proposition 14 excludes any new prime factor from the least common multiple of given prime numbers. These are the propositions being cited, rather than the complete modern exponent formulation of the fundamental theorem of arithmetic. [ref] [ref]
Excluding one from the prime numbers keeps uniqueness meaningful: otherwise would give different collections of supposed prime factors. For , the natural convention is the empty product, equal to one, with no prime factors and all prime valuations zero.
Hook length Created 2026-10-05 Updated 2026-10-14
The hook length of cell in the Young diagram of a partition of an integer is the number of cells in its Young-diagram hook:
Here is the conjugate partition. There is one hook length for every cell, so the multiset of hook lengths has cardinality .
For and , compute and . Continuing cell by cell gives the hook graph of a partition
or the row array . Its hook product is . A cell has hook length one exactly when it is a Removable node of a Young diagram: it has no cell to its right or below. Here these are and . Transposing the Young diagram gives the array with the same hook product; this explains geometrically why conjugate shapes have equal counts in the hook-length formula.
Integer partition Created 2026-09-28 Updated 2026-10-14
An integer partition of a nonnegative integer is a multiset of positive integers whose sum is : repetitions matter, but the order of the summands does not. Equivalently, write its parts in decreasing order, allowing equality:
The notation says that is an integer partition of . The partition count counts all integer partitions of , with any number of parts. Zero has one empty integer partition, so . The partition of an integer article develops the same objects in representation theory of the symmetric group.[ref]
Computed example. The seven integer partitions of five are exactly
Thus . Sorting each list of positive summands into decreasing order prevents repetitions in this enumeration. Grouping by largest part verifies completeness: largest parts contribute respectively possibilities. For largest part , the remaining is either or ; for largest part , the remaining uses only and , giving or .
Figure 1.
All seven integer partitions of five, drawn as Ferrers diagrams: each row has as many dots as its part
. Details.
An integer partition keeps sizes without named positions. The compositions of an integer and are different tuples, but sorting either gives the same integer partition . A weak composition of an integer also retains its empty first position; dropping its zero and sorting gives that same integer partition. Conversely, a set partition records which distinct elements belong to each block. For example, the set partitions and differ even though both have the same integer partition of block sizes.
The Ferrers diagram makes an integer partition into a shape. For , the column lengths are : exchanging rows and columns gives its conjugate partition . Exchanging again recovers , so this operation is a bijection. In particular, the three integer partitions of five with at most two parts are , , and ; their conjugate partitions , , and are precisely the three with largest part at most two. This visible symmetry explains the equal counts for these two restrictions. The square-cell version is the existing Young diagram.
Counting by a generating function. An integer partition is determined by its multiplicities , the number of parts equal to . Its size condition is . Consequently its ordinary generating function is
Proof outline. Choose the term from the th geometric series. The product contributes exactly when those multiplicities describe an integer partition of , once for each such integer partition. As a formal power series, each coefficient is determined by finitely many factors: factors with contribute only their constant term to the coefficient of . For , multiplication through gives up to degree five, independently recovering . Restricting the factors gives the generating function for partitions with bounded parts. This is useful because restrictions on summands become choices of factors, while conjugate partitions turn restrictions on numbers of rows into restrictions on row lengths.[ref]
Multihypergraph 2026-10-06
A multihypergraph has a multiset of hyperedges, allowing the same subset of vertices to appear more than once. Its hypergraph vertex degrees and hypergraph codegrees count multiplicity. Such multiplicity is important when several original hyperedges produce the same link in a hypergraph container theorem.
Multiplicity function 2026-10-31
The function mapping each possible element to its multiset multiplicity. Finite multisets correspond to nonnegative functions with finite support of a multiset. A functional representation can answer queries without supporting enumeration of all elements.
Multiset multiplicity 2026-10-31
The number of occurrences of in a multiset , always a nonnegative integer for ordinary finite multisets.
Multiset overlap 2026-10-25
The common multiplicity of two multisets, summing the smaller multiplicity of each value. To return an order-preserving overlap of two finite lists, scan the first list and consume one equal item from the second whenever available. Each token can be consumed at most once, so the resulting subsequence has maximum possible length among those that occur in a permutation of the second list.
Pair a tetrahedron vertex with its opposite face. This is an equivariant correspondence under all tetrahedral symmetries, so three face colors and two vertex colors become six combined symbols at each of four positions. Burnside's lemma on the alternating group gives . Including reflections gives and reduces the count to multisets of four symbols from six, namely .
Let be the four-dimensional spinor representation. The tensor product representation splits into its symmetric square and exterior square, with dimensions ten and six. If is a highest-weight vector of , then is a highest-weight vector of weight in the symmetric square. The irreducible representation with that highest weight has dimension ten by solution, exhausting the symmetric square:
For the exterior square, add each pair of distinct weights from solution. The resulting multiset of weights is
Its maximal weight is the highest weight of a five-dimensional irreducible representation. It accounts for the four nonzero weights and one zero weight, leaving a single zero weight. By complete reducibility of semisimple Lie algebra representations, that remaining one-dimensional summand is the trivial representation. Thus , and the spinor tensor square for so5 is
The dimension check is . The trivial representation lies in the exterior square, reflecting the invariant nondegenerate alternating bilinear form of this pseudoreal representation. Although itself does not descend to , its tensor square does: the central element acts as .