Jump to content
Washington Football Team Logo
Extremeskins

Math question #2: The caterpillar and the wall


Switchgear

Recommended Posts

Hmm this sounds fun, I might try it.

What exactly is the disk part asking?

they want you to move the stack of disks from one pole to another. at no point will a bigger disk on a smaller disk. I have a forumla to solve how long that will take (but for some reason my recursive program that should give me the answer is wigging out on me. I had it at one point but now after 33 recusions or so it starts giving me 1.0 as the answer :mad:.) I also have a recursive formula for how far the caterpillar will be from the wall at time t. if the damn program would work like its supposed to, I'd have an answer.

edit: well I fixed the one issue and have the time it takes for the end of the universe, but now I've got a stack overflow for how far the caterpillar has traveled in that time :(

Link to comment
Share on other sites

they want you to move the stack of disks from one pole to another. at no point will a bigger disk on a smaller disk. I have a forumla to solve how long that will take (but for some reason my recursive program that should give me the answer is wigging out on me. I had it at one point but now after 33 recusions or so it starts giving me 1.0 as the answer :mad:.) I also have a recursive formula for how far the caterpillar will be from the wall at time t. if the damn program would work like its supposed to, I'd have an answer.

edit: well I fixed the one issue and have the time it takes for the end of the universe, but now I've got a stack overflow for how far the caterpillar has traveled in that time :(

Its because of integer / long overflow... the number is too big to get inside of a single element of data like that.

I left for a long period of time, but have the first part down... If u do the first 3 steps.. u can see a pattern and develop a formula for the nth step.

I havent thought about the caterpillar part too much but i have the answer to the first part.

Link to comment
Share on other sites

Its because of integer / long overflow... the number is too big to get inside of a single element of data like that.

yeah, I figured that was the case. I tried upping the amount of memory It could use but hit a wall with that.

since I definitely don't want to calculate that recursion by hand and I'm too lazy to convert it into a function, I'm done with this question.

Link to comment
Share on other sites

I think I have the solution.... I am going to send the OP a pm so that you guys can take more time to try and figure it out without spoilers....

If it turns out that I am correct, I can post detailed steps as to how I got there for the kids who want know

Link to comment
Share on other sites

I think I may have hurt Weganator's brain. For anyone still interested in this (which doesn't seem likely) I"m willing to give some hints. I needed help from my professor to solve this, and that was after 3 years of fairly intensive math and CS classes. This was a question asked to a room full of just about to graduate CS majors and no one even came close, so if it seems frustrating, that's because it is.

Link to comment
Share on other sites

I'm still stuck on the caterpiller question. Was I even close thinking of it as percentage of the way across? I keep thinking that 1/2 + 1/3 + 1/4 gets you over 1, so 1/100 + 1/200...should get you there just much much slower. Am I on the right track? I suppose I could plug into SAS and get an answer, but I'm lazy and somehow using programing seems like cheating where just asking for hte answer dos not ;).

For what it's worth, I forwarded this to my dad (physics teacher who used to work at NIST) and my father in law (use to work as a code breaker) to see if they had any solutions, but I haven't heard back from either of them.

Link to comment
Share on other sites

I think I can at least set up the caterpiller problem.

The rubber band starts at length 1, and increases 1m/sec. It's length = 1 + t

The caterpillar's position is more complicated. At the end of 1 second, the rubber band will be 2m long, but the caterpillar will be .01m from the end of the rubber band. (So he's at x=1.99, on a 2m rubber band.)

At that point, the rubber band is still stretching with a velocity of v=1, but the caterpillar's velocity (due to stretch) will be 1(1.99/2). (The part of rubber band that's between the caterpillar and the wall is stretching, but so is the part of the rubber band that's between the caterpillar and whatever's stretching it.) So, the stretching of the rubber band will move the caterpillar .995m. And the part of the rubber band that the caterpillar's already traveled will stretch from .01 to .015. (And the caterpillar will crawl another .01 on his own.)) Caterpillar is now at point x=2.975 on a 3m rubber band.

In short, the caterpillar's velocity due to stretch will go down over time, because the end of the rubber band is moving at a constant speed, the caterpillar is moving further and further from the end.

