LOGO
General Discussion Undecided where to post - do it here.

Reply to Thread New Thread
Old 06-13-2007, 10:35 PM   #1
VyacheslaV

Join Date
Oct 2005
Posts
438
Senior Member
Default
Any word on the answer to the worm thing?

oh and btw, for the going from a to b in half steps thing, since I don't like the fact that a geometric progression uses fact that 1/infinity is zero, I reckon that the last step you take is of a size x and takes a time of t, where x*t is less than h (Plank's constant). So at that step you are already at the finish, in that you can't distinguish between the finish and the next smaller step. I like this explanation cos it doesn't require unphysical steps of 1/infintity. What do you think?
VyacheslaV is offline


Old 06-13-2007, 11:27 PM   #2
dmoiknlasd

Join Date
Oct 2005
Posts
516
Senior Member
Default
AAAAAGGHHH MAATTHHH!!!! *brain explodes*
dmoiknlasd is offline


Old 06-14-2007, 12:12 AM   #3
trettegeani

Join Date
Oct 2005
Posts
466
Senior Member
Default
The time taken to get to the end is just the sum of the time taken to travel each half distance step right? But surely if the time taken is always finite on each step, the sum of a set of finite times over the infinite steps would be infinite.
The time intervals over which you travel the smaller and smaller distances tend to zero, as the distances themselves tend to zero. The sum does not diverge to infinity, but converges to a finite value.
trettegeani is offline


Old 06-14-2007, 01:28 AM   #4
r9tbayfC

Join Date
Oct 2005
Posts
429
Senior Member
Default
If we assume that the elastic band is stretched AFTER the worm has crawled its daily distance, then this becomes a very simple problem! All you have to do is work out the percentage of the full distance the worm crawls each day, and add that to the previous percentage crawled. When the percentage reaches 100%, he's there.

Here's the code I just knocked up for testing:

Code:
Code
public class Worm {       public static int DISTANCEPERDAY = 10;       public static void main(String[]arg) {         double ropeLength = 100;          double percentage = 0;         int day = 0;         while (percentage < 1) {             percentage += DISTANCEPERDAY / ropeLength;             ropeLength += 100;             day ++;         }         System.out.println("When the worm crawls " + DISTANCEPERDAY + " meters per day: ");               System.out.println("The worm reaches the end of the rope on day = " + day);     } }

And here are the results:

Distance per day / days
10m / 12367
6m / 9717617
5m / 272400600
4m / took too long to calculate so I terminated the program
r9tbayfC is offline


Old 06-14-2007, 01:45 AM   #5
rorsvierwelia

Join Date
Oct 2005
Posts
491
Senior Member
Default
Realisticly, if you were to put something on an elastic band at say, 5m (out of the 100m), and then stretched that same band another 100m, the thing would actually move forward past the original 5m to something else. If point A is at 50m on day 1 and you're given the amount it actually moves after stretching, let's say 10m per every 100m stretched, then point A would then be at 60m down the line. Point A didn't actually move on the band, but since you're STRETCHING the band, whatever is on it moves with the stretching aspect.

You can actually test this. Take a tick rubberband and cut it in half. Put a push pin or a thumbtack in the middle and then stretch the band on one end. Meaning, keep one hand locked and then pull with the other. See where it ends up.
rorsvierwelia is offline


Old 06-14-2007, 01:49 AM   #6
r9tbayfC

Join Date
Oct 2005
Posts
429
Senior Member
Default
Realisticly, if you were to put something on an elastic band at say, 5m (out of the 100m), and then stretched that same band another 100m, the thing would actually move forward past the original 5m to something else. If point A is at 50m on day 1 and you're given the amount it actually moves after stretching, let's say 10m per every 100m stretched, then point A would then be at 60m down the line. Point A didn't actually move on the band, but since you're STRETCHING the band, whatever is on it moves with the stretching aspect.

You can actually test this. Take a tick rubberband and cut it in half. Put a push pin or a thumbtack in the middle and then stretch the band on one end. Meaning, keep one hand locked and then pull with the other. See where it ends up.
That's why I used percentages, as the percentage progress along the band is independent of any stretching effects.
r9tbayfC is offline


Old 06-14-2007, 01:52 AM   #7
rorsvierwelia

Join Date
Oct 2005
Posts
491
Senior Member
Default
That's why I used percentages, as the percentage progress along the band is independent of any stretching effects.
Then I say that's the best possible solution with the amount of information given.
rorsvierwelia is offline


Old 06-14-2007, 02:00 AM   #8
r9tbayfC

Join Date
Oct 2005
Posts
429
Senior Member
Default
Then I say that's the best possible solution with the amount of information given.
Yes probably, but I think that is a resonable assumption to make

Even if the elastic band is stretching as the worm moves, it's still a simple solution. Just take the percentage gained each day as an average between the percentage gained if the band was stretched at the start, and the percentage gained if the band was stretched at the end, assuming the band is stretching at a constant rate. Beyond that though, then we do need more info.
r9tbayfC is offline


Old 06-14-2007, 04:28 AM   #9
VyacheslaV

