4. Find the smallest number $n>4$ for which there exists a set of $n$ people such that any two who know each other have no common acquaintances, and any two who do not know each other have exactly two common acquaintances. (Acquaintance is a symmetric relation: if $A$ knows $B, A \neq B$, then $B$ also knows $A$.)

(Bulgarian)
4. Let's consider some person $A$ in the set that satisfies the conditions of the problem. Suppose $A$ knows $m$ people: $A_{1}, A_{2}, \ldots, A_{m}$. For $1 \leqslant i<j \leqslant m$, the people $A_{i}$ and $A_{j}$ do not know each other because they have a common acquaintance, so they must have another common acquaintance: denote this by $A_{i j}=A_{j i}$. No two of the $\left(\begin{array}{c}m \\ 2\end{array}\right)$ people $A_{i j}$ are the same, otherwise that person and person $A$ would have at least three common acquaintances. Also, every person who does not know $A$ is among the people $A_{i j}$, because they have a common acquaintance with $A$. It follows that $n=1+m+\binom{m}{2}=\frac{m^{2}+m+2}{2}$. From this, it also follows that every person in the set has exactly $m$ acquaintances.

The people $A_{i j}$ and $A_{i k}(j \neq k)$ do not know each other because they have a common acquaintance. Therefore, all $k-2$ acquaintances of $A_{i j}$ different from $A_{i}$ and $A_{j}$ are among the people $A_{k l},\{k, l\} \cap\{i, j\}=\varnothing$, so $m-2 \geqslant\binom{ m-2}{2}$ and from this $m \geqslant 5$ and $n \geqslant 16$.

From the previous consideration, we directly find an example for $n=16$. It is sufficient to choose the people $A, A_{i}(1 \leqslant i \leqslant 5)$ and $A_{i j}(1 \leqslant i<j \leqslant 5)$ such that (i) $A$ knows $A_{i}$, (ii) $A_{i}$ and $A_{j}$ know $A_{i j}$, and (iii) $A_{i j}$ and $A_{k l}$ know each other if $\{i, j\} \cap\{k, l\}=\varnothing$, with no other acquaintances.