Fred the Four-Dimensional Fluffy Sheep is walking in 4-dimensional space. He starts at the origin. Each minute, he walks from his current position to some position with integer coordinates satisfying
and
In how many ways can Fred reach after exactly 40 minutes, if he is allowed to pass through this point during his walk?
Problem 1536
Official solution
Solution:
The possible moves correspond to the vectors , , and their permutations. It's not hard to see that these vectors form the vertices of a 4-dimensional hypercube, which motivates the change of coordinates
Under this change of coordinates, Fred must travel from to , and the possible moves correspond to the sixteen vectors . The new -coordinate must increase 30 times and decrease 10 times during Fred's walk, while the other coordinates must increase 20 times and decrease 20 times. Therefore, there are possible walks.