Join Date
Oct 2005
Posts
438
Senior Member
Default
The time intervals over which you travel the smaller and smaller distances tend to zero, as the distances themselves tend to zero. The sum does not diverge to infinity, but converges to a finite value.
Yeh, I understand the maths. But in reality if you keep halving a number you still get a number. Like if you view the problem slightly differently and say the frog or whatever purposely takes a step half the distance of the previous step (which in theory could be done) it would actually not be possible to get to the finish. But like I said, once you get to a step size of order h, you can't get any smaller and hence you will get to the finish.

The thing I don't like is the tend to zero, yeh it does converge, but only if you do the sum over an infinite number of steps, which in reality is not possible.

So instead of saying an infinite number of steps are needed, I prefer the number of steps it takes to get to x*t = h. Meh, well it makes me happy anyway!
VyacheslaV is offline


Old 06-14-2007, 04:45 AM   #10
xgnuwdd

Join Date
Oct 2005
Posts
496
Senior Member
Default
If we assume that the elastic band is stretched AFTER the worm has crawled its daily distance, then this becomes a very simple problem! All you have to do is work out the percentage of the full distance the worm crawls each day, and add that to the previous percentage crawled. When the percentage reaches 100%, he's there.

Here's the code I just knocked up for testing:

Code:
Code
public class Worm {       public static int DISTANCEPERDAY = 10;       public static void main(String[]arg) {         double ropeLength = 100;          double percentage = 0;         int day = 0;         while (percentage < 1) {             percentage += DISTANCEPERDAY / ropeLength;             ropeLength += 100;             day ++;         }         System.out.println("When the worm crawls " + DISTANCEPERDAY + " meters per day: ");               System.out.println("The worm reaches the end of the rope on day = " + day);     } }

And here are the results:

Distance per day / days
10m / 12367
6m / 9717617
5m / 272400600
4m / took too long to calculate so I terminated the program

Turns out that was what he wanted! Ah well, the labs are worth so little I wonder why I bother sometimes


edit - That means kirshnaz's original idea was correct! Gah, if only I had listened! Thanks for the help!
xgnuwdd is offline


Old 06-14-2007, 06:41 AM   #11
VyacheslaV

Join Date
Oct 2005
Posts
438
Senior Member
Default
Cool! Though I like I_C's method, much more elegant.
VyacheslaV is offline


Old 06-14-2007, 06:53 AM   #12
heennaRaf

Join Date
Oct 2005
Posts
504
Senior Member
Default
So I'm doing this problem in my Java class about a worm on a rubber band. I've heard this before but never knew the answer.

A worm is on a 100m rubber band. Each day it crawls 6m and the band stretches 100m. What day will the worm reach the end.

Now I think my logic is correct, but I don't think he ever makes it, hence my infinite loop! Does anyone know if the worm makes it?
Lawl, I thought you were talking about our friendly wire-tripping admin [rofl]
heennaRaf is offline


Old 06-14-2007, 06:57 AM   #13
abossakon

Join Date
Oct 2005
Posts
540
Senior Member
Default
The answer is that the worm never reaches the end. At least, not with the information as provided or worded. I had an issue with my programming teacher. He was russian. What he meant isn't always what he wrote. By the wording the rope extends its length by 100m per day and the earthworm remains in place, because nothing was stated about the earthworm being moved. Unless the stretching happens behind the worm it cannot reach the end. Even 50/50 that's 50m in front of the worm.. meaning it never reaches the end.

Perhaps the response he wants is that you run into an infinite loop.
abossakon is offline


Old 06-14-2007, 07:05 AM   #14
r9tbayfC

Join Date
Oct 2005
Posts
429
Senior Member
Default
The answer is that the worm never reaches the end. At least, not with the information as provided or worded. I had an issue with my programming teacher. He was russian. What he meant isn't always what he wrote. By the wording the rope extends its length by 100m per day and the earthworm remains in place, because nothing was stated about the earthworm being moved. Unless the stretching happens behind the worm it cannot reach the end. Even 50/50 that's 50m in front of the worm.. meaning it never reaches the end.

Perhaps the response he wants is that you run into an infinite loop.
The answer has already been established (look back a few posts)

And the worm will always reach the end, although it might take a very very long time...
r9tbayfC is offline


Old 06-14-2007, 07:20 AM   #15
abossakon

Join Date
Oct 2005
Posts
540
Senior Member
Default
The answer has already been established (look back a few posts)

And the worm will always reach the end, although it might take a very very long time...
Ok, so I missed the part saying that it was what he wanted. :P

I personally would have told my prof to be more descriptive. Wording can be taken a million different ways and leaving band stretching to personal assumption seems a little silly to me. I don't like to make assumptions when it comes to things that involve math. And its probably due to the russian prof. :P We had similar crap. If he told me it stretched I would just assume that "it got that much longer" because of his use of english. I've got nothing against people who don't have english as their primary language... but if you're teaching people who speak english its sort of important that you get things across properly in the language you're using.
abossakon is offline


Old 06-14-2007, 07:30 AM   #16
r9tbayfC

