Exact duplicate detection by adjacent comparisons #
In a sorted sequence, a record has another equal key exactly when it has an equal-key predecessor or successor. Computing keys once and comparing each adjacent pair gives a concrete linear-size duplicate detector.
Every duplicate in a sorted sequence has an adjacent witness.
Equality of two keys in a flat key array.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Key equality is tested exactly.
One adjacent-key equality uses six charged gates per key bit.
Missing neighbors contribute false; existing neighbors are compared.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The local circuit tests precisely the two possible adjacent witnesses.
Duplicate flags from an already-computed array of keys.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The exact gate count of flagsCircuit.
Sorted key arrays yield exact global duplicate flags.
Compute each key once for subsequent adjacent comparisons.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Computing the keys costs exactly one key evaluation per record.
The key array contains the computed key of each original record.
Complete duplicate detector, including key computation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The detector has exactly the gates of its key computation followed by its local comparisons.
Exact global duplicate detection whenever the computed keys are sorted.
Linear record-count cost, including the two local comparisons.