Efficiency of dynamic programming
The combination of tables necessary to solve example 10.1 may seem to constitute a lengthy and tedious solution comparatively speaking however dynamic programming is efficient particularly in large problems. if we call each line in tables 10.2 to 10.5 a calculation a total of 40 calculations was required if an exhaustive examination of all possible routes between a and b had been made the total number would have been the product of the number of possibilities from a2 to b there are four possibilities from each of the b points there are four possibilities of passing to c and similarly
From c to d from d to e2 there is just one possibility the number of possible routes if all are considered is therefore (4)(4)(4)(1)=64.
The saving of effort would be more impressive if the problem had include another stage consisting of four positions. The number of calculations by dynamic programming would have been the current number of 40 plus an additional 16 for a total of 56 examining all possible routes would require (64)(4)=256 calculations.