Hacker News new | past | comments | ask | show | jobs | submit login
Is this Duplo train track under too much tension? (puzzling.stackexchange.com)
1392 points by robin_reala on Sept 6, 2023 | hide | past | favorite | 237 comments



I have a duplo/lego question - is there a name for the combinatorics problem of how many structures can be built with N 1XM legos? I have spent a fair bit of time thinking about this problem and I'm unaware if it's been posed elsewhere.

Any piece able to freely rotate is considered the same structure. For example, for 2 1X2 legos the arrangement count is 2: top connected to bottom with both nubs, top connected to bottom with one nub because if you analyze legos you will find that such an arrangement can freely rotate over 270 degrees, and left vs right nubs result in the same structure when taking rotational symmetry into account.

For the problem I assume an 'ideal' lego with 0 manufacturing tolerance, no illegal building techniques are allowed.

Is there a name for the above combinatorics question? Is it well-posed?

Is there a closed-form solution? If not is there a generator program?

I should say that with a high enough N any generator would be very complex - imagine how degrees of rotational freedom give rise to the possibility of further structures hidden from other rotational orientations.


Look into the work of Søren Eilers

https://arxiv.org/abs/math/0504039

https://www.tandfonline.com/doi/abs/10.4169/amer.math.monthl...

(for the latter: use sci-hub)

Then there is also work for the 2D case by Tricia Muldoon Brown:

https://www.sciencedirect.com/science/article/pii/S0012365X1...

https://arxiv.org/abs/1608.01562

as well as by Alexander M. Haupt:

https://arxiv.org/abs/1810.10428


For questions like this one I like to check the: https://oeis.org/ Compute the first numbers in the sequence by hand and then see if they're already in the database.


I like to do the same kind of experimental mathematics:

1. Write a Python script to brute force the first values of the sequence.

2. Search oeis for that sequence.

3. If (2) fails, simplify the problem and repeat.

Sometimes you get a completely unexpected connection that you would never have come up with yourself just by thinking.


For your first question, I don't know for sure but we called these "counting problems" when I worked with lattice models in protein structure prediction. See https://en.wikipedia.org/wiki/Lattice_protein for context and we spent a lot of time eliminating solutions that were identical after rotation, and self-intersections (there's a suprising amount of exciting math associated with determining if a chain specified using local angles intersects with itself in absolute 3-space.


I'll be up front and admit I failed combinatorics once (by far my least-strong math), but I'd start researching in the chemical compound enumeration space.

It's a similar problem (restricted attachment points, 3d double-counting).

E.g. https://math.stackexchange.com/questions/237998/p%C3%B3lya-s...


I have no useful answer for you, but when you allow continuous rotations, doesn't it stop being combinatorics?


You've got it backwards: in this case, if a piece can rotate, all of its possible positions count as the same configuration. In other words, the problem is posed in such a way that we can ignore the fact that pieces can (sometimes) have the freedom to rotate.


It's that last paragraph that makes me wonder:

> imagine how degrees of rotational freedom give rise to the possibility of further structures hidden from other rotational orientations.

That sounds like a basically continuous question, not discrete. But maybe I misunderstood.


If we only allow the pieces to mate in the official manner, at right angles, then it’s still a combinatorics problem with an finite integer answer. There’s an extensive tradition of picking out discrete subfamilies out of continuous things and studying them with discrete tools—symmetries of polygons, tilings, regular polyhedra, crystalline lattices, etc., are all in that group (no pun intended).

On the other hand, just because your problem sounds discrete doesn’t mean that the continuous toolkit isn’t going to be useful for it, as the inordinate utility of generating functions[1] (closely related to Fourier transforms) shows. The other way around also works, with the theory of smooth symmetries (Lie groups) making good use of the discrete things I mentioned above.

It’s all a single field, as Bourbaki wanted to point out by ungrammatically naming their course Éléments de mathémathique (not -es). Even if they omitted some significant parts of that fields that they didn’t know properly or weren’t well-developed yet (e.g. logic counts as some of both).

[1] https://www2.math.upenn.edu/~wilf/DownldGF.html


I did a little python script some time ago to solve just problems like this. It is meant to be more educative than fast, though, and doesn't handle non-right angles (like pytaghorean triangles). It turns out that eliminating duplicates is a little tricky: https://github.com/filipezf/BrickEnumeration/blob/main/brick...


There is a display about the case of 6 1x4 bricks at Lego House in Billund.

It's beside a machine molding 1x4 bricks and packing 6 of them into a bag which you can take for free.


That's quite neat! For anyone else who's interested, I found a video of this online[1]

1: https://www.youtube.com/shorts/iKs_zr6_qMg


Huh. You can't rewind/fast-forward/seek these "shorts" videos. (Well, I can't, with my particular browser/os/county/screen-dimensions/etc combo.)


You could use this sort of stack of lego bricks to physically-encode low-entropy passwords.


I love this


My friend and I used to discuss a similar question: given a fixed set of curved Duplo tracks, how many different looped track layouts can you generate?

Straight sections are mostly ignorable since you can always add them in pairs on opposite sides of the loop if they are parallel. (although there are some interesting triangle-shapes that can be made that break that pattern)

My friend even went so far as to code up a solver for it which mostly worked and generated some interesting layouts. We never got around to adding switches into it.

It eventually led us to the math behind necklace problems because it was often hard to tell if 2 track layouts were identical: https://en.wikipedia.org/wiki/Necklace_problem


https://blog.jgc.org/2010/01/more-fun-with-toys-ikea-lillabo... looked into building different tracks with a single ikea train set.


Too bad the images seem to be gone?



Not only are the images gone, archive.org tells me "Sorry. This URL has been excluded from the Wayback Machine."


The idea that playing trains with the kids ended up this far down the rabbit hole is very funny.


There has to be an internet law somewhere that any fun hobby can be obsessively following into madness.

Relevant: https://m.youtube.com/watch?v=NTJQTc-TqpU


There is a fine line between a hobby and a mental illness.

I mention that to people more often than most would think.


I find that people prefer ‘fine line between hobby and insanity’. (I also use this line a lot and suspect its self-applicable)


This is what happens when two nerd-dads with the same age kids go out for drinks every week.


