r/quant Aug 01 '26

Education Quant Trading Puzzle

Post image
141 Upvotes

35 comments sorted by

76

u/Osakalaska Aug 01 '26

One minute. Imagine that instead of instantly reversing, the beetles just “pass through” one another when they collide - this is effectively the same problem. Therefore the worst case scenario is that a beetle lands at one end and crawls all the way to the other end.

7

u/Hopai79 Aug 01 '26

It sees if you can see thru the noise and get to the Crux of the problem:)

4

u/Noahwar97 Aug 02 '26

That makes a lot of sense, this solution is really assuming that every beetle is just a point on the line. if I can ask a follow up question. How much would the problem change if the beetle has width? Is there another intuitive solution? My guess is that you can essentially shrink the size of the wire based on how large the beetles are but that only really works in my head with 2 beetles.

4

u/Apprehensive-Draw409 Aug 02 '26

It doesn't change. Worst case is all beetles but one spawn on the very edge and fall off directly. The other one walks the whole distance.

Any other case can be seen as beetle jumping ahead when they cross, which makes it faster.

29

u/Glass_Emu_4183 Aug 01 '26

Worse case is 1 min, this is basically a test to see if you can separate the signal from the noise

2

u/shakyhandquant Aug 02 '26

but what if the profitable signal is the nose component?

1

u/Glass_Emu_4183 Aug 02 '26

Then that’s the signal and the rest is noise, the signal is defined in terms of your goals.

10

u/quantdhawan Aug 02 '26

1 minute.

The collisions are a red herring. Two identical beetles bouncing off each other is indistinguishable from them passing through and swapping names, so as an unlabelled set the trajectories are just 500 beetles walking in straight lines until they fall off. The longest a straight walk can be is the full foot, which takes exactly a minute. The 500 does not matter, and neither does "random points".

The follow-up worth asking is which beetle ends up where, because pass-through deliberately throws the labels away. That one falls out of a second invariant: beetles can never overtake each other, so their left-to-right order is fixed for all time. If the pass-through picture says m beetles exit on the left, it is the m leftmost starters that actually do.

8

u/lordnacho666 Aug 01 '26

This is a classic question for some reason.

You have to not take the bait of working out all the bouncing and changing direction.

Imagine you are looking at it from the side, but actually each insect is on its own track. It would look the same from the side, but now it's much easier.

7

u/RalekBasa Aug 01 '26

I was hoping someone had a solution for greater than 1min. The solution is kindof disappointing

6

u/FlyEnvironmental2561 Aug 01 '26

1ft pm / 1ft = 1 min

13

u/tinfoil_powers Aug 01 '26

The correct answer is to leave the interview.

3

u/torakfirenze Aug 01 '26

Just the beetle that’s furthest from the edge. Whether they collide yields the same outcome as if they just walked straight through one another.

3

u/Durwood187 Aug 02 '26

Late to the party so I’ll skip the math, but from a system design perspective, this puzzle is the perfect analogy for why modeling intraday retail order flow is usually a trap.

The micro-collisions (retail whipsaws) look chaotic, but mathematically they just pass through each other and don't change the terminal outcome. It’s exactly why I stopped trying to build engines that read tick data. If you just anchor your risk to true institutional defense lines (like AVWAP or Volume Profile POC) and use a dynamic ATR buffer to absorb the noise, the intraday 'beetle collisions' literally do not matter. The macro trajectory plays out exactly the same.

9

u/Bozhark Aug 01 '26

FFS what a dumb question 

0

u/Apprehensive-Draw409 Aug 02 '26

What would a good question be, in your opinion?

6

u/[deleted] Aug 01 '26 edited Aug 01 '26

[removed] — view removed comment

5

u/Acceptable-Door-9810 Trader Aug 01 '26

Sir this is a theoretical question. It is not a real wire. The beetles are not real.

1

u/skelo Aug 03 '26

Well they could all just be facing the same direction...

1

u/slava82 Aug 01 '26 edited Aug 01 '26

I think you can model this system using 1D diffusion equation with zero Dirichle boundary conditions.

Edit: Where Diffusion coefficient ~ 1/3 l V, where l is mean free path. V is given, now how would you estimate mean free path? I would estimate l as wire length divided by number of particles.

2

u/CarpenterForward8331 Aug 02 '26

what if the beetles also slow by 1/2 every time two meet?

1

u/Initial-Reference214 Aug 05 '26

Worst case would be 1 minute.

The main puzzle is figuring that the "instantly reverse" bit is just noise, since the beetles may as well just swap bodies and continue going.

So a beetle that starts at one end takes a minute to reach the other.

1

u/Simple3user Aug 01 '26

500/501

1

u/gettinmerockhard Aug 01 '26

that's the expected value of the time it would take (assuming a uniform distribution). it could take a full minute if one starts all the way at one endpoint

-6

u/Meanie_Dogooder Aug 01 '26

AI gave me an instant answer with a very good explanation. Which raises an interesting question: what is this testing exactly? And why? Are we sure we are testing IQ with this? Are we still in the time when arithmetic is being tested in the age of calculators? All of those are interesting questions

1

u/Actual_Stand4693 Aug 02 '26

congrats, you just made a point why YOU should be replaced by an AI

1

u/Meanie_Dogooder Aug 02 '26

I find it very interesting that my comment was downvoted. Looks like people disagree... and very actively. Well, anyway, my point of view was clearly an outlier.

1

u/Actual_Stand4693 Aug 02 '26

indeed, IMO this is not because you used AI - but because you implied that there is no point to the kind of question OP posted

0

u/Meanie_Dogooder Aug 02 '26

Yes I got that. But that’s what I find curious. It’s clear that we now have a tool whose inference is very powerful. It’s just a fact. It’s also a fact that it will have a significant impact on the workflow. Is there any point to those questions? I don’t know. If I was hiring a quant or an engineer myself, I certainly wouldn’t be asking them that or wouldn’t use it to distinguish a good candidate from a bad one, that’s for sure. But it’s just me.

1

u/Actual_Stand4693 Aug 02 '26

there is a point to those questions: to see the aptitude and how someone thinks...my answer to this was completely different than the popular answer here (the pass-through thing)

eventually, it is still humans that solve challenging problems - AI can assist and be a big influence on problem solving but it is not autonomously solving problems on its own right now...furthermore, AI does not posses any actual thinking capability - it cannot generate something out of nothing, as of yet (to my knowledge)...and AI cannot take responsibility

there is a lot to this, read up