Answer: the final color depends only on the initial parity of white balls:
- white even initials -> last black ball;
- odd initial white -> last white ball. It does not depend on the extraction order. Proof by invariant: White's parity does not change:
- two white ones -> you remove 2 white ones and add black one: change -2;
- two black -> change 0 to white;
- one white and one black -> you remove one white and add one white: change 0. White parity is always preserved. In the end there is only one ball left: if it is white, there is 1 white (odd); if it is black, 0 white (even).