Number invariant problem: replacing any two numbers $a$ and $b$ with $a - 1$ and $b + 3$ 
Numbers 1, 2, 3, ..., 2014 are written on a blackboard. Every now and then somebody picks two numbers $a$ and $b$ and replaces them by $a - 1$, $b + 3$. Is it possible that at some point all numbers on the blackboard are even? Can they all be odd?

I cannot figure out how to use the terms $a - 1$ and $b  + 3$ to form a invariant.
 A: Hint: subtracting $1$ or adding $3$ changes a number's parity (i.e. it goes from odd to even or vice versa).  When you do this to two numbers, the number of odd numbers on the blackboard  changes by either $-2$, $0$ or $+2$.
A: It is not possible, since with every replacing, the number of odd numbers either stays the same, increases by 2 or decreases by 2. Since at the start there is an odd number of odd numbers, it will always stay odd, especially it will never be 2014. The same argument applies for the number of even numbers.
A: Yes, at some point all the numbers on the board can be odd (or even).  The possibilities for each step are the following:


*

*Erase two even numbers, then write two odd numbers.

*Erase two odd numbers, then write two even numbers.

*Erase an even number and an odd number, then write an odd number and an even number.


Initially there are $1007$ even numbers and $1007$ odd numbers on the board.  Repeat step (1) until all the numbers but one are odd (or even).  Then carry out step (3).  Just after you erase $a$ and $b$, and before you write $a-1$ and $b+3$, all the numbers on the board are odd (or even).
