matala1 programming the shortest path from one point to another while taking into consideration "dead" paths