Maximum cuts and largest bipartite subgraphs