Let $G=(V,E)$ be a graph with $n$ vertices. We call an edge $(i,j)\in E$ is imbalanced if $d_i\neq d_j$. What is the maximum number of imbalanced edge of $G$?
A candidate type of graph that attain the maximum value is the complete $k$-partite graph $K_{d_1,d_2,\dots,d_k}$ such that $d_1+d_2+\dots+d_k=n$ and all of the $d_i$ are pairwise different, so that all of the edges of $K_{d_1,d_2,\dots,d_k}$ are imbalanced.