For all three parts, try working with small numbers first. For example, try all the cases where there are two marbles in the bowl, then three marbles, etc. When you find a pattern, see if that pattern must always hold.
Solution
- If there is at least one white marble in the bag at the beginning, then every time you select two marbles and put one back you are sure to have a white marble still in the bag: either you didn't select the white marble, in which case it's still in the bag, or you did pick the white marble, in which case you have to put a white marble back in. Thus, if the bag starts with at least one white marble it is guaranteed to always have a white marble, so that the final marble must be white. If there are no white marbles to start, then clearly the final marble will be black.
- This is the opposite of the first puzzle: if there is at least a single black marble then the final marble will be black. The reasoning is similar: assuming there is at least one black marble in the bag, then either you select two different marbles or you select at least one black marble, and in either case the bag is guaranteed to have a black marble afterwards. If it starts with no black marbles, the final marble must be white.
- This is trickier: if there are an odd number of black marbles to start then the final marble will be black; otherwise it's white. One way to see this: no matter what the colors of the marble are, the number of black marbles in the bowl is either the same or it's reduced by two. Thus, if there is an odd number before drawing two marbles, there will be an odd number afterwards. If there is only one marble left, it must be black. On the other hand, if there is an even number of black marbles to start, then it will remain even after every drawing and replacing. Thus, if there is one marble left, it must be white.
Another way to view these puzzles is as logical operators on the Boolean values True and False. Think of white as False and black as True. Then the first puzzle describes logical AND. If you AND Boolean values together, the output is True (i.e. black) if and only if every value was True (i.e. every marble is black), otherwise it's False (i.e. white). The second puzzle is logical OR, where the output is True (black) if and only if at least one is True (i.e. at least one marble is black). The third puzzle is XOR, i.e. exclusive OR. The output of XORing Boolean values is True if there is an odd number of True and False otherwise.