Post Reply 
Path-Finding in Subway Networks
04-08-2017, 07:23 AM
Post: #2
RE: Path-Finding in Subway Networks
I played around with this kind of thing building word graphs (change one letter to make the next word in the sequence, optionally rearranging the letters). My first thought is to use Djikstra's original algorithm which avoids the priority queue but runs in O(n2) time. I'd make links along a line cost 1 and a transfer cost 106 or similar -- this favours staying on a train over more transfers. The result will indicate the number of stations and the number of transfers and the path can be backtracked from the final station.

To downplay transfers, make everything cost one. In this case, the algorithm can be stopped once the destination is reached since no path can be shorter.

I went on to search for maximal diameters in the graphs.


Pauli
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Path-Finding in Subway Networks - Paul Dale - 04-08-2017 07:23 AM



User(s) browsing this thread: 1 Guest(s)