The problem
Let
$p(d)=\int_{-\pi}^{\pi} \chi(x)\chi(x+d) {\rm d} x$.
Both $p$ and $\chi$ are $2\pi$-periodic, real valued, positive functions.
With the restriction that $\chi(x)$ can take only the values 0 or 1, is $\chi(x)$ except for a shift $s$ of the argument $\chi(x+s)$ uniquely determined by $p(d)$?
What I have so far
Representing $\chi(x)$ as a Fourier series
$\chi(x)=\sum_{k=-\infty}^\infty C_k \exp({\rm i}kx)$
and inserting this in the integral gives
$p(d)= 2 \pi ( C_0^2 + 2\sum_{k=1}^\infty C_{-k}C_{k} \cos(k d))$.
Therefore $p(d)$ is an even function. This is understandable, as changing $+d$ to $-d$ in the first equation can be compensated by shifting the bounds of the integral (admissible because of periodicity) and the commutativity of the product. So knowing $p(d)$ and its cosine-Fourier expansion coefficients $D_{0\ldots \infty}$
$p(d)= \sum_{k=0}^\infty D_k \cos(k d)$
with real coefficients $D_k$ allows by comparing coefficients to identify products of Fourier coefficients $C_k$ of $\chi(x)$,
$D_k = 4 \pi C_{-k}C_{k}\quad \rm{for}\quad k>0$
$D_0 = 2 \pi C_0^2\quad \rm{for}\quad k=0 $
This is of course not sufficient to identify $C_k$. Usually, higher moments are required. But if I constrain $\chi(x)$ to the value 0 or 1, is it possible to determine $C_k$?
To check this, the Fourier series of $\chi(x)$ must converge for all $x$ to either 0 or 1. How can I put this mathematically and check whether it determines $\chi(x)$?
You still have the problem that shifting the argument of $\chi$ by a constant that isn't a period of $\chi$ will change $\chi$ but not $p$. In particular, if we write $\chi(x)=\sum_{n\in\Bbb Z}\chi_ne^{in\chi}$ so $\chi_{-n}=\chi_n^\ast$, you can show $p(d)=2\pi\sum_{n\in\Bbb Z}|\chi_n|^2e^{-ind}$, which is invariant under $\chi_n\mapsto\chi_n\exp in\theta$ (as is $\chi_{-n}=\chi_n^\ast$), which is equivalent to the periodicity-preserving replacement $\chi(x)\mapsto\chi(x+\theta)$.