The brute force approach to the Manhattan Tourist problem is to search
among all paths in the grid for the longest path, but this is not an option
for even a moderately large grid. Inspired by the previous chapter you may
be tempted to use a greedy strategy. For example, a sensible greedy strategy
would be to choose between two possible directions (south or east) by
comparing how many attractions tourists would see if they moved one block
south instead ofmoving one block east. This greedy strategymay provide rewarding
sightseeing experience in the beginning but, a few blocks later, may
bring you to an area of Manhattan you really do not want to be in. In fact,
no known greedy strategy for the Manhattan Tourist problem provides an
optimal solution to the problem. Had we followed the (obvious) greedy algorithm,
wewould have chosen the following path, corresponding to twenty
three attractions.5