  In this paper, we develop Terence Tao's harmonic analysis method and apply it
to restricted sumsets. The well known Cauchy-Davenport theorem asserts that if
$A$ and $B$ are nonempty subsets of $Z/pZ$ with $p$ a prime, then $|A+B|\ge
min{p,|A|+|B|-1}$, where $A+B={a+b: a\in A, b\in B}$. In 2005, Terence Tao gave
a harmonic analysis proof of the Cauchy-Davenport theorem, by applying a new
form of the uncertainty principle on Fourier transform. We modify Tao's method
so that it can be used to prove the following extension of the Erdos-Heilbronn
conjecture: If $A,B,S$ are nonempty subsets of $Z/pZ$ with $p$ a prime, then
$|{a+b: a\in A, b\in B, a-b not\in S}|\ge min {p,|A|+|B|-2|S|-1}$.
