On the distance to monotonicity of a biological network: a graph-theoretical approach