# Ugly Duckling Theorem Calculator

URL: https://speedycalculator.com/calculators/math/ugly-duckling-theorem/
Last updated: 2026-10-30

> The ugly duckling theorem calculator counts, for n objects, how many possible predicates (yes/no properties) exist and how many of them any two – or any k – objects share, showing that without a choice of relevant features all objects are equally similar.

## Inputs

- Number of objects n
- Group size k

## Results

- Number of possible predicates
- Predicates shared by any two objects
- Predicates shared by any k objects
- Share of all predicates

## Formula

```
Predicates on n objects: 2ⁿ · shared by any 2 objects: 2ⁿ⁻² · shared by any k objects: 2ⁿ⁻ᵏ
```

## Explanation

Satosi Watanabe's ugly duckling theorem (1969) says that an ugly duckling and a swan are exactly as similar as two swans – if every possible property counts equally. Classification and machine learning are only possible because we choose which features matter (an inductive bias).

### How to use the Ugly Duckling Theorem Calculator

- **Number of objects n**
- **Group size k**

Results update as you type, and everything is calculated in your browser.

### How it works

Enter the number of objects n and the size k of the group you compare. Each predicate is a subset of the objects (the ones for which it is true); a group shares the predicates whose subsets contain all of its members.

### Inputs explained

FieldWhat to enterNumber of objects nA numberGroup size kA number

### What each result means

- **Number of possible predicates** = 2^[Number of objects n]
- **Predicates shared by any two objects** = 2^([Number of objects n] - 2)
- **Share of all predicates** = 100÷2^[Group size k]

### Example values

How the main result changes when **Number of objects n** changes and everything else stays at the example values above:

Number of objects nPredicates shared by any two objects21324458616864

## Worked example

Inputs — Number of objects n: 4; Group size k: 2.

Results — Number of possible predicates = 16; **Predicates shared by any two objects = 4**; Predicates shared by any k objects = 4; Share of all predicates = 25 %.

## Key terms

- **Predicate**: A property that is either true or false of each object.

## FAQ

**What does the theorem say?**
Without weighting features, every pair of objects shares the same number of properties.

**Why is it called the ugly duckling theorem?**
An ugly duckling is as similar to a swan as two swans are to each other.

**Does it make classification impossible?**
No – it shows that classification requires choosing relevant features.

**What is an inductive bias?**
The assumptions a learner uses to generalise.


## Sources

- Watanabe, S. (1969). Knowing and Guessing. Wiley
