On its way to the corner, the ball will bounce \(b-1\) times off the top and bottom and \(a-1\) times off the sides. It can be seen that if \(a-1\) is even, then the ball will end in one of the corners on the right hand side. The complete results can be seen in the following Carroll diagram:
It can be shown that the ball will never finish in the top left (where it started) as this would require it to travel through the bottom right first. Therefore the following holds:
For which sizes of rectangle will the path of the ball make the same pattern?