I don't know if Bluebrick supports duplo, but it's a track layout program for Lego track: https://mattzobricks.com/lego-track-planning/bluebrick


Yes, I've seen this as well! Thanks for the link.

As my kids got older, we upgraded to Lego system track and I was initially very disappointed in it. The math for Lego track is quite different and there is something very satisfying about the Duplo system.

The key difference is that switches in Duplo are equivalent to two oppositely curved tracks overlaid on each other. This means you can pop a switch in anywhere that there is a curve piece. In the Lego system track, it is a straight piece with a curve out and back in slightly. If you place two switches together you can connect two parallel tracks, but it has the disadvantage of being harder to place (you end up needing substantial straight sections to use switches)


There are a number of third party companies that are filling the missing links (literally) for Lego track geometry. It can be worth investing in - I’ve always been annoyed that the Lego switches are clearly for sidings and yards and not for loops.


There is indeed a Duplo package!


Hello hello! Licensed Mechanical Engineer here. Not to be pedantic, but the track wouldn't be in "tension". It would be in bending (a combination of tension and compression).

Happy to elaborate further if it is valuable to the discourse!


I read that as "binding", i.e. the joints between the pieces being under stress and transmitting force.


Sure, can you create a bending (momentum?) diagram for that course? :D


I found the linked site with an in-depth introduction to Duplo rails even more interesting:

https://www.cailliau.org/Alphabetical/L/Lego/Duplo/Train/Rai...

I owned both "new-type" and "old-type" (black) Duplo rails as a kid. I remember that even as a 4-year-old, I was annoyed with the old-type black rails and greatly preferred the new ones.


Is that from the link by user Weathervane? Any idea why the rest of their comment it total gibberish? “gjryir frpgvbaf qb abg znxr na rknpg pvepyr, gurer vf n fznyy bireync, naq fb znxr n pv” etc.?


That's rot13. We used to use it a lot in the good old days, mainly as a way of obscuring spoilers in usenet posts, but sometimes just for fun.

I bet I'm not the only person here who can read it – rather haltingly – without decoding it first.


Gunax lbh! V’z n lbhatre zvyyraavny, naq fgnegrq ba gur arg nsgre gur unlqnl bs Hfrarg. V’yy or hfvat guvf va gur shgher sbe fher.


I have a 5-year-old and we frequently assemble wooden BRIO train tracks in a variety of configurations. As he's building out track, I'm often a few steps behind him, silently reworking the track configuration so it's not over-constrained. It typically ends up being a fun, if not simple problem solving challenge that I get to spend time with kid my at.


tangential comment:

What I like about brio tracks is that they don't trash up the house like plastic tracks from other sets. They just look nice, feel good to the touch. The slow speed but high torque of the trains also feel like it gives "mass" (not sure how to phrase it) to the experience, unlike a lot of remote controlled toys, which go way too fast for their size but struggle with carpets, edges, ...


I played with them a lot as a kid, and I distinctly remember enjoying the sound the wheels made turning against the wood, as well as the tactile sensation of moving the train across it with my hand.

This makes me want to get a CNC machine and start spitting out train tracks! I already know when I retire in 30 years I'm gonna be one of those guys that has a train room.


My retired father did that: my kids got track extensions he made himself. His wood processing tools were much simpler than a CNC machine though.

However, it's quite easy to find second hand Brio tracks.


I do that too. My son and his friends love building big train circuits. I love that too, but I've got a bit more eye than them for where things are under tension, and I try to correct for it.


Brio tracks are nicely designed in that altho you can combine them in myriad ways (with switches etc.), in general one of the shorter lengths of straight track does properly satisfy any gap you get.

That is to say, in the overall system, only a _small_ integer number of different straight track lengths are required.

In comparison, TrackMaster requires many more.


I’m at the start of my brio journey. Haven’t picked up a set yet as we are immersed in magnatiles.

Curious if anyone has milled their own brio tracks. (Maybe to allow some unusual shapes not afforded by standard types)

I’ve made a single brio track compatible banana car but haven’t had a go at making any track yet.


Custom router bits do exist for the track groove profiles, which suggests that SOME folks are doing it. I've always wanted to create some custom pieces--my siblings and I growing up played with Brio far later than the expected ages, as we were all railway nerds, and frequently mis-used the degrees of freedom of track components for wildly more complicated layouts spanning rooms.

Nowadays one of my nephews ended up with lots of generic track (gifts from uncle: me) and some very specialized custom switches cast out of resin by his maternal grandfather. There are multiple ways to solve the problem!


Lidl and Ikea wooden tracks are pretty cheap and mostly compatible (you might have to file the joints a little, otherwise they can be hard to attach and detach).


Lidl & Ikea tracks give a feel of cheepnis. I haven't stopped to properly contemplate why it is so. Maybe some sanding of edges would help - Brio are much more pleasing to the touch.


Yes, Lidl and Ikea tracks have rough surfaces. Brio tracks feel more polished. Or maybe they are just made from high-quality wood.


If it’s just edges, routing existing track with a round over bit is nothing. Maybe not much of a challenge though.


A friend has 3D-printed custom duplo and lego tracks. Not sure if she's also done it for wooden railroads. I haven't but I could really use some track pieces to adjust between common length and width differences. We've got several pieces that have two sets of track next to each other, and they all have a different spacing between the two tracks. Very frustrating.


We’ve 3D printed a lot of special tracks. Crossovers and splits, bridges, etc. It was really fun, and my kid pretty much always incorporates all of them into whatever layout we’re working on.


i don't suppose you have designs posted somewhere ?


I suspect the mathematical analysis could be even simpler. Here's one idea:

View each track piece as a 2d vector. Add up the vectors. In a zero-tension setup, the sum is (0, 0).

As a metric for tension, assume any mismatch in position is evenly distributed. Model this as the average of all the vectors. (Thus the same displacement is more meaningful when we have fewer pieces.)

___

That's the full idea. It might seem that it is ignoring rotation, because it doesn't explicitly mention rotations, but they are included because the effective vector that a track piece provides is both a current direction as well as the displacement contributed by that piece. If we wrote some code to model this, a cursor would consist of a direction (an angle) along with an (x, y) position.

___

