Explanation:
Let's start by counting the number of red and white tokens Anja has at the beginning:
1 white token
0 red tokens
Let's denote by "R" the number of red tokens and by "W" the number of white tokens. We want to find the minimum number of exchanges that will result in:
R = 2W
We can use the two machines to perform the exchanges. Let's denote by M1 the machine that exchanges a red token into 9 white tokens, and by M2 the machine that exchanges a white token into 5 red tokens.
We can perform the following exchanges:
Use M2 to exchange the white token for 5 red tokens. Anja now has:
0 white tokens
5 red tokens
Use M1 to exchange one of the red tokens for 9 white tokens. Anja now has:
8 white tokens
4 red tokens
Use M2 to exchange one white token for 5 red tokens. Anja now has:
7 white tokens
9 red tokens
Use M1 to exchange one red token for 9 white tokens. Anja now has:
70 white tokens
8 red tokens
Use M2 to exchange one white token for 5 red tokens. Anja now has:
69 white tokens
13 red tokens
Use M1 to exchange one red token for 9 white tokens. Anja now has:
621 white tokens
12 red tokens
Use M2 to exchange one white token for 5 red tokens. Anja now has:
620 white tokens
17 red tokens
Use M1 to exchange one red token for 9 white tokens. Anja now has:
5580 white tokens
16 red tokens
Use M2 to exchange one white token for 5 red tokens. Anja now has:
5579 white tokens
21 red tokens
At this point, Anja has twice as many red tokens as white tokens, and it took 8 exchanges to reach this result. Therefore, the fewest number of exchanges required is 8.