How can $B(a)$ be utilized in the attached question in graph theory Let $G := (V,E)$ be a graph. Show that there is a function $α : V → \{0,1\}$
such that, for each $v ∈ V$, at least half of the neighbours of $v$ have a different
$α$-value than $v$.
Here's the question. It is part of my Graph Theory homework and I've done every other problem except this one... I've tried an approach utilizing the fact that every graph $G$ contains a bipartite subgraph with at least half the edges, but that didn't work. Can somebody tell me how this hint is related to other theorems in Graph Theory? Because I'm really a little stuck around here.

As you write in the comments, let $B(\alpha)$ denote the number of edges of $G$ that have different $\alpha$-values on the endpoints.
Hint: choose $\alpha$ so that $B(\alpha)$ is maximal and show that it has the desired property.
Solution:

 If there was a vertex $v$ such that less than half of its neighbours have $\alpha$-values different from $\alpha(v)$, then changing $\alpha(v)$ would increase $B(\alpha)$.