Some related math concepts:

* The exterior angles of a polygon sum to 360. So we could have another measure which is how far we are away from 360.

* Not useful in this case, but this also reminds me of winding numbers from complex analysis, which is a way to locally walk along a curve to understand which side is the "inside" or how many times a curve goes around a given point.


I don't have a quantitative argument, but my intuition is that it might still be possible to make a track that globally has no net tension, yet still has "local" tension somewhere. This might be done by creating a shape that slightly intersects itself, pushing that section into tension, while a complementary section sums to the negative of the first section but without self-intersection.


To expand on the angles of a polygon idea. It looks like each of these tracks has about a 30 degree bend. So you should have 360/30 = 12 more right-handed than left-handed tracks, or vice versa. It takes some counting, but you could probably get pretty quick at going around the track and adding or subtracting 1. If you end at 12, perfect. Your distance from 12 is an estimator for tension.


This is necessary but not sufficient for there to be no tension. For example, if you have 12 curved pieces, all curving in the same direction, and one straight piece, there will be tension.


How is that different from the solution on the page?


To give the answer credit, that answer does suggest adding the vectors (the same). It is also much more thorough than what I said, and I like the images. I like the answer and I was attempting to iterate.

I think these two things could be improved from that answer:

* I'm suggesting a general approach to measuring track tension, which is the average of the vectors. I didn't see that idea in the answer.

* I think the answer could be communicated a little more simply. For example, we don't need to think in terms of Q[sqrt(3)]; I see that as a distraction.


> For example, we don't need to think in terms of Q[sqrt(3)]; I see that as a distraction.

Except for replacing Q[sqrt(3)] by a suitable ring extension of Z, I see no possibiliy to simplify the argument. So what kind of simplification do you have in mind?


You're speaking as if floating point representations of numbers have zero utility. One approach here could be numerical. An algorithm could work with vectors represented as floating points. Another approach, which depends on the relative angles and lengths of track pieces, may be to encode each piece as an (angle, distance^2) pair. Many angles can give us an exact distance^2 values.


For starters, the "solution" here doesn't ensure that the ending piece meets the starting piece in the right direction. :p


Ok, a snarky way to phrase things, but it's a good point - in general the vectors could add to zero and the angles may not align. So perhaps a better expression may be

a metric for tension = [ norm(sum(piece_vectors)) + abs(angle_displacement) ] / n

where

angle_displacement = sum(angles) - 360

and the angles are signed accordingly.


Counterexample: a dozen (+1, 0) tiles followed by a dozen (-1, 0) tiles. Vector sum is fine, total angle is fine, but at each end you have an impossible 180 deg connection. I don’t think you can get away from local measures of tension with a global look.


I love the other .stackexchange forums. These types of questions and the answers they engender are great. I've seen some great discussions on aviation, ux, and math over the years. Long detailed answers with cool insights. A few hours ago, there was another HN post from the latin one.

But (for me), the same is no longer true for stackoverflow. I used to participate on it both as an asker and an answerer. But something happened. It felt like it was a takeover by ever pedantic moderators. Now I participate there only rarely.


My understanding is that the weak point in danger is the neck of a joint pin on either of the connected tracks. With duplo both links have a key pin and a hole.

So when under severe misalignment, one side of the key would be pushed with extra lateral pressure and may deform or break.

However, this sort of severe tension is likely to be in effect while attempting to link/lock the last joint. It's likely to be done by the child when the parent is not there to supervise the feasibility of such forced link. The parent will be alerted when it's either too late or when it succeeded and there's no need to fix it.

Thus, if it were to snap a key neck, then it's just meant to be... No drama. The second key is still there to maintain the joint. Though caution, if no lesson is drawn, such section would become even weaker link!

If it somehow coerced into a loop, then Yay! here comes the locomo. If the train cars don't tip over the forced link gaps or warped sections, then the ride goes on. Otherwise, a tuneup/rebuild is due.


As a kid I would trace around the track. Starting with zero, I would add one if the track bent left and subtract one if it bent right. The answer needed to be +/- 12, 24, etc. because 12 make a circle.


Can someone please ELI5 why this is true?


A full circle is 360° and a curved piece makes a turn of 30°, so you need 360° / 30° = 12 pieces turning in the same direction to make a full circle.

Every time you use a piece turning the other way, you need to add an extra piece turning the way you want to complete the circle, so the difference between the directions has to be 12.

Note, however, that not every track with exactly 12 more pieces turning one way than the other necessarily makes a complete circle, straight pieces can cause the ends not to match up.


Can't you just check the tension by breaking the loop and seeing the offset between the start and end pieces (considering surface friction is low enough for pieces to move)?

That would be my puzzle solution to:

1. Assign each piece type it's end offset and next piece connection angle

2. Start at 0,0 coordinate and iterate through pieces, advancing last piece position

3. Check the offset between the start and end pieces

And the result would look like images in the answer.

Updating the track to minimize offset is harder, though.


> considering surface friction is low enough for pieces to move

Our experience - which include track layouts that occupy a good proportion of the ground floor of our house, a la Wallace and Gromit's The Wrong Trousers Train Chase - is that if you open a section under tension, wiggle the entire track back and forth a bit, even on a solid wood floor it tends to settle into a "more relaxed" state, at which point you can adjust the relevant pieces to close the (often larger) gap...


With a track that size, I don't think surface friction will be low enough for the whole thing to realign itself. The ends of the track near the break will pull apart if there's tension but I can't imagine the whole thing moving.


> I don't think surface friction will be low enough for the whole thing to realign itself.

Then there's not enough tension to break any pieces either.


Yes, as the question states, you could.

> I know I could just take one piece out, and put it back in to feel it myself


> surface friction

Assemble it on the air hockey table?

Assemble it on a smooth, flat floor and sprinkle some shuffleboard powder?


Danny Calegari posted a very interesting mathematical analysis of a similar question (but only considering curved pieces) to his blog in 2011:

https://lamington.wordpress.com/2011/12/02/laying-train-trac...


I'm ashamed to admit I often wonder about this when playingˆHˆHˆHˆHˆHˆHˆH my daughter plays with myˆHˆH her Duplo train.

Except for the simplest of tracks, I often wonder if the misalignment of a complex track is not stressing the pieces. Of course, instead of asking in stackexchange I dismiss the thought and just play -- er, my daughter plays -- with the train.


What material are the pieces made out of? Wooden pieces (when properly dried) have a much larger ratio of elastic range to plastic range, which is probably desirable for toys (as you/your daughter would need lots of leverage to be able break the pieces and could effectively never bend them).


Lego Duplo is the same plastic as regular Lego, I think.


> same plastic as regular Lego

I just had my mind blown by this a few days ago, you're one of today's 10,000: https://bricknerd.com/home/every-type-of-plastic-used-by-leg...


That's way more types of plastic than I expected. Still, most regular lego and duplo is indeed the same: ABS. But I didn't expect they'd have several different types of plastic just for different technic pieces.


Amazing! So there's no such thing as "the plastic used by regular Lego".

I am indeed one of today's lucky 10,000! I wonder which plastic Duplo uses... looks like ABS to me, but I wouldn't know.


That's pretty strong and hard then; I don't think I've ever had a Lego piece deform on me, let alone break.


Yes, I don't think they'll break either. I'm not exerting a strong force either.

It just makes me wonder whether the layout is "perfect" or there is some unwanted deviation from the "ideal" layout that is causing stress on the pieces. You know, how you can sort of force the pieces in a puzzle to fit together, but you know they are not meant to go that way? If you look at the top voted answer in the link, you'll notice someone does some maths and tells the asker "you have to add pieces here and here in order to reduce stress and be closer to the ideal shape".

I find it hard to explain in words, but hopefully you'll understand what I mean.

(Of course, this is not something I really worry about. It just makes me wonder.)


I'm also interested in knowing what the set of all possible layouts with zero stress are for a given bag of pieces. It feels like it might be an easier question to answer than what the article answers: trying to approximate, below a boundary of acceptable stress, a pre-existing shape with only certain pieces.

I think I would construct a tree of combinations of pieces, where each node of the tree was weighted with a vector of three elements: the X and Y position of the end of the piece relative to the start, and the angle of the track's direction at the end of the piece. Each subsequent piece added to the track (represented by a new layer of depth of the tree) would sum the previous weight vector. At any point in the tree where the vector sums to zero, you know you've completed a full loop and so terminate that branch of the tree there. After searching through the full factorial of the number of pieces you have, you can select all the zero-weight nodes to get the possible layouts. It seems as if the article uses abstract 'it turns left' and 'it turns right' pieces, rather than arbitrary sizes and angles, and doesn't use any tree-based brute-forcing to find possible answers.


> I'm ashamed to admit I often wonder about this when playingˆHˆHˆHˆHˆHˆHˆH my daughter plays with myˆHˆH her Duplo train.

nice insider joke :)

https://en.m.wikipedia.org/wiki/ASCII_control_characters


^H used to be a common idiom back in the usenet news days


It’s from the original borne / korn shell in Unix. Ctrl H was backspace, but the pc keyboards would send a different control character. you often had to map the backspace on the pc keyboard to make it work properly. Set -o or something like that.


And then it got even worse when you mixed in X Windows. "Delete" or something.


Indeed, I liked that as well


Thanks for explaining it.


Get some Plarail tracks and trains for yourself if you can. They come with realistic (mostly Japanese) trains and tons of various accesories.

https://www.takaratomy.co.jp/english/products/plarail/what/

https://www.youtube.com/results?search_query=plarail


Those are nice! I like the shinkansen trains. Unfortunately I cannot get these in my country for a reasonable price, but thanks for the recommendation!


No one knows the amount of thought I put into this same problem when building train tracks for my son but I had no idea how to solve the problem.


>> No one knows the amount of thought I put into this same problem when building train tracks for my son but I had no idea how to solve the problem.

One piece of flex track bent and cut to length.



Unhook one piece, remove all the tension, and see how far the two ends you just created end up from each other. Not very scientific, but it works very well.


Serious question: is it even under actual "tension" at all?

Don't the track pieces fit together loosely?

And aren't most Lego/Duplo pieces made of such hard and rigid plastic that they don't effectively bend at all?

So while it's still an interesting math problem about angles and lengths, I'm not sure the premise of "tension" is correct here.


I highly recommend anyone interested in the question of whether Legos can bend to watch some videos from this channel: https://youtu.be/lp7cFcnJCH4?si=eYMf8rcTpv_2DD-B

Some amazing "illegal" Lego creations there.


Amazing creations!

But the sound of those bending Lego bricks made my teeth hurt, I had to mute the video. :-|


They certainly do bend. You can stack Lego pieces into a circle, like https://www.instructables.com/Lego-Circle/ . I've done the same with (enough) Duplo.


The proper term is stress? Since there is also compression.

My 3yo son usually ends up with really "tense" tracks if he manages to build a circle. The lever torque of the track length makes them bend a tiny bit, so there should be tension in the outer rail. The fittings are quite close fits.


FWIW you can get duplo track under enough tension that the tracks no longer have loose give and you can lift it up the entire track without it coming apart. It requires a bit of work to make a track like the one in OP


Try Märklin C track. They are rigid plastic and made with ruthless German precision.


One half of the duplo can be in tension and the other half in compression.


Stress if you’re looking for more precise language.


My favorite part about this thread is not the first, very thorough, very mathematical and accurate answer, but the answer below it that has 0 upvotes but is by far the most practical:

"I would first check for track flatness"

This thread is a great example of how engineering is often NOT a solution to problems, classic "hammer and nail" territory here. And how engineers often ofterthink things unnecessarily ;)


I don't think it would work in practice. Duplo tracks are thick and bendy enough that they would stay in place and hold the tension. Maybe some excessive misalignment would cause the track to be lifted, but the idea was to detect that at an earlier stage, as indicated in the original question ("I know I could just take one piece out, and put it back in to feel it myself").


> enough that they would stay in place and hold the tension

Then, what’s the issue? “Too much tension” is the question. A reasonable definition of “too much” is possible damage or that it affects performance.

Having experience with these, if it’s sitting on the ground flat, and it’s not being help there, then it’s about an order of magnitude away from “too much”, for damage.

“No tension” is a different question.


The issue would be that you wouldn't have a nice problem to think about on the puzzle stack exchange. :)


Assembling and disassembling a track under tension requires more force, it is easier to break it.


I'm sorry, but you must not be familiar with Duplo tracks. This is an over engineered child's toy, specifically designed with knowledge that they will be abused.

Again, if it's flat on the ground, it's far from the point where something breaking is a concern.


> Again, if it's flat on the ground, it's far from the point where something breaking is a concern.

Far from a concern, as long as it’s stationary.


Well, it's Puzzling SE, so I guess people are more likely to give (and upvote) theory-heavy answers. The "unloved" practical answer would probably be more popular on Home Improvement SE. But SE sites also tend to reward elaborate answers, even if they're not 100% correct. For instance, the accepted answer on this Aviation SE question https://aviation.stackexchange.com/questions/94879/why-does-... is not really correct, while my (very convincing, even if I say so myself) answer only got 2 upvotes - Ok, the fact that I posted it 2 weeks after the other answer also might have something to do with it...


> very mathematical and accurate answer

I'm afraid it is not accurate at all because it is not answering the question as asked. It verifies that the track is under tension, but it doesn't attempt to answer if that tension is "too much". Which is what the question asks.


The OP, though, didn't mean "too much" as in "out of tolerance", but rather "too much" as in "has progressed from stress to strain and therefore is decreasing the useful lifetime of the parts."


OK, great. So can you explain how the mathematical answer is a solution to your interpretation?

Spoiler alert: it didn't. Nowhere does the mathematical answer address the question of "too much".

And what do you mean by "progressed from stress to strain?" Stress doesn't turn into strain, they exist simultaneously. You're probably trying to say progressed from elastic deformation to plastic deformation.


> It verifies that the track is under tension, but it doesn't attempt to answer if that tension is "too much". Which is what the question asks.

I think you (and many others in this thread) are confused because you read the title but not the body of the OP. Quoted:

> 1. Is there any way to quickly see if there is any tension, and why? (I know I could just take one piece out, and put it back in to feel it myself, but I am looking for a more logical way, so I am able to reason it.)

> 2. Suppose I want to update the track in the picture to have less tension. If you have to take away exactly 1 rail piece (straight or curved), which one is the best, and why? If you have to add exactly 1 rail piece (straight or curved), what is the optimal place to insert one?

The accepted answer attempts to address these questions.


Except in my experience as the father of a 2 year old it is not correct. The tracks don't really buckle upwards appreciably.


I also have a 2 year old here with these (imagine my surprise to see this on HN), and I've troubleshooted more than one track creation. I can confirm the findings of the above poster. They don't buckle upwards much. There's some margin for error in the connectors that allows for the tracks to pivot some. A degree or two off and you can still get the connector to fit, but you'll feel the tension in the track as one side is fitting much more tightly than the other due to the bend. So introducing another track segment somewhere in the loop (the link goes into the math behind this, but a little observation and intuition will also yield the correct result) will ease the pressure. In my experience this is almost always caused by trying to close the loop a little too tightly.

Edit: Re-reading the rest of the "look for track flatness" comment; the second and third sentences about tolerances and bowed joints are spot on. For example, looking at the final track layout for the "mathematical" approach, I can tell you that I'd have no problem shifting that track down an inch and snapping it in place.


Duplo's were the go-to toy in my house for years. The larger size makes it much easier to find pieces in "the big box of Lego" than standard Lego's. Duplo and Lego, in general, have amazing longevity — they were the best toy investment we made over the years. :-).

As an aside, these articles are the gems that keep me coming back to HN.


I'm really curious now. I haven't had 2 year olds for a while. Can you try this and see? Surely there is at least enough warping that you'll see a 1mm rise?


The engineering approach determines that there will be stress and proposes a mitigation. That's a win for engineering in my book.


In the real world there are tolerances, so at my job I rarely have to get the correct answer which can be really hard, I just have to get close to the correct answer which can still be hard, but compared to actually solving the problem, it's a lot easier.

Now because I work in a textile mill, the tolerance I usually get is 0.125 inches which is huge. I usually go all the way down to 0.0001 inches because I think it's funny, and also I do have aspirations beyond just working with textiles.


The comment reminds of a story I heard as a kid where some famous eexperimental physicist wanted to test a new theoretical member of his lab by giving him an extremely complicated shape and asked him to determine the volume.

Several days and derivations later, the theorist reports the volume, after which the experimentalist tosses the shape into a volumetric flask and determines the volume by looking at the difference in flask volume levels. (I am unable to track this story down to its original)


Surely in the original the physicist was Archimedes of Syracuse?


The funny part is checking for flatness is also a mathematical answer. Twisting into 3D is how ideal track pieces would resolve an incorrect configuration.


My second favorite part is that it got me to install bsdgames on my laptop so I could decode the rot13 quote.


Gee, based on these comments you'd think some of these HNers have never read a math word-problem. Or did you all think that guy really did need 98 oranges?


Yeah, a perfect thread to demonstrate the lower than average social literacy of HN users. It makes this community come off as a bunch of fun haters. This kind of fun low stakes “engineering problem” is exactly the type of thing that should be shared here, but everyone’s a critic I guess.


Not sure what the two of you are complaining about. It's really just this sub-thread that's all complaining. Everybody else is sharing fun stuff.


When I originally commented a high number of the posts were taking OPs question very literally.

You can scroll to the bottom of the comments to see a few of them.


Yeah getting a similar feeling. Lots of moral grandstanding about it too. HNers can’t see a fun thing without finding a way that it’s “problematic” or “misleading”


Put another way, they played trains with the kids, then argued about layout options with some other adult after bedtime, and came up with some novel solutions which were tested with the kids next day.

However if I’m any guide, a basic game ends up with me fighting a broken soldering iron or a bug in some language I don’t understand while the kid asks if we are there yet.


> Or did you all think that guy really did need 98 oranges?

What is this in reference to?


Introductory math word problems often involve unrealistic quantities of things. "Alice had 100 oranges and Bob took two. How many does Alice have?" That sort of thing.


This reminds me of a problem on Project Euler [1] with a different turn angle. In the problem you can go through the same path several times though.

[1] https://projecteuler.net/problem=208


