How many such operations are necessary to correctly label the boxes? Three operations are necessary to correctly label the boxes. First, open the first box and pick one rock at random. Then, open the second box and pick one rock at random. Finally, open the third box and pick one rock at random. After each operation, put the rock back into its respective box without seeing the color of the other rock.