# Railway track layout - is there a method to say if track layout meets up

I'd 2 circles of original blue railway track, lost 1 inner, bought mixed batch of track off eBay, as more inner than outer bought more track & to get discount 12 outer & 4 inner to bring N° of outer & inner = at 1 pair short of 4 circles. So I set myself the challenge of using all in 1 layout with no dead ends. I'm emptying old caravan so room there. 63 curved, 14 straight pairs, 2 crossing & 2 points.

My question, is there a maths equation or computer program to say if track layout meets up? Instead of trial-&-error method. R10L4XS2R8S1PR1XS2R12PXR1L2XR7S3R4S1R1S1P were R=right, L=left, S=straight, X=crossing & P=points.

Noticed in Ideas book, 3/4 circle, then 2 other way then 1 straight, Then other end 1 same way, then 3 other to become touch & parallel to other to go to points.

• It would have been an idea to give some indication of where on the picture your textual description starts. I also think it's wrong, the short stretch between the two crosses are noted as "R1L2", but there are four pieces on the picture (as far as I can see, it becomes "R1L2S1" in your notation). Your textual description also misses a bit of the layout. But a train would get stuck on the last part of the description. Sep 28, 2022 at 21:12
• As railroad switches have three connections, a notation like yours is not really possible. Sep 28, 2022 at 21:16
• This might get a better theoretical response from MathematicsSE. They've got a bunch of train-related questions already, but I didn't see this one asked yet. math.stackexchange.com/search?q=train Sep 28, 2022 at 22:57
• @chicks Yes, this seems like a combinatorics style question. With a finite amount of rail pieces you can built X many valid routes. These problems can be quite complicated but it's easy to identify a few rules that must be followed such as using a minimum of 8 track pieces to form a loop. Straight pieces, switches and crossovers all add a lot of complexity.
– Ambo100
Oct 2, 2022 at 17:56
• Yes, I made an error, sorry. Jan 23 at 13:26