This is a great discussion because...

Märklin C-track is sectional too, but has rather tight tolerances for assembly. There is no flex C-track. A computational method for solving parts lists and connection plans would be fantastic.

Currently people do it "by hand (virtually)" with a variety of apps, but that is labor-intensive.

Where is the combinatorial algebra?


A great way to introduce young kids to Young's modulus.


Young’s modulus is the linear relationship between stress and strain in the elastic region, which does not exist for plastic parts (since the relationship is nonlinear and it’s mostly nonelastic aka plastic).


Plastic parts most certainly do have both an elastic region and a Young's modulus. Young's modulus is the slope of the curve during elastic deformation (the form of deformation where the part returns to its original shape after the force is removed) and is a measure of a material's inherent stiffness. All solids have a Young's modulus. Take a piece of plastic and bend it a little, then let go. It is elastic. Plastic deformation is the state passed the yielding where the part will not return to its original shape. Plastic the material and plastic the form of deformation are independently named from the greek plastikos: able to be shaped or molded.


There are undoubtedly elastic regions of plastic material but there are very few plastics with a linear relationship of stress strain (aka Young’s modulus). This is why for most FEA, the stress strain ratio is a lookup table rather a constant for plastic material. In addition, some plastic exhibit a non-Newtonian property. Long story short , Young’s modulus is not applicable for plastic parts. Also, it is not true all solids must have a one.


You have absolutely no idea what you are talking about.

The elastic region (there can only be one) is the range where a material has a linear relationship of tensile stress and strain. Every plastic and every solid has such a region, it is part of the definition of a solid. Again, the Young's modulus is just the slope of the curve at zero, it is mathematically impossible not to have one. All but the most brittle of materials have non linear stress strain relationships, and for FEA all materials use a look up table instead of using a constant value, because that's the point of FEA. Non-newtonian behavior is completely unrelated, instead dealing with a material's stress and time relationship, and again is not exclusive to plastics.

Again, the terms plastic as in deformation and plastic as in the material are an etymological coincidence and don't have anything to do with one another.


Check data sheets for any 3d printing filament, Young’s modulus is the main characteristic in them and that's how you can reason about filament abilities.

For example, https://cdn.shopifycdn.net/s/files/1/0584/7236/6216/files/Ba...


Simpsons aside: I wish this was titled "Is there a chance the track could bend?".


Not on your life, my hacker friend.


Does Duplo have the same level of quality control as Lego? Like I can go and buy 10,000 1 x 1 Lego pieces and be sure they'll all be exactly the same within about 10 micrometers. Are Duplo bricks also as insanely QC'd as Lego?


I am assuming they do. Duplo is a type of lego that are meant for younger audiences and thus have large brick sizes.

https://en.wikipedia.org/wiki/Lego_Duplo


The quality is very good, and I don’t know similar plastic toys for toddlers with the same quality.

I have a lot of Duplo, some are new, some are 20 years old and went through a few toddlers. I can feel difference in tightness. The new ones are much better. Maybe Lego did improve the quality of the Duplo overtime, or they are simply less used.

In my case, I also find the old transparent bricks to not hold so well. They don’t handle much load before detaching.


I would hope so. Imagine only focusing on making really good plastic bricks for 53 years. There have probably been a lot of technological advancements over time that have let them make more bricks more precisely.


I would suspect that yes, considering they're meant to be compatible with regular Lego pieces:

https://bricks.stackexchange.com/questions/38/are-duplo-bloc...


Yes because they're made by the same company in the same way. You can even fit them onto a Lego System plate.


Not just plate. LEGO builders use DUPLO bricks under as basic for building big landscapes, mountains.


I haven't handled a piece in decades but I remember thinking that they were.

Interestingly you can build things that incorporate Primo, Duplo and regular Lego bricks!


DUPLO is LEGO.

Same manufacturing quality. Or even stronger design and QA checks as it is expected that toddlers will play with them.


It sounds like this problem may be simpler with Brios than Duplos as Brios only require 2 curves to turn 90 degrees vs 3 for Duplos, but.. my solution to this has always been to use the grain of the wood floor as a guide (which they have in this picture, but aren’t aligned with) - start your track aligned with a floorboard, and then every set of 2 (Brio) or 3 curves, check that you are either parallel or perpendicular to the grain.


Something very similar was my first programming project in college! The easiest method that most of us did was to brute force it and see if the ends were in the same location and angled correctly. Apparently there was a O(n) method that uses discrete mathematics but I didn’t really understand it at the time. It really is a great puzzle to solve.


Surely following the path of the track (to see if the ends were in the same location and angled correctly, as you describe) is O(n)?


Probably should have clarified, the goal of the project was to generate a valid track


Not my first project, but an assignment in the first year. It was about minimizing coin change. I had a solution very different from the others, and the teacher wrote something along the lines of "I suppose that'll work too" on my solution. Can't remember what I came up with, though.


Calculate smallest coinage (in terms of value of each coin) amount and progressively replacing them with the next higher amount? 2x1 cent -> 1x 2 cents, 2x2 cents +1x1 cent -> 1x5 cent and so on, maybe?


When creating a layout use of symmetry makes it easy to ensure the track will line up and fit in a zero-tension closed loop of whatever shape. So if you add a piece to the track with an initial direction, add the same piece to any point that is a net half turn, i.e. 180 degrees in the other direction.


https://lamington.wordpress.com/2011/12/02/laying-train-trac... is a blog post from the geometer Danny Calegari about this topic.


My 3yo can sit endlessly, trying to transform a pile of track pieces into a pleasing layout. Try something, retry something, eyeball it, bend it, take it apart and try again.

Does this indicate any sort of predilection for math or for engineering ? Or is it just a usual sort of kid behavior ?


Not sure if duplo has it but regular sized lego has a type of track that is flexible and very good at relieve the track coupling tension. This is available from lego as generic bricks lego and are good enough and much cheaper.


The "answer" (which is rather good) doesn't answer the question about "too much" tension. It explains how to work out whether tension would be expected, and proposes ways to eliminate tension.


Since we are discussing Lego strength here, this seems new and relevant to post: https://www.youtube.com/watch?v=l10hJxV4SGo


