If $u \leftrightarrow v$ in a graph $G$, prove that $uv$ belongs to at least $d(u) + d(v) − n(G)$ triangles in $G$, where $n(G)=$ number of vertices in $G$.
In this question, I tried a lot. I know we are supposed to start with $2$ vertices and check the vertices they are adjacent to, but I'm unable to write the entire solution. Please help.
Working in the direction you mentioned, let the set of vertices adj. to $u$ be $A$ and to $v$ be $B$. The set of vertices adjacent to both $u$ & $v$ $=A\cap B$. Note that $$|A\cap B|=|A|+|B|-|A\cup B|$$ $$|A|=d(u), |B|=d(v) \quad and \quad|A\cup B|\leq n(G)$$ Also, $|A\cap B|=$the no. of triangles asked since they'll formed with the vertices common to $u$ and $v$. So, $$|A\cap B|=|A|+|B|-|A\cup B|\geq d(u)+d(v)-n(G)$$