Cortical Modeling
One application of dynamic programming is to define gyral and sulcal boundaries on the cortical surface. An analogy would be to track valleys and ridges in a topographic map of the Rocky Mountains. Here the ridges of the mountains correspond to the gyri of the cortex, and the valleys correspond to the sulci. Let's say we wanted to pour water into an area of the Rocky Mountains and model how it would flow from the point you poured and the point where you wanted the flow to end.
Water would then trace out a locus of points with minimal negative curvature i.e. along a valley. That locus could be determined by dynamic programming analysis ofr a topography map of the region. In the same way, sulci can be traced on the cortical surface. As for ridges and their cortical analogues in gyri, we consider locus of points with maximal positive curvature (by reversing the sign of curvature).
The black line drawn in the above topography map would be such an example of a locus of points with minimal negative curvature from A to B.