## 4 meeting bugs

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

### 4 meeting bugs

Imagine a square with a side length of 1. In each corner sits a bug. The bug in the bottom left corner tries to meet up with the bug in the top left corner. That bug, however, tries to meet the bug in the top right corner, which tries to meet the bug in the bottom right corner, which tries to meet the bug in the bottom left corner, the one I started with. Every bug starts walking to its target at the exact same speed, adjusting its direction at all times.

Question 1: How long (as in lenght) will they walk until they eventually meet?

Question 2, and this is something I'm personally wondering about: How big is the angle every bug will have turned until they all meet?
Caesar

Posts: 31
Joined: Fri Oct 24, 2008 12:34 am UTC
Location: Germany

### Re: 4 meeting bugs

This is a classic puzzle problem,and I'm surprised I haven't been able to find a thread here that discusses it.

Caesar wrote:Question 1: How long (as in length) will they walk until they eventually meet?
Spoiler:
The situation is completely 4-fold rotationally symmetric. It therefore remains that way and the beetles will always be in a square formation (that shrinks and rotates as they move). The distance from one beetle to its target beetle is not affected by the movement of that target beetle because that movement is perpendicular to the line between them. Therefore each beetle travels the same distance it would have if its target were stationary, i.e. the side length of the square 1.
Caesar wrote:Question 2, and this is something I'm personally wondering about: How big is the angle every bug will have turned until they all meet?

Spoiler:
For simplicity, assume that the beetles travel a distance of 1 in 1 second.
When the distance between the beetles is d, then the angular velocity is 1/d radians per second.
At time t the distance is d=1-t, so the angular velocity at time t is 1/(1-t).
To get the actual rotation at a time T, we need to integrate that from 0 to T, which gives -ln(1-T). This goes to infinity as T reaches 1 so they rotate infinitely much.

jaap

Posts: 1771
Joined: Fri Jul 06, 2007 7:06 am UTC

### Re: 4 meeting bugs

I've seen this one, and it has an interesting answer if you think of the 4 bugs as points, but I think it's even more interesting if you give the bugs a finite area. That way, the number of rotations does not approach inf since the center of the bugs can only reach a finite distance apart before they bump into eachother.

What if the square has length 1 and the bugs have radius 0.01. How many times do they circle before they meet?
Veritas

Posts: 24
Joined: Wed Aug 25, 2010 7:35 pm UTC

### Re: 4 meeting bugs

Veritas wrote:I've seen this one, and it has an interesting answer if you think of the 4 bugs as points, but I think it's even more interesting if you give the bugs a finite area. That way, the number of rotations does not approach inf since the center of the bugs can only reach a finite distance apart before they bump into eachother.

What if the square has length 1 and the bugs have radius 0.01. How many times do they circle before they meet?

Spoiler:
Bugs will travel 1-2r. Using Jaap's formula -ln(1-t), we get -ln(2r) radians of rotation for bugs of radius r. At 0.01, they will rotate ~6.214 radians or .99 of a complete circle.

If the bugs have radius e^(-2*pi) or about 0.00186744, they will travel one complete rotation. e^(-2*n*pi) will travel n rotations.
Blue, blue, blue

undecim

Posts: 286
Joined: Tue Jan 19, 2010 7:09 pm UTC

### Re: 4 meeting bugs

Brilliant puzzle - never seen that before. Am going to bore my friends with that for weeks!
Last edited by JamesD on Tue Oct 25, 2011 4:13 pm UTC, edited 1 time in total.
JamesD

Posts: 1
Joined: Wed Oct 19, 2011 11:57 am UTC

### Re: 4 meeting bugs

Small Government Liberal

Qaanol

Posts: 2398
Joined: Sat May 09, 2009 11:55 pm UTC

### Re: 4 meeting bugs

A simple way to calculate the amount of rotation of each bug:

Spoiler:
After the bugs have traveled half way, zoom in by a factor of 2: the bugs are in the same relative positions but travelling twice as fast. You can repeat this process infinitely often (taking half as long on each step). Since zooming does not affect the angles, the bugs must turn through an infinite angle.

They must be very dizzy by the time they meet!
mward

Posts: 69
Joined: Wed Jun 22, 2011 12:48 pm UTC

### Re: 4 meeting bugs

It's funny how all the mathematicians initially assume the bugs are infinitely small. What a bad assumption!
Goodbye

Posts: 844
Joined: Thu Jun 16, 2011 6:36 pm UTC

### Re: 4 meeting bugs

mward wrote:A simple way to calculate the amount of rotation of each bug:

