Since you haven't told us:


I'll assume time isn't an issue
I'll assume memory isn't an issue.
I'll assume the answer isn't programming language specific
I'll assume you are aiming to get from one station (1) to a destination station (100)



//Iterate through all possible paths to destination

//If you take more than 8 steps, stop and go back

//Note the total length of each path

//Select the shortest path



You're question is impossible difficult to answer, as such, my answer is rather impossible to understand. You will need to learn how to ask questions to get decent answers.

While you're at it, learn to accept answers

Dynamic Programming: find the minimal route with ten nodes from a set of 100 nodes
I was just watching an old Star Trek Voyager episode and Harry Kim said roughly "Captain, another super nova exploded just 0.36 lightyears away!". My question here is how something can happen 0.36 lightyears away and still be considered just.

I can accept that they travel faster than light, by using subspace; something I imagine as a fourth dimension in space. So they still are slower than light in four dimensional space, but appear to to travel faster than light in three dimensional space.

So, is there any reasonable explanation for this statement or is it simply bogus in the script?