Join Date
Oct 2005
Posts
429
Senior Member
Default
Ok, so I missed the part saying that it was what he wanted. :P

I personally would have told my prof to be more descriptive. Wording can be taken a million different ways and leaving band stretching to personal assumption seems a little silly to me. I don't like to make assumptions when it comes to things that involve math.
The wording was fine, no further info was required. Whatever (sensible) assumptions you make, the worm will always reach the end, as long as it keeps moving in the forward direction.

If you take the case when the worm is not moving at all. As the band stretches the percentage distance along the band will remain constant. If it then starts moving forward, however slowly, the percentage distance along the band will start to increase, therefore the worm will be making progress. The percentage progress made each day will decrease as the band is stretched longer and longer, so any decrease in worm speed will increase the time taken exponentially. However, as long as the worm moves forward, he is making progress towards the end, and therefore he will get there eventually.
r9tbayfC is offline


Old 06-14-2007, 08:14 AM   #17
abossakon

Join Date
Oct 2005
Posts
540
Senior Member
Default
The wording was fine, no further info was required. Whatever (sensible) assumptions you make, the worm will always reach the end, as long as it keeps moving in the forward direction.

If you take the case when the worm is not moving at all. As the band stretches the percentage distance along the band will remain constant. If it then starts moving forward, however slowly, the percentage distance along the band will start to increase, therefore the worm will be making progress. The percentage progress made each day will decrease as the band is stretched longer and longer, so any decrease in worm speed will increase the time taken exponentially. However, as long as the worm moves forward, he is making progress towards the end, and therefore he will get there eventually.
Well yes, assuming you take the band, and it begins at 100 and the worm travel 6 meters you then have the worm traveling .06% of the band's total length. The next day the band is now 200 meters long and having traveled 6 meters the worm has traversed .03% of the band's length that day giving him a grand total of .09% length travelled. The worm travels his distance, and then the band is stretched. The original wording they specify that it stretches uniformly and that the action of stretching moves the ant to the right. Its the ant and the rubber band thing.

My problems was I related it to my specific programming teacher. In which case he would have meant you add 100 meters to the end. In that kind of situation it can never reach the end, because the length of the object is now 100 meters farther than before and the worm has travelled 6 meters. In that case the term "stretch" simply means "extend". So now you see my issue. :P The word stretch was sort of mis-used, which is why many times its stated more clearly about the stretching thing.

His goal was to constantly give you problems that would result in divide by zero, infinite loops, etc. So you sorta went into them expecting to hit a brick wall so that he could lecture about it in class or some crap. He was a really big douche as well. I ended up dropping out because I was sick during a test day and he never showed up for my schedule retake. We re-scheduled multiple times and every time he didn't show up. He was a horrible teacher.
abossakon is offline


Old 06-14-2007, 09:35 AM   #18
r9tbayfC

Join Date
Oct 2005
Posts
429
Senior Member
Default
My problems was I related it to my specific programming teacher. In which case he would have meant you add 100 meters to the end. In that kind of situation it can never reach the end, because the length of the object is now 100 meters farther than before and the worm has travelled 6 meters. In that case the term "stretch" simply means "extend". So now you see my issue. :P The word stretch was sort of mis-used, which is why many times its stated more clearly about the stretching thing.

His goal was to constantly give you problems that would result in divide by zero, infinite loops, etc. So you sorta went into them expecting to hit a brick wall so that he could lecture about it in class or some crap. He was a really big douche as well. I ended up dropping out because I was sick during a test day and he never showed up for my schedule retake. We re-scheduled multiple times and every time he didn't show up. He was a horrible teacher.
Ah right, you were talking about YOUR maths teacher. Yeah, I had a crap one too. Just graduated from Cambridge, and really did not know how to teach. The classes were basically a mess about and sometimes he would just say "take the day off cos I can't be arsed!" I mean it was great at the time but in the long run he didn't do me any favours. Our year was his first and last attempt at teaching. He quit straight after we finished... [rolleyes]

So yeah, that's why I'm crap at maths.
r9tbayfC is offline


Old 10-07-2007, 03:19 AM   #19
xgnuwdd

Join Date
Oct 2005
Posts
496
Senior Member
Default Worm on a Rubberband
So I'm doing this problem in my Java class about a worm on a rubber band. I've heard this before but never knew the answer.

A worm is on a 100m rubber band. Each day it crawls 6m and the band stretches 100m. What day will the worm reach the end.

Now I think my logic is correct, but I don't think he ever makes it, hence my infinite loop! Does anyone know if the worm makes it?
xgnuwdd is offline


Old 10-07-2007, 03:21 AM   #20
WepKeyday

Join Date
Oct 2005
Posts
523
Senior Member
Default
I would like to imagine that the rubber band only has so much elasticity. Is there some sort of formula that you could use, given the length of the rubber band and how far it stretches each day, that would calculate the maximum length the rubber band could stretch?
WepKeyday is offline



Reply to Thread New Thread

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

All times are GMT +1. The time now is 04:19 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 PL2
Design & Developed by Amodity.com
Copyright© Amodity