Frustrated Triangles
A triple of vertices in a graph is a \emph{frustrated triangle} if it induces an odd number of edges. We study the set Fn⊂[0,(3n)] of possible number of frustrated triangles f(G) in a graph G on n vertices. We prove that about two thirds of the numbers in [0,n3/2] cannot appear in Fn, and we characterise the graphs G with f(G)∈[0,n3/2]. More precisely, our main result is that, for each n≥3, Fn contains two interlacing sequences 0=a0≤b0≤a1≤b1≤⋯≤am≤bm∼n3/2 such that Fn∩(bt,at+1)=∅ for all t, where the gaps are ∣bt−at+1∣=(n−2)−t(t+1) and ∣at−bt∣=t(t−1). Moreover, f(G)∈[at,bt] if and only if G can be obtained from a complete bipartite graph by flipping exactly t edges/nonedges. On the other hand, we show, for all n sufficiently large, that if m∈[f(n),(3n)−f(n)], then m∈Fn where f(n) is asymptotically best possible with f(n)∼n3/2 for n even and f(n)∼2n3/2 for n odd. Furthermore, we determine the graphs with the minimum number of frustrated triangles amongst those with n vertices and e≤n2/4 edges.