Spoiler:
After the bugs have traveled half way, zoom in by a factor of 2: the bugs are in the same relative positions but travelling twice as fast. You can repeat this process infinitely often (taking half as long on each step). Since zooming does not affect the angles, the bugs must turn through an infinite angle.

They must be very dizzy by the time they meet!

Or you can just note that they're
Spoiler:
travelling along a loxodrome.
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

jestingrabbit

Posts: 5397
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

### Re: 4 meeting bugs

jestingrabbit wrote:
mward wrote:A simple way to calculate the amount of rotation of each bug:

Spoiler:
After the bugs have traveled half way, zoom in by a factor of 2: the bugs are in the same relative positions but travelling twice as fast. You can repeat this process infinitely often (taking half as long on each step). Since zooming does not affect the angles, the bugs must turn through an infinite angle.

They must be very dizzy by the time they meet!

Or you can just note that they're
Spoiler:
travelling along a loxodrome.

Spoiler:
I haven't googled loxodrome yet, but I'd be willing to bet that explaining to a layman what a loxodrome is, showing they're travelling on a loxodrome, and proving a loxodrome turns through an infinite angle would require at least three lines of text.

Kingreaper

Posts: 159
Joined: Sun Jan 27, 2008 4:23 pm UTC

### Re: 4 meeting bugs

Huu nice. I had been thinking about a sort of similar case where there are planets orbiting other planets and it had similar solution of symmetric rotation.
What if the bugs are more spread so that the distances between them varies? For example the red bug is 1 unit more to the north.
Is it still a rotating polygon?
What if the bugs "attract" each other with different "speeds"? Mostly just interested in where to find the theory to read for solving those systems.
kalakuja

Posts: 40
Joined: Sun Feb 06, 2011 10:15 am UTC

### Re: 4 meeting bugs

What if they adjust their courses to an intercepting course, based on how the first and the second derivative of its position?
I have discovered a truly marvelous proof of this, which this margin is too narrow to contain.
tomtom2357

Posts: 556
Joined: Tue Jul 27, 2010 8:48 am UTC

### Re: 4 meeting bugs

That requires to know these derivatives to derive themself. I think there are consistent solutions, but it is not computable by iterations. The trivial solution is: All bugs go to the center in a straight line.
mfb

Posts: 824
Joined: Thu Jan 08, 2009 7:48 pm UTC

### Re: 4 meeting bugs

tomtom2357 wrote:What if they adjust their courses to an intercepting course, based on how the first and the second derivative of its position?

I'd expect there to be infinitely many solutions depending on the starting conditions. The most trivial of which would be the one mfb mentioned. All bugs start with second derivative zero.
Also, this would probably open the door to assymetric solutions
Mighty Jalapeno wrote:
Tyndmyr wrote:
Роберт wrote:Sure, but at least they hit the intended target that time.

Well, if you shoot enough people, you're bound to get the right one eventually.

Thats the best description of the USA ever.
curtis95112

Posts: 607
Joined: Thu Jan 27, 2011 5:23 pm UTC

### Re: 4 meeting bugs

Starting positions in the square formation that was originally stated, and 2nd derivative 0. What would be really interesting is if someone proved that there are no solutions. (I chose the second derivative is because if they have the same speed, then there is no intersection course for the first derivative model)
I have discovered a truly marvelous proof of this, which this margin is too narrow to contain.
tomtom2357

Posts: 556
Joined: Tue Jul 27, 2010 8:48 am UTC

### Re: 4 meeting bugs

Also note that a perfect intersection course does not need any second derivative, as the bug just heads towards the meeting point. Therefore, all solutions have a vanishing second derivative, as long as the initial velocity is not fixed - otherwise it may be impossible to derive (read: take the derivative of) their velocity.
But with 4 straight lines and constant velocity, the only possible meeting point is the center. Therefore, my trivial solution is the only solution to your problem unless you modify it in some way to get more interesting results.
mfb

Posts: 824
Joined: Thu Jan 08, 2009 7:48 pm UTC

### Re: 4 meeting bugs

What about the original problem, but the bugs can only turn a certain amount at a time, for example, 1rev/sec (assuming that the side length is 1 and they have speed 1) then they cannot possibly turn an infinite amount. Or, how about if the bug's maximum angular velocity is the reciprocal of its current speed, and the bugs must always face the bug that they are chasing. It will still be symmetrical, but this may change the solution.
I have discovered a truly marvelous proof of this, which this margin is too narrow to contain.
tomtom2357

Posts: 556
Joined: Tue Jul 27, 2010 8:48 am UTC