Solving Train Network Traps: Graph Theory Resources

  • Context: Undergrad 
  • Thread starter Thread starter Ibix
  • Start date Start date
  • Tags Tags
    Network
Click For Summary

Discussion Overview

The discussion revolves around the phenomenon of "traps" in train networks modeled as graphs, specifically focusing on the conditions under which these traps occur and the mathematical principles that govern them. Participants explore the implications of graph theory in understanding these traps and seek resources for further study.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes their experience with a wooden train set, noting that they often create "traps" in the track layout and questions whether this is a common occurrence or a personal oversight.
  • Another participant suggests representing the network as a mathematical graph but expresses uncertainty about how to maintain directionality within that representation.
  • A claim is made that if the number of points in the network is odd, there must be at least one trap, linking this to the properties of graph vertices and their degrees.
  • A participant counters that having an even number of nodes does not guarantee the absence of traps, providing an example of a configuration that results in traps despite having an even number of points.
  • It is proposed that a network has a trap if there exists a closed loop where all Y parts share the same orientation, and that larger areas of choice can exist without traps.
  • A representation of the network as a graph is suggested, but concerns about redundancy in the layout are raised, indicating a need for a potentially better representation.

Areas of Agreement / Disagreement

Participants express differing views on the conditions that lead to traps in train networks, with some asserting that odd numbers of points necessitate traps while others argue that even numbers can also result in traps. The discussion remains unresolved regarding the definitive conditions for traps.

Contextual Notes

Participants mention the complexity of enumerating possible network configurations and the potential for double counting in their assessments. There is also a noted uncertainty about the best way to represent directionality in graph models.

Ibix
Science Advisor
Insights Author
2025 Award
Messages
13,663
Reaction score
16,369
My son has a wooden train set. It has straight tracks, curves, and points. I've been [strike]playing with it[/strike]building tracks for him, and came across something odd. If I don't really think about it and just throw something together, it almost always seems to end up that there is a "trap" - a section of track that you cannot get back out of without backing up.

I am not sure of the correct terminology, so I describe a set of points as a Y with two "arms" and one "leg". Entering from the leg you can choose either arm; entering from either arm you must exit via the leg. For an example of a "trap", consider a set of points with one arm of the Y connected to some network, and the other arm connected to the leg. If you enter the points from the network, you are stuck on the loop unless you back up.

I have two questions:
1 - is my experience that networks with traps are more common representative, or am I a klutz?
2 - what do I need to read up on to understand what's going on?

I tried enumeration to answer (1), but the number of possible networks gets large fast. There are 2 with no sets of points (a straight line and a loop), 3 with one set of points (an open Y, a loop with a siding, and a return-to-sender), and I think I counted 17 with two sets of points (although I may have been double counting something - even a taxonomy for networks would be helpful!). My son's set has five sets of points...

I guess the answer to (2) is graph theory - are there any recommended resources? And is there a particular branch (see what I did there?) that I should be particularly looking at?
 
Mathematics news on Phys.org
You can represent your network as mathematical graph, but I am not sure about the best way to keep the "direction" information.

Apart from that, there is a simple concept without a trap: a figure-8 layout with two "Y" elements, and no attached trap.
 
If the number of points is odd, there has to be a trap.

Your network corresponds to a graph, the points to vertices with degree 3, and a trap to a vertex with degree 1. The other rails are the edges. Since sum of the degrees of all vertices of any graph is always even (see http://en.wikipedia.org/wiki/Handshaking_lemma), there has to be an even number of vertices of odd degree, so If there is an odd number of points, there has to be an odd number of traps as well.
 
Thank you both.

Willem: yes, but a even number of nodes is not sufficient to avoid traps. For example, take two sets of points and connect the leg to an arm on each, then connect up the free arms. This gives two loops connected by a line. Depending which way you set the train going, one or other loop is a trap.
 
A network has a trap if and only if there is a closed loop where all Y parts have the same orientation (relative to the loop).

Even without a trap, a network can have larger areas where you still have a choice, but cannot leave this area.

I found a possible representation of a network as graph (using lines as 2 nodes (one for each direction) and Y parts as vertices), but that has some redundancy in its layout, so there might be a better representation.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 33 ·
2
Replies
33
Views
3K
  • · Replies 25 ·
Replies
25
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
10
Views
2K