SOLVETUTORMATH SOLVER

Instrument MI-01-661 · Mathematics

Ugly Duckling Theorem Calculator

Pick any two distinct objects from a set described by many possible properties, and the number of property subsets shared by that exact pair turns out identical for every possible pair you could have picked instead.

Instrument MI-01-661
Sheet 1 OF 1
Rev A
Verified
Type 05 — Algebra SER. 2026-01661

Subsets of size k containing both objects

28

count = C(n−2, k−2)

The working Every figure verified twice
  1. sharedCount = comb(10 − 2, 4 − 2) = 28
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

The Ugly Duckling Theorem comes from pattern-recognition theory and makes a claim that sounds wrong the first time it is heard: given a fixed collection of n possible predicates, meaning properties an object either has or lacks, count how many size-k subsets of those predicates happen to include two specific, distinct objects at once. That count turns out to be exactly C(n−2, k−2) — the number of ways to choose the remaining k−2 predicates from the n−2 left over once two are already fixed as shared — and, remarkably, this number never depends on which two objects were chosen.

The name comes from Hans Christian Andersen's story, where a naive first impression might suggest an odd-looking duckling is somehow less similar to the other ducklings than the ducklings are to one another. Counted this exact way, across every conceivable predicate without favoring any one of them over another, that expectation collapses entirely: every pair of distinct objects, ugly duckling included, shares precisely the same count of predicate subsets as any other pair. Similarity, measured with no built-in weighting toward particular properties, stops being a meaningful way to rank one pair above another.

Satosi Watanabe, who first stated the result within pattern recognition and machine learning theory, used it to warn against treating similarity as an objective, predicate-free property waiting to be measured. Any working notion of similarity, the theorem implies, secretly depends on which predicates get weighted more heavily than others — strip that weighting away and count everything evenly, and no two distinct objects come out more alike than any other two.

The binomial coefficient at the center of the count, C(n−2, k−2), follows directly from ordinary combinatorics: once two objects are fixed as members every subset must include, choosing the rest of a size-k subset is just choosing k−2 more predicates from whatever remains among the other n−2. Change n or k and the shared count changes with it, but it always stays constant across every pair, for any fixed n and k.

sharedCount=(n2k2)\text{sharedCount} = \binom{n-2}{k-2}
n — total number of possible predicates · k — the size of each predicate subset under consideration · sharedCount — how many size-k subsets include two specific, distinct objects, identical for every pair once n and k are fixed.
  • Enter the total number of possible predicates into Total number of predicates (n).
  • Enter the size of the predicate subsets under consideration into Predicate-subset size (k).
  • Read Subsets of size k containing both objects for the count C(n−2, k−2).
  • Picture any two distinct objects and confirm the count would read identically for a different pair, with n and k unchanged.
  • Raise k toward n or lower it toward 2 to see how the shared count grows or shrinks.

Worked example — 10 predicates, subsets of size 4, plus two smaller cases

With n=10 total predicates and a subset size of k=4, fixing any two specific, distinct objects as members of every subset leaves 10−2=8 predicates and a remaining subset size of 4−2=2 to fill from them. That count is C(8,2)=28, meaning exactly 28 different size-4 predicate subsets include both chosen objects — and swapping in a different pair of objects, with n and k unchanged, would produce the same 28 every time.

Shrinking the numbers shows the same pattern holding at smaller scale. With n=8 and k=3, the count becomes C(6,1)=6. With n=6 and k=2, subsets that are themselves just pairs, the count drops to C(4,0)=1, since choosing zero further predicates from the remaining 4 leaves exactly one way to do it: the empty choice, contributing nothing beyond the two already-fixed objects.

Questions

What does the Ugly Duckling Theorem actually claim?

It claims that, given a fixed number of possible predicates, the count of size-k predicate subsets containing any two specific, distinct objects is always the same number, regardless of which two objects get chosen. For 10 total predicates and subsets of size 4, that shared count works out to C(8,2)=28, identical for every possible pair.

Why is it named after the ugly duckling?

Because a naive intuition, echoing Hans Christian Andersen's story, might expect an odd-looking duckling to share fewer properties with ordinary ducklings than the ordinary ducklings share among themselves. Counted across every possible predicate without weighting any of them more heavily, that expectation turns out false — every pair of distinct objects shares exactly the same count of predicate subsets.

Who first proved this theorem?

Satosi Watanabe, working in pattern recognition and machine learning theory, first stated and proved the result. He used it to argue that similarity between objects is never a neutral, predicate-free fact — it only emerges once particular predicates get weighted more heavily than others, a choice not forced by the objects themselves.

Why does the formula use n−2 and k−2 instead of n and k?

Because two of the objects are already fixed as members of every subset being counted, which uses up two of the k subset slots and removes two of the n available predicates from further consideration. What remains is an ordinary combinations problem — choosing k−2 more predicates from the remaining n−2 — and C(n−2, k−2) counts exactly that.

Does the shared count depend on which two objects are picked?

No, and that is the entire point of the theorem — the count depends only on n and k, never on which specific pair of distinct objects gets chosen. Any two objects out of the full collection share exactly C(n−2, k−2) predicate subsets of size k, with no pair singled out as more or less connected than another.

What happens when k equals 2?

The subsets themselves are just pairs of predicates, and fixing two specific objects to belong to every one of them leaves nothing left to choose — k−2 becomes 0, and C(n−2,0) always equals 1, since there is exactly one way to select nothing at all. That is why n=6 and k=2 above gives a shared count of 1.

Is this theorem only about ducklings or animals?

No — it applies to any collection of objects described by a fixed set of predicates, whether those objects are animals, images, documents, or data points in a machine learning problem. Ducklings only appear in the name, borrowed from Andersen's story to illustrate the counterintuitive result memorably.

References