So, Bob is given the following state (also called the *maximally-mixed state*):

$\rho = \frac{1}{2}|0\rangle\langle 0| + \frac{1}{2}|1\rangle\langle 1| = \begin{bmatrix} \frac{1}{2} & 0 \\ 0 & \frac{1}{2} \end{bmatrix}$

As you noticed, one nice feature of density matrices is they enable us to capture the uncertainty of an outcome of a measurement and account for the different possible outcomes in a single equation. Projective measurement is defined by a set of measurement operators $P_i$, one for each possible measurement outcome. For example, when measuring in the computational basis (collapsing to $|0\rangle$ or $|1\rangle$) we have the following measurement operators:

$P_0 = |0\rangle\langle0| = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$, $P_1 = |1\rangle\langle1| = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}$

where $P_0$ is associated with outcome $|0\rangle$ and $P_1$ is associated with outcome $|1\rangle$. These matrices are also called *projectors*.

Now, given a single-qbit density operator $\rho$, we can calculate the probability of it collapsing to some value with the following formula:

$p_i = Tr(P_i \rho)$

where $Tr(M)$ is the *trace*, which is the sum of the elements along the main diagonal of matrix $M$. So, we calculate the probability of your example collapsing to $|0\rangle$ as follows:

$p_0 = Tr(P_0 \rho)
= Tr \left( \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} \frac{1}{2} & 0 \\ 0 & \frac{1}{2} \end{bmatrix} \right)
= Tr \left( \begin{bmatrix} \frac 1 2 & 0 \\ 0 & 0 \end{bmatrix} \right) = \frac 1 2$

And the formula for the post-measurement density operator is:

$\rho_i = \frac{P_i \rho P_i}{p_i}$

which in your example is:

$\rho_0 = \frac{\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} \frac{1}{2} & 0 \\ 0 & \frac{1}{2} \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}}{\frac 1 2} = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$

which is indeed the density matrix for the pure state $|0\rangle$.

We don't just want the density operator for a certain measurement outcome, though - what we want is a density operator which captures the branching nature of measurement, representing it as an ensemble of possible collapsed states! For this, we use the following formula:

$\rho' = \sum_i p_i \rho_i = \sum_i P_i \rho P_i$

in our example:

$\rho' = \left( \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} \frac{1}{2} & 0 \\ 0 & \frac{1}{2} \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \right) + \left( \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} \frac{1}{2} & 0 \\ 0 & \frac{1}{2} \end{bmatrix} \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \right)$

$\rho' = \begin{bmatrix} \frac 1 2 & 0 \\ 0 & 0 \end{bmatrix}
+ \begin{bmatrix} 0 & 0 \\ 0 & \frac 1 2 \end{bmatrix} = \begin{bmatrix} \frac{1}{2} & 0 \\ 0 & \frac{1}{2} \end{bmatrix} = \frac{1}{2}|0\rangle\langle 0| + \frac{1}{2}|1\rangle\langle 1|$

Your final density matrix is unchanged! This should actually be unsurprising, because we started out with the maximally-mixed state and performed a further randomizing operation on it.

*Much of this answer copied from my previous detailed answer here, which in turn is based off of another answer here.*

2You're confusing kets and the associated pure density matrices. Should be like $|0\rangle \langle 0 |$ – AHusain – 2018-11-30T18:15:35.947