Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thank you very much. The first and third question have been solved using your sulution. Also, it can be used to solve question 2. Let $x$ be the number of pairs $(i,j)$ such that $|S_i \cap S_j|\ge (n-1)/2$, then $xn+\left(\binom{n+1}{2}-x\right)\frac {n-3} 2 \ge \frac{{{n^2}(n - 1)(n + 1)}}{{4n}}$. Solving $x$ leads to $x \geqslant \frac{{n(n + 1)}}{{n + 3}}$, namely $x=\Omega(n)$.
I completely understand. This sulution is perfect! It has a really tight bound (in the following sutuation: $p=515,q=508$ and $n=3085$, $a_n$ have already been greater than $2^{13}-1$). $3085 \times 16/3=16453$, just greater than $2^{14}$, amazing!