I suspect that the correct way to solve this problem is through calculus. Unfortunately, the caterpillar's location is the integral of it's velocity, but it's velocity is dependant on it's location. (Actually, on the ratio between the caterpillar's location and the end of the rubber band.) And my calculus isn't good enough to do position = integral of velocity when velocity is a function of location.

I could write a program to quantize the problem, by single-stepping through time in one-second intervals. (Which would not give the real answer, but might be close). But I suspect that the numbers for the total length of the rubber band would very quickly become too large for the infinitesimal progress of the caterpillar to be significant. I think I'd very quickly be trying to add really small numbers to really big numbers, and running into math errors.

I think I've correctly set up the problem. But don't have the skills to finish it from there.

Link to comment
Share on other sites

if this is a harmonic series which is unbound, it will go to infinity. if i am correct on this, eventually, the caterpillar can simply walk to the end, assuming he does not get tired and travels at the same rate and does not turn into a butterfly or bite through the rubber band. then again, im just a wrestler and dont remember too much about math

Link to comment
Share on other sites

It turns out there was a much easier way than the way I did it...

But if it helps as a hint to anyone trying to figure it out... you can underestimate the amount of time one takes.... and overestimate the amount of time the other takes...

And based on this you can actually prove the result.

Think of it like this:

A is an overestimation of a. B is an underestimation of b.

if A < B.... then a<b because u create the transitivity chain a < A < B < b...

Im not sure if this will help anyone or not... but that is the key logic to how i did it.

Link to comment
Share on other sites

ozzw, you know more than you give yourself credit for.

The easy way to approximate the caterpillars movement is to break it into 1 second intervals.

Second 1 - Rubber band is 1m long, caterpillar moves 1/100th of the distance to the wall

Second 2 - Rubber band is 2m long, caterpillar moves 1/200th..

Second 3 - 1/300th

and so on. It would be a closer approximation (but still an approximation) to say 1/100, 1/199, 1/298 and so on, but doing it the first way makes calculating easier, and the difference is pretty insignificant. If someone wants to solve this using calculus they are welcome, but the approximation is good enough.

The question becomes how many terms does it take to make (1/100 + 1/200 + 1/300 + ... + 1/(n*100)) = 1

100 *( (1/100 + 1/200 + 1/300 + ...) = 1) becomes

(1 + 1/2 + 1/3 + ... ) = 100

Which is the harmonic series mentioned by ozzw.

Then it's just a question of if the number of seconds needed to cover the distance is more or less than the amount of time given by the rings. Simple...

Link to comment
Share on other sites

Its really tragic...

I showed this problem to my roomate and he got into a big debate with me over it (he is an engineer which magically means he thinks he knows everything).

So I went over my solution with him. I ended up having to write a proof for just about every step of my logic. He still didnt believe me. Eventually it got to the point where we went to my Advanced Calc professor and showed him the proof. After the professor verified my proof, my friend was still skeptical but figured he was wrong because I had a phd in Math back me up.

I bring this up because I was going to point out how this proves I have no life... lol.... AND.....

If people give up on this I can eventually post a possible solution with a whole bunch of proofs to explain just about everything step by step.

Link to comment
Share on other sites

1 + 1/2 + 1/3 + ... ) = 100

this is the first thing i thought of 1/n and it worked fairly well. i didnt really pay attention to the ring thing yet because no one was talking about that.

Link to comment
Share on other sites

1 + 1/2 + 1/3 + ... ) = 100

this is the first thing i thought of 1/n and it worked fairly well. i didnt really pay attention to the ring thing yet because no one was talking about that.

Will Hunting, is that you? It sounds like you've got good intuitive math comprehension, take a look at some other hard math problems and see if something similar happens. Maybe you've got a talent for that sort of thing. Check out this website and see how much of it makes sense to you.

Link to comment
Share on other sites

For those asking if there are jobs for people able to think like these questions, I would say the answer is undoubtedly yes.

Questions like this one go to a person's ability to take difficult questions and put them into a math framework. If you find questions like this easy and enjoy doing them, you should take the math needed to become a statistician, a researcher or an engineer. Back when I was working with a consulting firm analyzing new medical technologies, we had math questions like these in trying to figure out when the break even point for a company developing a drug would be. These professions deal with questions similar to this or need the ability to take concrete examples and put a mathmatical frame work for what they see.

Will the questions always be as provocative as a caterpillar climbing a rubberband for thousands of years? Well let's just say I doubt anyone is going to make a childrens book out of the break even point for an investment in a new bone grafting material to be used to secure permanent replacement teeth...but there sure is money in coming up with a reasonable model.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...