Piet Souris

Rancher

Posts: 1943

66

posted 4 years ago

Yesterday evening, many tv stations were broadcasting this 'Eurovision Song Contest'.

Now I don't like that, so I was reading some book when suddenly I remembered

two old puzzles I was confronted with many moons ago. The first one I'll present in this topic,

the other one in the next.

About 40 years ago, when I just had started working in some office and when computers

were never heard of, a collegue gave me this problem:

We have a car, a tree and a rubber band that is attached to both the car and the tree.

Needles to say that this rubber band can stretch forever without any problem!

The car is driving at a certain speed. Now, at a certain moment in time, a snail comes

creepin from the tree up to the rubber band and starts to creep towards the car.

The question is: will this snail ever reach the car?

Back then, when my maths were far less rusty than they are now, I was (after a long time

and with a lot of effort) able to solve it. As I said, we had no computers then, so yesterday

evening it appeared to me that I never tried to solve it numerically, on a computer.

So: write a program that answers the question: 'yes', 'no' or 'depends'.

Have fun!

Greetings,

Piet

Now I don't like that, so I was reading some book when suddenly I remembered

two old puzzles I was confronted with many moons ago. The first one I'll present in this topic,

the other one in the next.

About 40 years ago, when I just had started working in some office and when computers

were never heard of, a collegue gave me this problem:

We have a car, a tree and a rubber band that is attached to both the car and the tree.

Needles to say that this rubber band can stretch forever without any problem!

The car is driving at a certain speed. Now, at a certain moment in time, a snail comes

creepin from the tree up to the rubber band and starts to creep towards the car.

The question is: will this snail ever reach the car?

Back then, when my maths were far less rusty than they are now, I was (after a long time

and with a lot of effort) able to solve it. As I said, we had no computers then, so yesterday

evening it appeared to me that I never tried to solve it numerically, on a computer.

So: write a program that answers the question: 'yes', 'no' or 'depends'.

Have fun!

Greetings,

Piet

Matthew Brown

Bartender

Posts: 4568

9

posted 4 years ago

Seriously, though, that's a nice little problem. I don't think it's obvious what the result is going to be before you calculate it. But I was more interested in the mathematical solution, which I'll post later if anyone's interested (or, at least, I'll post what I

Seriously, though, that's a nice little problem. I don't think it's obvious what the result is going to be before you calculate it. But I was more interested in the mathematical solution, which I'll post later if anyone's interested (or, at least, I'll post what I

*think*is the solution!).

posted 4 years ago

Doesn't the answer depend on the speed of the snake relative to the car, and - also - on the way the snake actually crawls on the rubber band?

In any case, I'd say the snake will die. Either the rubber band will get so thin that it will cut the snake into pieces, or it will - due to the curvature of the Earth - press the snake against the ground. Poor snake!

In any case, I'd say the snake will die. Either the rubber band will get so thin that it will cut the snake into pieces, or it will - due to the curvature of the Earth - press the snake against the ground. Poor snake!

Matthew Brown

Bartender

Posts: 4568

9

posted 4 years ago

Well, yes, subject to the usual caveats and assumptions (like an infinite straight road, an immovable tree, an infinitely stretchable elastic band - oh yes, and a car that can generate unlimited power to maintain a constant velocity as the tension increases). I also assumed the speed of the snail to be constant

No idea about the snake, though .

*relative to the local velocity of the elastic band*. Then, if my calculation is correct, the snail eventually catches up with the car regardless of how slowly it's moving as long as the speed is positive.No idea about the snake, though .

posted 4 years ago

doesn't it somewhat depend on how exactly the band stretches under the snail?

Assume the snail was perfectly still, and was 10m from the tree. if the band is frictionless, inertia would keep the snail where he is relative to the ground, so the car would continue to pull away. If the car is travelling faster than the snail, he can never catch up.

However, if there is friction, then if the snail is 10m from the tree and 10m from the car, when the band is stretched to 40 meters, I assume the snail ends up at the 20m mark?

Assume the snail was perfectly still, and was 10m from the tree. if the band is frictionless, inertia would keep the snail where he is relative to the ground, so the car would continue to pull away. If the car is travelling faster than the snail, he can never catch up.

However, if there is friction, then if the snail is 10m from the tree and 10m from the car, when the band is stretched to 40 meters, I assume the snail ends up at the 20m mark?

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors

Matthew Brown

Bartender

Posts: 4568

9

posted 4 years ago

That's what I assumed. If there's no friction, I don't think the snail is going far!

