There are far more possible road routes between London and Istanbul than rail routes between A and B in the UK - any that are not in the RG can be ignored for a start.
You don't understand the differences between the two problems; I will try to explain a little.
A (weighted) shortest-path is easy to find - it's even easier for roads/rail as you have an approximate distance to the finish point.
e.g.
http://en.wikipedia.org/wiki/A*_search_algorithm
But, if you are dealing with roads then the length of travelling from A to B then B to C is the length of A to B + the length of B to C. It is also at least the (geographical) distance between A & C.
The first condition is not true with railway pricing, and the second cannot be meaningfully used.
This means that calculating a cheapest route is not easy (or polynomial-time computable), as you have to try all of the alternatives.
For a reasonably large map (like map AS) this quickly gets into numbers that are not really practical to deal with, even for a computer (assuming you are allowing as many splits as are required, and not just the one that you suggest).Obtain the possible split points using the actual stopping points of trains on permitted routes
Last edited: