This puzzle is originally created by by Roger Penrose. The goal is to guide the train all the way to the station via the railways, without ever reversing or taking sharp turns. The train can only travel forwards. For instance, at the first crossing, where five tracks join, it can only take one of the three tracks that go north - it can not go back where it came from, or take the other southwards track.

Railroad maze

Which route does the train have to take?

Note: With sharp turns, I mean those turns that a train would not be able to make normally because there is no smooth curve to follow, or in other words: the path the train takes should be differentiable.

  • 1
    $\begingroup$ I found an endless loop D: $\endgroup$ – warspyking Mar 5 '15 at 1:18
  • $\begingroup$ There is no way out. $\endgroup$ – warspyking Mar 5 '15 at 1:22
  • $\begingroup$ Just map all the possibilities out from finish going backwards. There's no way... $\endgroup$ – warspyking Mar 5 '15 at 1:23
  • 1
    $\begingroup$ Can you define "sharp turns"? $\endgroup$ – jscs Mar 5 '15 at 1:45
  • 1
    $\begingroup$ @JoshCaswell Yes. $\endgroup$ – Joe Z. Mar 5 '15 at 2:04

The solution is:

shown on Wolfram. A discussion paper was written by Slavik and Wagon.


  • 1
    $\begingroup$ Good job! It is solvable by hand though, but it did take me a while... $\endgroup$ – EagleV_Attnam Mar 5 '15 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.