MathLabs

Problem 5

Each of the six boxes B1,B2,B3,B4,B5,B6B_1,B_2,B_3,B_4,B_5,B_6 initially contains one coin. A type 1 operation chooses a nonempty box BjB_j with 1≤j≤51\le j\le5, removes one coin from it, and adds two coins to Bj+1B_{j+1}. A type 2 operation chooses a nonempty box BkB_k with 1≤k≤41\le k\le4, removes one coin from it, and exchanges the contents of (possibly empty) boxes Bk+1B_{k+1} and Bk+2B_{k+2}. Determine whether a finite sequence of operations can leave B1,B2,B3,B4,B5B_1,B_2,B_3,B_4,B_5 empty and B6B_6 containing exactly 2010201020102010^{2010^{2010}} coins. Here abca^{b^c} means a(bc)a^{(b^c)}.
Step 5 of 5: Transfer the exact remainder to the sixth box
4⋅D4=D4\cdot\frac{D}{4}=D
Detailed analysis

From (0,D/4,0,0)(0,D/4,0,0) in (B3,B4,B5,B6)(B_3,B_4,B_5,B_6), apply type 1 at B4B_4 until it is empty, producing D/2D/2 coins in B5B_5. Then apply type 1 at B5B_5 until it is empty, producing DD coins in B6B_6, because 4⋅(D/4)=D4\cdot(D/4)=D. All of B1B_1 through B5B_5 are now empty, so the required finite sequence exists. The answer is yes.