Given $n$ random variables uniformly distributed from $0$ to $1$, what is the probability that no two differ by less than some $x$?
My initial thought was that for $n$ random variables there are $n \choose 2$ pairings, and the probability that for each given pairing the difference is greater than $x$ is given by $({1-x})^2$ so then the answer would be $\Big((1-x)^2\Big)^{n \choose 2}=(1-x)^{n(n-1)}$. But upon inspection this answer is obviously wrong.
For instance consider the case where $n=3$ and $x>0.5$. There exist no solution. This should be obvious since if the smallest number and the middle number differ by more than $x$ and if the middle number and the largest number differ by more than $x$ then that implies the smallest number and the largest number differ by more than $1$ which is impossible. But the formula above gives a non zero answer.
What is the correct answer to this question? Any help would be appreciated