# Need help with a simple math proof

Imagine an infinitely long sequence of squares where one of these squares contains a frog, and another square contains a fly.

For simplicity, let's number all of the (infinitely many) squares by assigning each an integer. We'll say that the frog starts in position 0, and will assign positive integers to the squares to the right of the frog and negative numbers to the squares to the left of the frog.

The frog can hop across the squares forward and backward, but can only make jumps of two different lengths: 3 and 7. For example, to get to square five to eat the fly, the frog might might jump forward seven squares to square 7, forward seven squares again to square 14, then back three squares three times to squares 11, 8, and (finally) 5.

1) Prove that, starting at position 0, the quantum frog can move to any square using only jumps of length 3 and 7.

2) Prove that in an optimal series of jumps from square 0 to square k, all jumps of the same distance must be made in the same direction. That is, all of the frog's jumps of distance 3 must be in the same direction, and all of the frog's jumps of distance 7 must be in the same direction (though these two directions don't have to be the same).

3) Prove that in an optimal series of jumps from square 0 to square k, the frog can never use jumps of size three more than six times.

-
Taken verbatim from stanford.edu/class/archive/cs/cs103/cs103.1132/handouts/… –  Austin Mohr Jul 3 '13 at 4:03
This question appears to be off-topic because it is about defacing your own posting to remove the actual question. –  Amzoti Jul 3 '13 at 5:46

Because $7 - 2 \times 3 = 1$, you can think of a jump of length 7 to the right followed by two jumps of length 3 to the left as a single jump of length 1 to the right. Reversing this will give a jump of length 1 to the left instead.
Now that we know how to jump one square at a time, it's easy to see why we can reach all the squares using only jumps of length $3$ and length $7$.