N-tuple $(Y_{1},\cdots,Y_N)$.

OSA as a Source Code {#sec:osa_source_coding}
====================

The opportunistic splitting algorithm with ternary feedback identifies a threshold $Y$ for every $N$ tuple ($Y_1,\cdots,Y_N)$ such that $Y_{N-1} \leq Y < Y_N$. OSA chooses the thresholds in a minislot such that the probability of success is maximized in the minislot. The following pseudo-code describes the code ${\mathsf C}: (Y_{N-1}, Y_N) \rightarrow Y$ corresponding to OSA.

$\Omega_{()} := \{ (Y_{N-1},Y_N) : 0 \leq Y_{N-1} \leq Y_N \leq 1\}$ Initialize $k = 1$ a) Define $y_k$ as [$$y_k := \arg \max_{y \in [0,1]} {\mathsf Pr}(Y_{N-1} \leq y < Y_N | (Y_{N-1}, Y_N) \in \Omega_{()})$$ ]{} b) Define $\Omega_{y_k}$ as [$$\Omega_{y_k} = \{(Y_{N-1},Y_N) : (Y_{N-1},Y_N) \in \Omega_{()}, Y_{N-1} \leq y_k < Y_N\}$$ ]{} c) Update $\Omega_{()}$ as [ $$\Omega_{()} = \Omega_{()} \backslash \Omega_{y_k}$$ ]{} $k = k + 1$

We define $\Omega_{()}$ as the set of all $2$ tuples $(Y_{N-1},Y_N)$. The code begins with identifying a threshold $y_1$ that maximizes the probability of success in $\Omega_{()}$. Every two tuple in $\Omega_{()}$ that contains the threshold $y_1$ is assigned to be resolved by the threshold; we define the above set as $\Omega_{y_1}$, the set resolved by the threshold $y_1$. The set $\Omega_{y_1}$ is now 