Let a,b,c,p,q,r be positive integers with p,q,r≥2. Denote
Q={(x,y,z)∈Z3:0≤x≤a,0≤y≤b,0≤z≤c}.
Initially, some pieces are placed on each point in Q, with a total of M pieces. The following three types of operations can be performed repeatedly:
1. Remove p pieces from (x,y,z) and place a piece on (x−1,y,z);
2. Remove q pieces from (x,y,z) and place a piece on (x,y−1,z);
3. Remove r pieces from (x,y,z) and place a piece on (x,y,z−1).
We need to find the smallest positive integer M such that it is always possible to perform a sequence of operations to place a piece on (0,0,0), regardless of the initial distribution of pieces.
We claim that the smallest positive integer M is paqbrc.
To show that M≥paqbrc, consider the invariant
N=0≤x≤a,0≤y≤b,0≤z≤c∑f(x,y,z)p−xq−yr−z,
where f(x,y,z) is the number of pieces at (x,y,z). Initially, N=Mp−aq−br−c. After any operation, N remains unchanged. To ensure that f(0,0,0)≥1 at the end, we need N≥1, which implies M≥paqbrc.
To show that M=paqbrc is sufficient, we proceed by induction on a+b+c. The base case is trivial. Assume it holds for all smaller values of a+b+c. We group the paqbrc pieces into p groups of pa−1qbrc pieces each. By the inductive hypothesis, each group can be used to place a piece on (1,0,0). These p pieces can then be used to place a piece on (0,0,0).
Thus, the smallest positive integer M such that a piece can always be placed on (0,0,0) is:
paqbrc.