a)
\(\begin{array}{l}M = \frac{1}{2} + \frac{2}{3} + \left( { - \frac{1}{2}} \right) + \frac{1}{3}\\ = \frac{3}{6} + \frac{4}{6} + \left( {\frac{{ - 3}}{6}} \right) + \frac{2}{6}\\ = \frac{{3 + 4 + \left( { - 3} \right) + 2}}{6}\\ = \frac{6}{6} = 1\end{array}\)
b)
\(\begin{array}{l}M = \frac{1}{2} + \frac{2}{3} + \left( { - \frac{1}{2}} \right) + \frac{1}{3}\\ = \left[ {\frac{1}{2} + \left( {\frac{{ - 1}}{2}} \right)} \right] + \left[ {\frac{2}{3} + \frac{1}{3}} \right]\\ = 0 + 1 = 1\end{array}\)