If there is a deterministic and exact algorithm for distinct elements that uses \(O(\min(|\Sigma|,
n)\), there is a compression algorithm that maps \(L\)-bit strings to length \(O(L)\)
Proof
We can make \(\Sigma\) the set
\(\{(0, 0), (0, 1), (1, 0), (1, 1), \ldots, (L, 0), (L, 1)\}\).
For each \(i\) in range(\(L\)), insert to the algorithm \((i, b_i)\).
To find \(b_i\), we can insert \((i, 0)\) and query the number of distinct elements. If the
number
changes, \(b_i = 1\), else \(b_i = 0\). Hence we can reconstruct the whole bit string.