Subtract the overlap once when combining two sets. This is a small deterministic example, not solver engineering.

Example

Subtract the overlap once when combining two sets.

highlighted = computed this step

Step 1 — Counts

Set up the exact small combinatorics values.

A, B, overlap(8, 7, 3)\begin{array}{c|c}\text{A, B, overlap}&\text{(8, 7, 3)}\end{array}

Step 2 — Raw sum

Compute the highlighted combinatorics value.

A+B15\begin{array}{c|c}\text{A+B}&\hlmath{\text{15}}\end{array}

Step 3 — Union

Compute the highlighted combinatorics value.

A union B12\begin{array}{c|c}\text{A union B}&\hlmath{\text{12}}\end{array}
combinatorics-search Every row is intentionally ordered and pinned to the lesson specification.