My first thought was summing the angles (each curve piece adds or subtracts 7deg of angle or whatever the actual angle is).

However the question is false in its initial assumption, i think: if theres too much tension anywhere in the string that joint will separate. These pieces are designed to do that.

Perhaps a better way of stating it would've involved the gaps between sections where there might be too much space and lead to derailment.


In the stackexchange thread they say that 12 pieces makes a circle, so each one is 30 degrees, but they also say that you can fit 13 pieces in a "circle", which means that each piece has 30-360/13=2.30 degrees tolerance.

The maximum gap should then be in theory be around 2-3 mm, if this drawing is accurate:

https://www.eurobricks.com/forum/index.php?/forums/topic/193...

https://i.servimg.com/u/f13/17/36/35/47/geom110.jpg

But in practice due to the interlocking design, see here:

https://www.onemetre.net/OtherTopics/Duplo/Track%20dims/Dupl...

there won't be any added gap (besides the ones due to the tolerance in the interlock), the pieces will deform along their length making no gaps capable of derailing at the juctions.


Does the answer to this question also depend on the order in which the pieces are laid out? I suspect yes.


We have an incomplete toot toot garage track set. Over stressing the parts is the only path to greatness.


Reminds me a lot of turning numbers.


How long until multi-modal LLM can solve this question to the level of top answer?


I have the suspicion that this could be a future Advent of Code Puzzle.


Use 1950's logic: Until it puts an eye out, it's fine.


There is a chance for humanity after all!


No - it's Duplo and designed to be abused. It's not going to suddenly explode into shards of plastic in the middle of the night.

Probably need to define "too much tension". Is a bit of tension that enables you to build the thing you want and couldn't otherwise, a good or a bad thing? (e.g. maybe I want a spiral)

I'd have thought if overly tensioned, once tolerances were overcome, the track would develop a camber. Maybe build on a perfectly flat, frictionless surface and then if your track isn't perfectly level you know there's tension.


It's a math problem. Read TFA.


It’s an engineering program masquerading as a math problem. Long enough racks can have misalignment without noticeable issues because each segment has some play.


No. It's the other way around. If someone did FEA on the track and showed you a stress map, it would be obvious how uninteresting framing it as an engineering problem is.


The question opens with a question about the material properties of a physical object and many of the replies address that.

As a pure math problem it’s got a few constraints such as the track not physically intersecting with itself which go beyond the stated question.

So yes it’s a toy problem, but one constrained by real world objects.


Yeah, that's human interest to get you interested in the problem and how it occurred to the author. Do you think the trolley problem is about trolley cars on rails with switches?


The most upvoted response was objectively wrong due to real world constraints.

The real world is irrelevant in the trolly problem or the 4 color theorem etc.

You may personally be interested in it as a purely mathematical problem, but he’s looking for a real world answer so poor abstractions are useless. On the other hand “I would first check for track flatness. When locked in with extra effort, the loop will warp a little, basically going into 3d instead of flat 2d.” is a useful shortcut.


> he’s looking for a real world answer

Based on his history in StackExchange, it is unlikely Lezzup is looking for a real world answer. The top tags of his posts are: mathematics, sudoku, geometry, logical-deduction, sequence, and enigmatic-puzzle.

https://puzzling.stackexchange.com/users/84683/lezzup


“I am sure this could be calculated mathematically, but I prefer a more quick, practical way.”


As it seems that English is not his first language, and that quote you offered appears to contradict "I know I could just take one piece out, and put it back in to feel it myself, but I am looking for a more logical way, so I am able to reason it", and based on the provenance of his other postings, these appeals to contort the question into some kind of uninteresting material science one are not credible.


There’s no contradiction to “logical methods” including things like noticing the pieces curve into 3D space because they don’t fit together. Saying you don’t want to rely on taking it apart doesn’t invalidate simple inspection.

The fastest solution is going to be a combination of heuristics and multiple forms of mathematical modeling. Something like 1 does it look reasonable, 2 do the internal angles add up correctly, then 3 a more precise assessment based on actual curves and piece lengths. Doing 3 when it already failed 2 is redundant.


It's a real world problem, but one constrained by toy objects.


I’d argue is a chemistry problem, or maybe material science, as the type of plastic dictates the stress tolerance.


engineering takes into account material properties. the engineering solution is "no, that tension is way inside the design tolerances"

the stack overflow answers are math.


The top rated answer was math, but it ignored the possibility that a section of track would be under tension to avoid intersecting with itself. For a mathematical curve that’s no issue, but physical objects add additional constraints to the problem.


and I quote "I am sure this could be calculated mathematically, but I prefer a more quick, practical way."


TFA: "I am sure this could be solved mathematically, but I prefer something quick and practical."


"Too much tension" is not a math problem. It's an engineering problem (and a poorly defined one, at that).

Try thinking for a few seconds before posting such a meritless dismissal.


goldcd> It's not going to suddenly explode into shards of plastic in the middle of the night.

That gives you the impression that goldcd fully comprehended the scope of the inquiry?


Look through a polarized filter to spot places under stress? At least that might work if it was plastic.


I haven't seen anyone else say that the easiest way in practice is simply to jiggle the track. In a correct duplo track every piece will be loose and easily move a few millimeters when jiggled. If any pieces are snug then the track is under tension. No need to remove a piece.

I suppose if the track is big enough then you would be able to insert a "wrong" piece without necessarily using up all the slack, so the pieces would still be somewhat loose. But in that case there would be no mechanical concern to worry about.

Actually I suspect that it suffices to check one piece. If any piece is in tension then they all will be, assuming friction with the floor is not too large. Unless you have intersections in the track, then you have to check each loop separately, or maybe you could just check the switch pieces. Might be an interesting math problem there to minimize the number of pieces to check in complex tracks.

I'll also point out that bending Lego pieces isn't always bad: https://youtube.com/@BrickBending


The original asker of the question actually proposed that already.

> I know I could just take one piece out, and put it back in to feel it myself, but I am looking for a more logical way

Since that's the "puzzling" stack exchange, I think they were looking at this more as a logic problem than a real practical problem they needed to solve.


