<p><strong>Note:</strong> See the edit at the bottom for an argument showing that there <em>is</em> an unbiased algorithm which has variance strictly lower than <span class="math-container">$1/12$</span> for all <span class="math-container">$x \in [0,1]$</span>.</p>
<p>We can at least prove that if <span class="math-container">$x$</span> is chosen uniformly from <span class="math-container">$[0,1]$</span>, then the average variance must be at least <span class="math-container">$\pi^2/64 - 1/12$</span>. There is a dithering algorithm that achieves this average-case variance, as follows. We interpret the shared randomness as a uniformly random point <span class="math-container">$(s,t)$</span> from the disk with radius <span class="math-container">$1/2$</span> and center <span class="math-container">$(1/2,0)$</span>. The sender sends a <span class="math-container">$1$</span> if <span class="math-container">$x &gt; s$</span> and a <span class="math-container">$0$</span> otherwise, while the receiver takes <span class="math-container">$\hat{x} = 1/2 + \frac{\pi}{8}\sqrt{s/(1-s)}$</span> if they receive a <span class="math-container">$1$</span>, and <span class="math-container">$\hat{x} = 1/2 - \frac{\pi}{8}\sqrt{(1-s)/s}$</span> if they receive a <span class="math-container">$0$</span>. To see that this is unbiased, note that <span class="math-container">$s$</span> has probability density function <span class="math-container">$\frac{8}{\pi}\sqrt{s(1-s)}$</span>, so the expected value of <span class="math-container">$\hat{x}$</span> is</p>
<p><span class="math-container">$$\int_0^x \Big(1/2 + \frac{\pi}{8}\sqrt{s/(1-s)}\Big)\frac{8}{\pi}\sqrt{s(1-s)}\ ds + \int_x^1 \Big(1/2 - \frac{\pi}{8}\sqrt{(1-s)/s}\Big)\frac{8}{\pi}\sqrt{s(1-s)}\ ds\\
= \int_0^1 \frac{4}{\pi}\sqrt{s(1-s)} + s\ ds - \int_x^1 1\ ds
= x.$$</span></p>
<p>To see that this is optimal for the average-case variance, let's first make a framework to describe the most general possible algorithm. For every possible value of the shared randomness <span class="math-container">$h$</span>, the receiver will estimate <span class="math-container">$\hat{x}$</span> as one value <span class="math-container">$a(h)$</span> if they receive a <span class="math-container">$0$</span> bit, and will estimate <span class="math-container">$\hat{x}$</span> as a different value <span class="math-container">$b(h)$</span> if they receive a <span class="math-container">$1$</span> bit. We may as well assume that <span class="math-container">$a(h) \le b(h)$</span> for all <span class="math-container">$h$</span>.</p>
<p>On the sender's side, imagine that the functions <span class="math-container">$a, b$</span> are fixed and <span class="math-container">$x$</span> is known, but that the sender hasn't yet peeked at the randomness <span class="math-container">$h$</span>. The sender has to divide the possible values of <span class="math-container">$h$</span> into disjoint sets <span class="math-container">$A(x)$</span> and <span class="math-container">$B(x)$</span>, with the plan of sending a <span class="math-container">$0$</span> bit if <span class="math-container">$h \in A(x)$</span> and sending a <span class="math-container">$1$</span> bit if <span class="math-container">$h \in B(x)$</span>, subject to the constraint</p>
<p><span class="math-container">$\mathbb{E}_h[a(h)\cdot\mathbf{1}_{h \in A(x)} + b(h)\cdot\mathbf{1}_{h \in B(x)}] = x$</span>,</p>
<p>such that the variance of the random variable <span class="math-container">$a(h)\cdot\mathbf{1}_{h \in A(x)} + b(h)\cdot\mathbf{1}_{h \in B(x)}$</span> is minimized. Since the mean is fixed, minimizing the variance is equivalent to minimizing the second moment</p>
<p><span class="math-container">$\mathbb{E}_h[a(h)^2\cdot\mathbf{1}_{h \in A(x)} + b(h)^2\cdot\mathbf{1}_{h \in B(x)}]$</span>.</p>
<p>Since <span class="math-container">$\frac{b^2 - a^2}{b - a} = a+b$</span>, and since we assumed that <span class="math-container">$a(h) \le b(h)$</span> for all <span class="math-container">$h$</span>, the optimal strategy for the sender is to greedily set</p>
<p><span class="math-container">$A(x) = \{h \mid a(h) + b(h) &gt; t(x)\}, B(x) = \{h \mid a(h) + b(h) &lt; t(x)\}$</span></p>
<p>for some threshold <span class="math-container">$t(x)$</span> which is chosen to satisfy the constraint on the mean:</p>
<p><span class="math-container">$\mathbb{E}_h[a(h)\cdot\mathbf{1}_{a(h) + b(h) &gt; t(x)} + b(h)\cdot\mathbf{1}_{a(h) + b(h) &lt; t(x)}] = x.$</span></p>
<p>(If <span class="math-container">$a(h) + b(h) = t(x)$</span> with positive probability, then we divide the set of <span class="math-container">$h$</span>s with <span class="math-container">$a(h) + b(h) = t(x)$</span> in any way we like to make the constraint on the mean work out.)</p>
<p>By rearranging the internals of the algorithm, we may now assume that <span class="math-container">$a(h) + b(h)$</span> is an increasing function of the random variable <span class="math-container">$h$</span>, so the sender's strategy can be expressed as: send <span class="math-container">$0$</span> if <span class="math-container">$x &lt; s(h)$</span> and send <span class="math-container">$1$</span> if <span class="math-container">$x &gt; s(h)$</span>, where <span class="math-container">$s$</span> is another threshold function, which satisfies</p>
<p><span class="math-container">$\mathbb{E}_h[a(h)\cdot \mathbf{1}_{x &lt; s(h)} + b(h)\cdot \mathbf{1}_{x &gt; s(h)}] = x$</span>.</p>
<p>From this, we can deduce that</p>
<p><span class="math-container">$\mathbb{E}_h[a(h)s(h)^n + b(h)(1-s(h)^n)] = \mathbb{E}_{x,h}[a(h)\cdot nx^{n-1}\mathbf{1}_{x &lt; s(h)} + b(h)\cdot nx^{n-1} \mathbf{1}_{x &gt; s(h)}] = \mathbb{E}_x[nx^n] = \frac{n}{n+1}$</span></p>
<p>for every <span class="math-container">$n$</span>, and that <span class="math-container">$b(h) - a(h) = s'(h)$</span>.</p>
<p>Using the above identities, we can check that the expected variance is</p>
<p><span class="math-container">$$\mathbb{E}_{x,h}[a(h)^2\cdot \mathbf{1}_{x &lt; s(h)} + b(h)^2\cdot \mathbf{1}_{x &gt; s(h)} - x^2]\\
= \mathbb{E}_{h}[a(h)^2s(h) + b(h)^2(1-s(h)) - 1/3]\\
= \mathbb{E}_h[(a(h)s(h) + b(h)(1-s(h)) - 1/2)^2 + (b(h) - a(h))^2s(h)(1-s(h)) - 1/12]\\
\ge \mathbb{E}_h[(b(h) - a(h))^2s(h)(1-s(h)) - 1/12].$$</span></p>
<p>By Cauchy-Schwarz, we have</p>
<p><span class="math-container">$$\mathbb{E}_h[(b(h) - a(h))^2s(h)(1-s(h))]\\
\ge \mathbb{E}_h[(b(h) - a(h))\sqrt{s(h)(1-s(h))}]^2\\
= \mathbb{E}_h[s'(h)\sqrt{s(h)(1-s(h))}]^2\\
= \Big(\int_0^1 \sqrt{s\cdot (1-s)}\ ds\Big)^2 = \frac{\pi^2}{64},$$</span></p>
<p>which finishes the proof.</p>
<p><strong>Edit:</strong> We can actually combine the disk-based example algorithm above (with the least possible average variance) and the subtractive dithering algorithm to create a dithering algorithm which has variance strictly less than <span class="math-container">$1/12$</span> for every <span class="math-container">$x$</span>. The main idea is that the set of functions</p>
<p><span class="math-container">$x \mapsto \operatorname{Var}[\hat{x}]$</span></p>
<p>coming from unbiased dithering algorithms is a convex set: given any pair of dithering algorithms, we can use shared randomness to randomly choose between them. Our plan is to first perturb the subtractive dithering algorithm in a way which keeps its average variance (for <span class="math-container">$x$</span> uniformly in <span class="math-container">$[0,1]$</span>) approximately the same but which makes the variance lower for <span class="math-container">$x$</span> closer to <span class="math-container">$0$</span> and <span class="math-container">$1$</span> and higher for <span class="math-container">$x$</span> close to <span class="math-container">$1/2$</span>, and then to take a weighted combination of this perturbed subtractive dithering algorithm with the disk-based example algorithm described above.</p>
<p>To perturb the subtractive dithering algorithm, we will stick with the choice of threshold <span class="math-container">$s(h) = h$</span>, but we will perturb the functions <span class="math-container">$a(h), b(h)$</span>. The perturbed functions will be given by</p>
<p><span class="math-container">$$a(h) = h - 1/2 + \delta'(h)\\ b(h) = h + 1/2 + \delta'(h)$$</span></p>
<p>for some small function <span class="math-container">$\delta(h)$</span> - as long as <span class="math-container">$\delta(1) - \delta(0) = \mathbb{E}_h[\delta'(h)] = 0$</span>, this perturbed algorithm will be unbiased. The variance of the perturbed subtractive dithering algorithm is then given by</p>
<p><span class="math-container">$$\operatorname{Var}[\hat{x}] = \mathbb{E}_h[a(h)^2\cdot \mathbf{1}_{x &lt; h} + b(h)^2\cdot \mathbf{1}_{x &gt; h} - x^2]\\
= \tfrac{1}{12} + \mathbb{E}_h[(2h-1)\delta'(h)\cdot \mathbf{1}_{x &lt; h} + (2h+1)\delta'(h)\cdot\mathbf{1}_{x &gt; h} + \delta'(h)^2]\\
= \tfrac{1}{12} + 2\delta(x) - 2\int_0^1 \delta(h)\ dh + \int_0^1 \delta'(h)^2\ dh.$$</span></p>
<p>As you can see, the average value of <span class="math-container">$\operatorname{Var}[\hat{x}]$</span> increases by only <span class="math-container">$\int_0^1 \delta'(h)^2\ dh$</span>, so by taking <span class="math-container">$\delta(x)$</span> a sufficiently small multiple of the difference of the two variance functions for the two algorithms in question, we get the perturbation we need. (While the resulting combination of the perturbed dithering algorithm and the disk-based algorithm outperforms subtractive dithering for all <span class="math-container">$x$</span>, it is almost certainly not optimal, so I won't work out the gory details.)</p>

CC BY-SA 4.0
2022-03-07T11:20:18.527Z
Re-reading this after a year :). 
Can you please explain how you get to $b(h) - a(h)=s'(h)$?
This seems to be incorrect for subtrcative dithering (but we do get $a(h)-b(h)=s'(h)$).
R B
CC BY-SA 4.0
2021-02-08T15:04:25.590Z
Thanks for the answer, but I am not sure that the suggested algorithm is unbiased.

Consider $x=0$ (or a small $\epsilon>0$). Then the sender will send $0$, making the estimate $1/2 - \frac{\pi}{8}\sqrt{(1-s)/s}$. But this has a negative expectation(?).
R B
CC BY-SA 4.0
2021-02-08T17:14:40.377Z
Keep in mind that $s$ is not uniformly distributed: in the example algorithm, the probability density function for $s$ is given by $\frac{8}{\pi}\sqrt{s(1-s)}$. If $s$ is sampled from this distribution, then the expectation of $1/2 - \frac{\pi}{8}\sqrt{(1-s)/s}$ is $\int_0^1 \frac{4}{\pi}\sqrt{s(1-s)} - (1-s)\ ds = 0$.
zeb
CC BY-SA 4.0
2021-02-08T19:48:02.860Z
Ah, Got it now, thanks. We were able to prove a $1/16$ bound using completely different arguments, but yours is better :).
R B
CC BY-SA 4.0
2021-02-08T00:17:31.723Z
2021-02-14T02:42:20.733Z
2021-02-14T02:42:20.733Z
zeb
<p>Consider the problem of sending a real number <span class="math-container">$x\in[0,1]$</span> using a single bit <span class="math-container">$X\in\{0,1\}$</span> in an unbiased manner.</p>
<p>We assume that the sender and receiver have access to shared randomness <span class="math-container">$h\sim U[-1/2,1/2]$</span> that they can use for choosing <span class="math-container">$X$</span> and estimating <span class="math-container">$x$</span>.</p>
<p>Subtractive dithering is an algorithm that sends
<span class="math-container">$$X = 
\begin{cases}
1 &amp; \mbox{if $x+h\ge 1/2$}\\
0 &amp; \mbox{otherwise}
\end{cases}.
$$</span>
In turn, the subtractive receiver estimated <span class="math-container">$x$</span> as <span class="math-container">$\widehat x=X-h$</span>.</p>
<p><a href="https://uwspace.uwaterloo.ca/bitstream/handle/10012/202/nq22246.pdf?sequence=1&amp;isAllowed=y" rel="noreferrer">It is possible to show</a> that <span class="math-container">$\widehat x\sim U[x-1/2,x+1/2]$</span>, and thus <span class="math-container">$\mbox{Var}[\widehat x]=1/12$</span>.</p>
<hr />
<blockquote>
<p><strong>Is there an unbiased algorithm (i.e., with <span class="math-container">$\mathbb E[\widehat x]=x$</span>) that uses a single bit and has a variance lower than <span class="math-container">$1/12$</span> <em>for all</em> <span class="math-container">$x\in[0,1]$</span>?</strong></p>
</blockquote>

CC BY-SA 4.0
2021-02-01T09:53:40.533Z
I believe this is one of the questions explored in this [very recent paper](https://arxiv.org/abs/2010.02331) by Ben Basat, Mitzenmacher, and Vargaftik (are you one of the authors?) Mentioning that paper here as it seems relevant.
Clement C.
CC BY-SA 4.0
2021-02-01T10:57:11.060Z
It is not answered there :). @ClementC.
R B
<ds.algorithms><approximation-algorithms><it.information-theory><coding-theory><encoding>
Is subtractive dithering the optimal algorithm for sending a real number using one bit?
R B
# Is subtractive dithering the optimal algorithm for sending a real number using one bit?

(Asked by: username_0 on 2021-01-28)

Consider the problem of sending a real number $x\in[0,1]$ using a single bit $X\in\{0,1\}$ in an unbiased manner.

We assume that the sender and receiver have access to shared randomness $h\sim U[-1/2,1/2]$ that they can use for choosing $X$ and estimating $x$.

Subtractive dithering is an algorithm that sends
$$X =
\begin{cases}
1 & \mbox{if $x+h\ge 1/2$}\\
0 & \mbox{otherwise}
\end{cases}.
$$
In turn, the subtractive receiver estimated $x$ as $\widehat x=X-h$.

[It is possible to show](https://uwspace.uwaterloo.ca/bitstream/handle/10012/202/nq22246.pdf?sequence=1&isAllowed=y) that $\widehat x\sim U[x-1/2,x+1/2]$, and thus $\mbox{Var}[\widehat x]=1/12$.

---

> **Is there an unbiased algorithm (i.e., with $\mathbb E[\widehat x]=x$) that uses a single bit and has a variance lower than $1/12$ *for all* $x\in[0,1]$?**

**Tags:** ds.algorithms, approximation-algorithms, it.information-theory, coding-theory, encoding
> **Comments:**
> **username_1**: I believe this is one of the questions explored in this [very recent paper](https://arxiv.org/abs/2010.02331) by Ben Basat, Mitzenmacher, and Vargaftik (are you one of the authors?) Mentioning that paper here as it seems relevant.  
> **username_0**: It is not answered there :). @ClementC.  

---

## 1 answers

### Answer by username_2 on 2021-02-08. Score: 4 | Accepted answer

**Note:** See the edit at the bottom for an argument showing that there *is* an unbiased algorithm which has variance strictly lower than $1/12$ for all $x \in [0,1]$.

We can at least prove that if $x$ is chosen uniformly from $[0,1]$, then the average variance must be at least $\pi^2/64 - 1/12$. There is a dithering algorithm that achieves this average-case variance, as follows. We interpret the shared randomness as a uniformly random point $(s,t)$ from the disk with radius $1/2$ and center $(1/2,0)$. The sender sends a $1$ if $x > s$ and a $0$ otherwise, while the receiver takes $\hat{x} = 1/2 + \frac{\pi}{8}\sqrt{s/(1-s)}$ if they receive a $1$, and $\hat{x} = 1/2 - \frac{\pi}{8}\sqrt{(1-s)/s}$ if they receive a $0$. To see that this is unbiased, note that $s$ has probability density function $\frac{8}{\pi}\sqrt{s(1-s)}$, so the expected value of $\hat{x}$ is

$$\int\_0^x \Big(1/2 + \frac{\pi}{8}\sqrt{s/(1-s)}\Big)\frac{8}{\pi}\sqrt{s(1-s)}\ ds + \int\_x^1 \Big(1/2 - \frac{\pi}{8}\sqrt{(1-s)/s}\Big)\frac{8}{\pi}\sqrt{s(1-s)}\ ds\\
= \int\_0^1 \frac{4}{\pi}\sqrt{s(1-s)} + s\ ds - \int\_x^1 1\ ds
= x.$$

To see that this is optimal for the average-case variance, let's first make a framework to describe the most general possible algorithm. For every possible value of the shared randomness $h$, the receiver will estimate $\hat{x}$ as one value $a(h)$ if they receive a $0$ bit, and will estimate $\hat{x}$ as a different value $b(h)$ if they receive a $1$ bit. We may as well assume that $a(h) \le b(h)$ for all $h$.

On the sender's side, imagine that the functions $a, b$ are fixed and $x$ is known, but that the sender hasn't yet peeked at the randomness $h$. The sender has to divide the possible values of $h$ into disjoint sets $A(x)$ and $B(x)$, with the plan of sending a $0$ bit if $h \in A(x)$ and sending a $1$ bit if $h \in B(x)$, subject to the constraint

$\mathbb{E}\_h[a(h)\cdot\mathbf{1}\_{h \in A(x)} + b(h)\cdot\mathbf{1}\_{h \in B(x)}] = x$,

such that the variance of the random variable $a(h)\cdot\mathbf{1}\_{h \in A(x)} + b(h)\cdot\mathbf{1}\_{h \in B(x)}$ is minimized. Since the mean is fixed, minimizing the variance is equivalent to minimizing the second moment

$\mathbb{E}\_h[a(h)^2\cdot\mathbf{1}\_{h \in A(x)} + b(h)^2\cdot\mathbf{1}\_{h \in B(x)}]$.

Since $\frac{b^2 - a^2}{b - a} = a+b$, and since we assumed that $a(h) \le b(h)$ for all $h$, the optimal strategy for the sender is to greedily set

$A(x) = \{h \mid a(h) + b(h) > t(x)\}, B(x) = \{h \mid a(h) + b(h) < t(x)\}$

for some threshold $t(x)$ which is chosen to satisfy the constraint on the mean:

$\mathbb{E}\_h[a(h)\cdot\mathbf{1}\_{a(h) + b(h) > t(x)} + b(h)\cdot\mathbf{1}\_{a(h) + b(h) < t(x)}] = x.$

(If $a(h) + b(h) = t(x)$ with positive probability, then we divide the set of $h$s with $a(h) + b(h) = t(x)$ in any way we like to make the constraint on the mean work out.)

By rearranging the internals of the algorithm, we may now assume that $a(h) + b(h)$ is an increasing function of the random variable $h$, so the sender's strategy can be expressed as: send $0$ if $x < s(h)$ and send $1$ if $x > s(h)$, where $s$ is another threshold function, which satisfies

$\mathbb{E}\_h[a(h)\cdot \mathbf{1}\_{x < s(h)} + b(h)\cdot \mathbf{1}\_{x > s(h)}] = x$.

From this, we can deduce that

$\mathbb{E}\_h[a(h)s(h)^n + b(h)(1-s(h)^n)] = \mathbb{E}\_{x,h}[a(h)\cdot nx^{n-1}\mathbf{1}\_{x < s(h)} + b(h)\cdot nx^{n-1} \mathbf{1}\_{x > s(h)}] = \mathbb{E}\_x[nx^n] = \frac{n}{n+1}$

for every $n$, and that $b(h) - a(h) = s'(h)$.

Using the above identities, we can check that the expected variance is

$$\mathbb{E}\_{x,h}[a(h)^2\cdot \mathbf{1}\_{x < s(h)} + b(h)^2\cdot \mathbf{1}\_{x > s(h)} - x^2]\\
= \mathbb{E}\_{h}[a(h)^2s(h) + b(h)^2(1-s(h)) - 1/3]\\
= \mathbb{E}\_h[(a(h)s(h) + b(h)(1-s(h)) - 1/2)^2 + (b(h) - a(h))^2s(h)(1-s(h)) - 1/12]\\
\ge \mathbb{E}\_h[(b(h) - a(h))^2s(h)(1-s(h)) - 1/12].$$

By Cauchy-Schwarz, we have

$$\mathbb{E}\_h[(b(h) - a(h))^2s(h)(1-s(h))]\\
\ge \mathbb{E}\_h[(b(h) - a(h))\sqrt{s(h)(1-s(h))}]^2\\
= \mathbb{E}\_h[s'(h)\sqrt{s(h)(1-s(h))}]^2\\
= \Big(\int\_0^1 \sqrt{s\cdot (1-s)}\ ds\Big)^2 = \frac{\pi^2}{64},$$

which finishes the proof.

**Edit:** We can actually combine the disk-based example algorithm above (with the least possible average variance) and the subtractive dithering algorithm to create a dithering algorithm which has variance strictly less than $1/12$ for every $x$. The main idea is that the set of functions

$x \mapsto \operatorname{Var}[\hat{x}]$

coming from unbiased dithering algorithms is a convex set: given any pair of dithering algorithms, we can use shared randomness to randomly choose between them. Our plan is to first perturb the subtractive dithering algorithm in a way which keeps its average variance (for $x$ uniformly in $[0,1]$) approximately the same but which makes the variance lower for $x$ closer to $0$ and $1$ and higher for $x$ close to $1/2$, and then to take a weighted combination of this perturbed subtractive dithering algorithm with the disk-based example algorithm described above.

To perturb the subtractive dithering algorithm, we will stick with the choice of threshold $s(h) = h$, but we will perturb the functions $a(h), b(h)$. The perturbed functions will be given by

$$a(h) = h - 1/2 + \delta'(h)\\ b(h) = h + 1/2 + \delta'(h)$$

for some small function $\delta(h)$ - as long as $\delta(1) - \delta(0) = \mathbb{E}\_h[\delta'(h)] = 0$, this perturbed algorithm will be unbiased. The variance of the perturbed subtractive dithering algorithm is then given by

$$\operatorname{Var}[\hat{x}] = \mathbb{E}\_h[a(h)^2\cdot \mathbf{1}\_{x < h} + b(h)^2\cdot \mathbf{1}\_{x > h} - x^2]\\
= \tfrac{1}{12} + \mathbb{E}\_h[(2h-1)\delta'(h)\cdot \mathbf{1}\_{x < h} + (2h+1)\delta'(h)\cdot\mathbf{1}\_{x > h} + \delta'(h)^2]\\
= \tfrac{1}{12} + 2\delta(x) - 2\int\_0^1 \delta(h)\ dh + \int\_0^1 \delta'(h)^2\ dh.$$

As you can see, the average value of $\operatorname{Var}[\hat{x}]$ increases by only $\int\_0^1 \delta'(h)^2\ dh$, so by taking $\delta(x)$ a sufficiently small multiple of the difference of the two variance functions for the two algorithms in question, we get the perturbation we need. (While the resulting combination of the perturbed dithering algorithm and the disk-based algorithm outperforms subtractive dithering for all $x$, it is almost certainly not optimal, so I won't work out the gory details.)

> **Comments:**
> **username_0**: Thanks for the answer, but I am not sure that the suggested algorithm is unbiased.  Consider $x=0$ (or a small $\epsilon>0$). Then the sender will send $0$, making the estimate $1/2 - \frac{\pi}{8}\sqrt{(1-s)/s}$. But this has a negative expectation(?).  
> **username_2**: Keep in mind that $s$ is not uniformly distributed: in the example algorithm, the probability density function for $s$ is given by $\frac{8}{\pi}\sqrt{s(1-s)}$. If $s$ is sampled from this distribution, then the expectation of $1/2 - \frac{\pi}{8}\sqrt{(1-s)/s}$ is $\int_0^1 \frac{4}{\pi}\sqrt{s(1-s)} - (1-s)\ ds = 0$.  
> **username_0**: Ah, Got it now, thanks. We were able to prove a $1/16$ bound using completely different arguments, but yours is better :).  
> **username_0**: Re-reading this after a year :).  Can you please explain how you get to $b(h) - a(h)=s'(h)$? This seems to be incorrect for subtrcative dithering (but we do get $a(h)-b(h)=s'(h)$).  

---

