Hint for homework 5, problem 1:
Let X be uniform on Ext^{-1}(b) with probability 1-delta and uniform on Ext^{-1}(b xor 1) with probability delta.
Another hint...