IBM Interview Question

Describe a program which can choose the shortest path among few paths between two points.