If you assume:
1. John and Fred walk the same speed
2. John and Fred ride the same speed
3. Lamposts are evenly spaced
4. Each section of travel is bounded by start point, town, or a lamp post.
5. There is a lamp post at the start and stop points, or the distance from the start or stop point to the nearest lamp post is the same as from lamp post to lamp post.
6. DELTA=(section walk time)-(section ride time)
7. They Ride faster than they walk.

John is correct.

For an even number of sections John and Fred will both arrive at town sooner (and at the same time). For each pair of sections, they will reduce there travel time by DELTA.

If the number of sections is odd, the scenario is the same as above except that John will arrive at town first and shave an additional DELTA off of his travel time (Fred gets no additional travel time reduction).

Since John concocted the proposition, perhaps he does not intend to chain up the bike to the first lamp post at all...
_________________________
MK2a 160GB

11 Years later, these Mk2a units still rock...