## Project Euler 607

If you like solving Project Euler problems you should try Problem number 607. It’s not very hard, as it can be reduced to a small optimization problem. The idea is to find a path which minimizes time, knowing that certain regions correspond to different speeds. A precise statement of the result can be found on the official page. Here’s an image of the path which realizes the shortest time:

Advertisements

Categories: Optimization, Programming, Uncategorized
MATLAB, optimization, programming, project euler

Hello

Could you please give me a hint or any kind of advise on how to approach this?

Would have been easy if there were only two type of regions, but 6 different regions give 6

variables and i don’t think solving those giant partial differential equations is the way to go.

Thanks

There is no giant PDE involved. There are indeed six variables and you can find the partial derivatives of the time needed to go from A to B with respect to any of them. This is called the gradient of the function. Then you use any gradient descent algorithm to find the path which gives minimal time.