TITLE: There are $2n$ people on a social media platform. Prove there are at least $5n$ pairs of friends.
QUESTION [9 upvotes]: There are $2n$ people on a social media platform, where any pair of them may or may not be
friends. For any group of $n$ people, there are at least $n$ pairs of them that are friends. What
is the least number of friendships, that is, the least number of pairs of people that are friends, that
must be among the $2n$ people?

This a problem from last year Canadian national competition. Offical solution is $5n$.
Here is what I did: For every $n$ vertices we have $n$ edges so $${2n\choose n} \cdot n \leq \varepsilon \cdot {2n-2\choose n-2} \implies \varepsilon\geq {2n(2n-1)\over n-1} $$
So, by this to naive method we get:  $$\varepsilon \geq 4n+3$$
I also wonder if this is doable with the probabilistic method?

REPLY [3 votes]: THM 1: Let $G$ be a graph on $2N$ vertices such that
for every subset $S$ of $G$ of $N$ vertices, there are
at least $N$ edges in $G$ with both endpoints in $S$. Then $G$ has
at least $5N$ edges.

We now prove THM 1. Now let $S$ be a subset of $V(G)$ on $N$ vertices that satisfies the following: For all other subsets $S'$ of $G$ with $N$ vertices, the number of edges in $G[S']$, is at least as large as the number of edges in $G[S]$.
We make the following claim:

Claim 1: Every vertex $y$ in $V(G)\setminus S$ has at least 3 neighbors in $S$.

Proof: Suppose otherwise. Let $y$ be a vertex with 2 or fewer neighbors in $S$. We consider 2 cases:
Case 1: $y$ has at least one neighbor in $G[S]$, and $G[S]$ has no vertices of degree-3 or higher. Then every vertex in $G[S]$ must have degree no more than 2, and so the hypothesis of THM 1 implies every vertex in $G[S]$ has degree 2 and so $G[S]$ has exactly $N$ edges. So $G[S+\{y\}]$ has no more than $N+2$ vertices and at least 1 vertex $v$ of degree 3 in $G[S+\{y\}]$, namely, $v$ can be any one of $y$'s neighbors in $S$. So $G[S +\{y\} - \{v\}]$ has no more than $N+2-3<N$ vertices which contradicts the hypothesis of THM 1.
Case 2: $G[S]$ has at least one vertex of degree 3, or $y$ has no neighbors in $S$. In either case, there is a vertex $v \in S$ such that
$y$ has fewer neighbors in $S$ than $v$ does. So $(S-\{v\})+\{y\}$ has $N$ vertices yet $G[(S-\{v\})+\{y\}]$ has fewer neighbors than $G[S]$ does, which contradicts the definition of $S$.
Note that Cases 1 and 2 cover all possibilities. So Claim 1 holds. $\surd$
So let us now use this to lower-bound the number of edges in $G$.
Let us set $T=V(G)\setminus S$. Then $T$ and $S$ are disjoint
and each have exactly $N$ vertices and partition $\Omega \doteq V(G)$.
Then by Claim 1 there are $3N$ edges between $S$ and $T$, and by
the hypthesis, there are at least $N$ edges with both endpoints
in $S$, and there are are at least $N$ edges with both endpoints
in $T$. Which gives at least $3N+N+N=5N$ edges total. And thus THM 1 follows. $\surd$

This bound is tight for $N$ a multiple of 3, and is within $O(1)$ edges of being tight for other $N$. Take the graph $G$ consisting
of $\frac{N}{3}$ cliques with precisely 6 vertices in each clique for $N \pmod 3 =0$, and of $\lfloor \frac{N}{3} \rfloor$ cliques, all but the last having exactly 6 vertices and the rest having the remaining 8 or 10 vertices, for $N \pmod 3 =1,2$. This graph satisfies the conditions of the hypothesis of THM 1.