It's a problem from some russian competition:
We're given a card with two positive integers $(a,b)$ and we have tree machines which generate another card from the one we insert on it(I assume we don't lose the first one, when we put one card on it we end up with 2 cards)
the first machine receives $(a,b)$ and returns $(a+1,b+1)$
the second one receives $(a,b)$ and if both are even it returns $(\frac a2, \frac b2)$ it don't do nothing otherwise
the third one receives two cards: $(a,b)$ and $(b,c)$ and returns $(a,c)$
question: Can we obtain the card $(1,50)$ if we start with the $(5,19)$ ?
My guess: No
But I only considered the two first machines on my thoughts.
If we're given one card $(a,b)$ the ratio $\frac ab$ can only change by adding the same positive integer in the numerator and on the denominator, so to obtain $(1,50)$ from the previous card we would need to have an integer $p$ such that:
$$\frac{5 + p}{19 + p} = \frac{1}{50}$$
which would mean $$ p = -\frac{33}7$$ so with only the first two machines it would not be possible, but what about the third one ?
Yes. It is possible. We need to exploit the fact the difference will always be a multiple of $7$.