Subway travel route planning needs analysis

First, the task:

A process of calculating the shortest path can subway line command line program correctly entered.

Second, the objective function

1. All subway lines and the ability to preview the site in the form of pictures and text list.

2. recommend the shortest distance route based on departure station and terminal input.

Third, to achieve

Language: java, c, pthon

Input: file input, in the form of:

  Second line: the number of sites, site 1, site 2, site 3 ......

  One line: the number of sites, site 1, station 2, ...... station 3

Line storage format: matrix or list

Algorithm: The subway understood undirected graph, or using floyed dijkstra algorithm to select the shortest path

Output: Line 1 departure station (station 1 -> station 2 -> ......) transfer line 2 (Site 1 -> station 2 -> ......) terminal

 

Guess you like

Origin www.cnblogs.com/cwwaxx/p/11574517.html