fred rosenberger wrote:However, if there is friction, then if the snail is 10m from the tree and 10m from the car, when the band is stretched to 40 metres , I assume the snail ends up at the 20m mark?

That's what I assumed. If there's no friction, I don't think the snail is going far!

posted 4 years ago

If you add a point-like snail to the list of assumptions, I'd agree that the snail safely reaches the car

Just don't tell Zeno of Elea.

Matthew Brown wrote:Well, yes, subject to the usual caveats and assumptions...

If you add a point-like snail to the list of assumptions, I'd agree that the snail safely reaches the car

Just don't tell Zeno of Elea.

Matthew Brown

Bartender

Posts: 4568

9

posted 4 years ago

As a Terry Pratchett character says when faced with a similar argument (about an arrow never catching up with a tortoise), "I've got a stack of tortoise kebabs that says different".

Martin Vajsar wrote:Just don't tell Zeno of Elea.

As a Terry Pratchett character says when faced with a similar argument (about an arrow never catching up with a tortoise), "I've got a stack of tortoise kebabs that says different".

posted 4 years ago

Easy. "Snake" and "snail" sound nearly the same to me. I've realized my mistake only now.

In any case, I've pondered whether the snail and the car could be an analogy to the light travelling in an expanding Universe, and then it dawned to me: the snail will reach the car, but it will be

Matthew Brown wrote:No idea about the snake, though .

Easy. "Snake" and "snail" sound nearly the same to me. I've realized my mistake only now.

In any case, I've pondered whether the snail and the car could be an analogy to the light travelling in an expanding Universe, and then it dawned to me: the snail will reach the car, but it will be

*redshifted*during its journey.

Ivan Jozsef Balazs

Rancher

Posts: 999

5

Ivan Jozsef Balazs

Rancher

Posts: 999

5

posted 4 years ago

Let us denote the initial length of the rope with s, the velocity with v and the position of the snail x(t), being a function of time.

The velocity of the snake stems from two components: one is its own speed "w" against the rope plus the speed gained from drifting on the rope.

At the position x(t) of the rope of the length (s+vt), the proportional speed of this position on the rope is v.x(t)/(s+vt)

So at the end we get this differential equation:

x'(t) = w + x(t).v / ( s + v.t)

Let us denote s/v=t0 so we have

x'(t) = w + x(t) / ( t + t0 )

Now let us consider the ratio x(t)/(t+t0). Its derivative will prove to be a known function!

(x(t)/(t+t0)) ' = [ x'(t)*(t+t0)-x(t) ] / (t + t0)^2 = [ x' - x/(t+t0) ] / (t+t0) = w / ( t + t0)

Given the fact x(0) = 0, we obtain as below (with ln = natural logarithm, whose derivative is ln'(t) = 1/t )

x(t)/(t+t0) = w. ln ( (t+t0) / t0 )

The snail reaches the other end of the rope at time t when

x(t) = s + vt = v ( t + t0)

that is when

w.ln( (t+t0)/t0 ) = x / ( t + t0) = v

ln( (t+t0)/t0 ) = v/w

exp(v/w) = (t+t0)/t0

t = t0 ( exp(v/w) - 1 )

A sidenote: the notation 'u' (instead of 'w') did not work. The forum software rejected it. It is told to be a silly English abbreviation.

The velocity of the snake stems from two components: one is its own speed "w" against the rope plus the speed gained from drifting on the rope.

At the position x(t) of the rope of the length (s+vt), the proportional speed of this position on the rope is v.x(t)/(s+vt)

So at the end we get this differential equation:

x'(t) = w + x(t).v / ( s + v.t)

Let us denote s/v=t0 so we have

x'(t) = w + x(t) / ( t + t0 )

Now let us consider the ratio x(t)/(t+t0). Its derivative will prove to be a known function!

(x(t)/(t+t0)) ' = [ x'(t)*(t+t0)-x(t) ] / (t + t0)^2 = [ x' - x/(t+t0) ] / (t+t0) = w / ( t + t0)

Given the fact x(0) = 0, we obtain as below (with ln = natural logarithm, whose derivative is ln'(t) = 1/t )

x(t)/(t+t0) = w. ln ( (t+t0) / t0 )

The snail reaches the other end of the rope at time t when

x(t) = s + vt = v ( t + t0)

that is when

w.ln( (t+t0)/t0 ) = x / ( t + t0) = v

ln( (t+t0)/t0 ) = v/w

exp(v/w) = (t+t0)/t0

t = t0 ( exp(v/w) - 1 )

A sidenote: the notation 'u' (instead of 'w') did not work. The forum software rejected it. It is told to be a silly English abbreviation.

Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |