\begin{algorithmic}
\STATE Note:
\STATE $\varepsilon > 0$ - the maximal prediction error
\STATE $\delta > 0$ - the desired reliability 
\STATE \textbf{Gibbs} - an oracle that computes Gibbs predictions
\STATE \textbf{Sample} - an oracle that generates unlabeled examples
\STATE \textbf{Label} - an oracle (or expert) that generates the correct label of an example
\STATE
\STATE Set: $n = 0$ - the counter of labels to Label
\STATE $V_0 = C$ - where $V$ is the version space and $C$ is the complete concept class
\STATE
\REPEAT
\STATE Call \textbf{Sample} to get an unlabeled example $x \in X$ drawn at random
\STATE Call \textbf{Gibbs}($V_n$,$x$) twice to get two predictions for the label of $x$
\IF {the two predictions are equal} 
\STATE Reject the example $x$ and return to the beginning of the loop
\ELSE 
\STATE Call \textbf{Label}($x$ to get $c$($x$), increase $n$ by 1, and get $V_n$ to be all concepts $c' \in V_{n-1}$ such that $c'$($x$) = $c$($x$)
\ENDIF
\UNTIL {More than $t_n$ consecutive samples are rejected}
\RETURN the Prediction Hypothesis \textbf{Gibbs}($V_n$,$x$). 
\end{algorithmic}