Right, that's why I'm not posting this as an answer to the stack exchange question. Though I'm pointing out that it's not necessary to remove any pieces, and also suggesting that there may be an interesting math problem still there in this case.


I guess the obvious question is "given x amount of slack per piece, after how many pieces can I fit in on piece the wrong way without tension", but that feels more like an engineering problem than a math puzzle.


then what would an engineer use to solve the problem?


In this case not-so-brute force of fitting actual pieces, since it won't take that many. And otherwise estimates based on highly simplified approximations.


   I am sure this could be calculated mathematically, but I prefer a more quick, practical way.
Jiggling is way more practical than having to do many additions against a lookup table.


Yes, but he refines what he meant with practical, physical approach is out, don't touch ;)


As always, ChatGPT seems to be the answer. Quick, practical, and possibly even correct.


> However, as a father, I also don't want broken duplo pieces, so I wanted to make sure the track is not too much under tension.

The asker severely underestimates the amount of force it takes to break a Duplo piece.


I can confirm that even a 1-by-1 Lego brick can withstand the full weight of an adult human male at 2 in the morning.

...my foot on the other-hand...


Your logic is off, smaller pieces are generally harder to break than larger ones


Yup, the 2x2 can hold 950lbs: https://news.ycombinator.com/item?id=4870283

We can also observe this (to a lesser degree) when they build two story Lego statues like at the Mall of America.

I'll admit I've never seen a huge Duplo statue, but I assume the load limits are similar.


Does lego piece strength vary throughout the day?


If we're getting technical, the weight of a human does vary throughout the day. Generally, while asleep, your mass decreases. You're always gradually losing mass as you inhale O2 and exhale CO2. You're also losing mass as you exhale moisture, and you may also sweat.

Thus an adult human male (who sleeps, say, 10pm to 6am) is less likely to break a lego brick at 2am than at midnight and more likely than at 4am.


When I weigh myself, I make sure to do it in the morning. Too depressing otherwise.


"We can say there is at least one cow in Scotland, of which at least one side appears to be brown."

https://stepinmath.wordpress.com/2016/08/27/logic-with-the-c...


Strength I don't know. Pointiness does for sure.


Perhaps. Plastic structural rigidity varies with twmperature. Temperatures fluctuate throughout the day. This natural variation is probably insignificant in most cases though.


It was a joke about stepping on one of my kids' legos in the middle of the night while half asleep.


I managed to bend a Duplo track as a schild, the puzzle piece connecting them specifically.

A quick but incomplete algo is to ensure an even number of curves and straights. With them even, a bent track needs to be very bent so as to be immediately obvious.


In the picture in the story, the light gray pieces seem like Duplo ones and dark is the "duple compatible" from amazon.


Not really, I have similar or actually probably same sets (and same 'topics' to think about with various bridges and tunnels, track splits etc). I also have these straight or curved stuff in light and darker gray. Cheap non-original stuff is easy to spot - it simply doesn't fit nor hold as well. It doesn't matter whether its bricks or different stuff.

Due to economy of scales, Lego can manufacture those at consistently high quality and relatively reasonable prices. Competition aiming for same quality would be at least similarly priced. Also, its incredibly sturdy. So far I haven't seen a single one crack or break in past 2 years. My kids are not psychos but they for sure have no idea yet about treating their toys with care.


I prefer the parenting advice in the comments:

> Not really an answer to the question as posted — but I think the premise needs some good parenting advice: let your kids break bricks. They are pretty darn durable anyway and fabulously cheap to replace. So when they break one they will begin to learn about over-stressing materials through their own experiences


The premise was obviously not serious. This seems like concern trolling


Exactly. I’d much more prefer to explore the opposite direction: figuring out how much you can hack the rules of the game. That fosters creativity while the other fosters bluntly following rules.


Are the kids having fun? Does the train slide around the track easily enough?

Duplo, while expensive, is a consumable, if you look at it through this old man's eyes.

Now that that's out of the way, I love all the answers here.


That’s the joke. He’s taking something obviously not important and turning it into a puzzle pedantically. If it were an important thing like a train bridge it would be less interesting


This track transports hundreds of Duplo citizens and various other toys daily. Damaged parts will not be able to be replaced until next birthday or Christmas, leading to significant delays. Furthermore, if the train were to snap mid play session, a citizen could be flung into the wall leading to loss of limb, which are not easily fixable like Lego minifigures. The train track is a critical part of playroom infrastructure and thus affords extra scrutiny.


Who’s engineer that signed off on a track design that was under too much tension? They need to be reprimanded immediately!


Reprimanded is software "engineer" thinking. A P.E. who signed off on that could go to jail.


Why don't you have n+2 track?


This is what I love about the whole discussion. In some sense this is so utterly trivial, but I imagine the kids would be pretty upset if they broke a piece of the Duplo too. And I love that we've all absolutely nerded out on it, and gone in a dozen different directions with the discussion. It's just fun and, what makes it even more entertaining, is that so many people have engaged with it - as I write this it's literally at the top of the front page, where it's already been for at least a couple of hours, and closing in on 600 points. It's a great and positive conversation, and it's certainly added a bit of happiness to my day - I suspect lots of other peoples' too.


It would still be interesting as a train bridge, just for different reasons. The reason bridge you know that lives and material are on the line. For the child's train set you realize that there are deep and abstract principles underlying even childish things.


Duplo pieces are extremely durable so I wouldn't worry about them getting broken (as my poor feet can attest). If else one should be careful because with enough tension one piece may detach from the track and fly around hitting somebody.


Oh great! Another simple item in my life ruined by esoteric factoids at the back of my brain


How about letting your kids figure this out. I remember learning to not stress duplo exactly with these pieces, trying to make a loop..


I don’t think OP is genuinely concerned with tension. I think they were just presenting an interesting trigonometry problem.


Perhaps, but they should have just said 'I'm nerding out on this' rather than dressing it up in a 'concerned parent' onesie.


They posted it on the puzzling stackexchange, not the parenting (or LEGO) one.


Why is this in the puzzling stackexchange?


I think you can consider the problem of optimally laying out the train tracks to reduce stress a kind of puzzle.

Even less convoluted: the tracks must be assembled in a shape, and so are a sort of puzzle. The asker is asking a question about the geometry of the puzzle.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: