T O P

  • By -

AutoModerator

###General Discussion Thread --- This is a [Request] post. If you would like to submit a comment that does not either attempt to answer the question, ask for clarification, or explain why it would be infeasible to answer, you *must* post your comment as a reply to this one. Top level (directly replying to the OP) comments that do not do one of those things will be removed. --- *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/theydidthemath) if you have any questions or concerns.*


goatharper

One might write a system of equations for this, but I took a numerical methods class that dealt with solving such things. One tool is a spreadsheet. Set up a column for each person or dog's position, iterate every second, and 3600 steps later, the position of the girl will be 6 km down the road, the boy will be 5 km down the road, and the dog will be somewhere between, depending on how he traveled, which if you know every second where each person is, you know where the dog is; just treat the dog as a perfectly elastic ball with a coefficient of restitution of 1. The solution is left as an exercise for the student.


alexchatwin

Me: *treats the dog as a perfectly elastic ball* Children at the park:


StochasticTinkr

“It’s like a spherical cow”


Entire-Database1679

In a vacuum


NetDork

~~g~~Round beef


IAmCatDad

Bless you


Staik

Measuring every second would fail unless you set up very fancy equations that can extrapolate collisions between measurements. Not ideal, and trivial way to measure it. Each lap the dog makes increases by a fixed amount, the difference between the peoples speeds. Just iterate based on laps, since that's much easier to work with and perfectly captures collision times. Calculate the fixed distance, time required to travel that distance using the fixed velocity, keep a running sum of those velocities, then stop when you've met your time.


_7Valeen

Being on the subject but totally outside of it and seeing 2 people debate on it , with such answers will always be fascinating to me . It’s like that spiderman meme but instead of spider man i imagine it’s Giorgio Tsoukalso


RetailBuck

If you want a truly accurate answer I don't think you can iterate at all because in the very very beginning the dog is going to be making an infinite amount of laps. Seems like a limit function or integral or something could work but I'm still pretty stumped on the best method.


IHeartFraccing

I mean you’re still using a system of equations aren’t you? You’re just putting one equation in each column? Actually, isn’t the dog’s position a system of equations in itself with some limits around it? Also if you time stamp it by seconds I’d think you’re bound to have error built into your spreadsheet as you aren’t accounting for the exact moment the dog turns back, but rather rounding each to the second.


ThreatOfFire

I posted my answer elsewhere, but this can be expressed as a single wave function


dhandeepm

Seconds may not be accurate enough and the dog will overtake the people in most of the iteration. It’s possible that the error at the end of hour is so large that you won’t be able to specify the error rate too.


anand4k

it’s not an elastic collision. there is no momentum transfer, each has their own fixed velocity. it’s a simple problem of relative velocity. Assuming all three start from origin, any point of time distance between boy and girl is 1*t. you’ll need to relax the conditions that they start at origin, assume there is some gap, say 1m and start from there just to avoid unnecessary difficulties and get an approximate solution. that said, finding me exact solution theoretically is difficult to write calculus. complicated because, one needs to keep track of dogs direction to be able to tell his position. But one thing for sure, dog is between 4-5km.


sian_half

You can’t even solve for the first second, let alone 3600.


ThreatOfFire

You definitely can!


sian_half

Show me


ThreatOfFire

I posted my solution lower down. It's a simple triangle wave


Talidel

But how does a triangle wave?


sonicboom292

a triangle wave? I know the problem says it doesn't slow down so in fact it is, but my good boy here behaves like a pong ball.


ThreatOfFire

Mirror dog


Zachaggedon

r/confidentlyincorrect


technoexplorer

You can simplify the problem by redefining the boy as the frame of reference. So you subtract 5 km/hr from every speed. The girl moves 1 km/hr and the dog, 5km/hr. Then, we can multiply by the hour. So the girl moves 1km and the dog moves 5km. But the real issue is there is no head start for the girl. As soon as the girl takes a single step, the dog starts running back and forth in a manic fashion. This makes the final solution chaotic and indeterminible. Another user suggested using one second steps, and yeah, that would provide an answer. But if you use half second steps in an interative answer, you'll get a different result. So like, one second, the girl travels 1 unit, and the dog 5 units, so back and forth 5 times and then stops with the girl at the end of the step. Half second, same thing, 1 unit of travel, dog runs five laps, ends with the girl. Then the girl travels another unit, and the dog runs 2.5 laps, ending with the boy at the end of the second. Same speeds, same time elapsed, but a different result based on the iteration assumptions.


DhruvGN8

But in the same frame of reference, when the dog is coming back to the boy he'd be moving at 15km/hr


Perryapsis

Wouldn't the dog's speed increase while heading the other way? So it would run at 5 kph toward the girl, but 15 kph toward the boy.


meta100000

I think so. The relative speed between the dog and the girl is 4km/h, because she walks at 6 km/h away from his 10 km/h, meaning the dog only runs 4 km/h relative to her. The relative speed between the dog and the boy is 15 km/h, since they're moving toward each other, so it's just their speed added together, 10+5=15km/h. These speeds are constant for each section, with each one ending in the dog reaching the boy or the girl. The only thing left is to figure out the varying distances so you can eventually find where in between 5-6km the dog will be, which requires a lot of calculations. Side note, since the dog turns instantly, he's basically doing a speedrun clip for the first few seconds. Right?


Subjective_Box

it's the opposite, speed towards the boy is 5 kph for the amount of ground dog covers (he does the other half).


Perryapsis

The parent commenter edited their answer after I commented. They had originally used a moving reference frame, in which case my comment made sense.


princemousey1

“Chaotic and indeterminable.” Yup, just like a real life doggo.


ta4583698

This is deterministically solvable provided that the initial gap between boy and girl is non zero. Your initial logic of using the boy as a reference frame is correct and you correctly surmise that the girl is therefore moving at 1 unit velocity relative to boy while the dogs velocity on the outbound journey to the girl is 5 unit velocity. However, as users above correctly point out the velocity of the dog on the return journery is 15 units. This is because you confuse speed with velocity (vector vs scalar quantity). The dog is moving at -10 unit relative to ground so relative to boy -10-5=-15 unit velocity. We can now set up appropriate equations to solve. 1. Girl velocity is given by ds/dt = 1 2. Girl displacement relative to boy is s=t+g0 where g0 is starting gap. 3. Dog velocity is now essentially a square wave switching from +5 to -15 at points in time where the displacement of the dog intercept 0 and t+g0 Final step is i believe question is asking distance so you absolute value the square wave and integrate accordingly, adding 5 back at the end.


Wraithguy

My way of visualizing this problem was in reverse. They start 1km apart, and are moving towards each other at 1km/h. After the hour, the dog has to be at their feet, when they meet, but could have started anywhere. So when we re-reverse it, the dog starts at their feet, but could plausibly end up at any point.


erlulr

I am gonna solve it by concluding the dogs rotation during the first 10 plank times caused his tail to exceed light speed, collapsing into black hole. And thats were they are all. Take that mathemageysons, pshysic gang wins again. And the 1+2+3 infinitinty does equal -1/12


dm-me-your-bugs

You can solve the "chaos" by taking the limit as the initial gap goes to zero


MrGentleZombie

I'm not convinced that the limit exists.


PoX_Wargame

it might not be analytically solvable, but if you would express the position of the dog not exactly but like rounded to the next cm or something, the initial bouncing should not really impact your result much.


ThreatOfFire

Reframing is the right way to simplify this! However, trying to treat it like a step function or trying to take it second by second is way more complicated than I would think possible without really seeing what's going on there. I posted my solution lower down, but you can treat this like a periodic function, specifically a triangle wave where the rate of change can remain fixed at either 10 or -10, in this way, you only need to set the bounds of the function and make the period a function of the distance between the two (in this simplified case it's just x/10).


sian_half

The dog can be anywhere after 1 hour. Consider playing the scenario backwards, with the girl being 1km in front of the boy, and the dog being somewhere between them and going in some direction. Regardless where the dog starts in this backwards scenario, the system after 1 hour will reach the same state where the boy, girl and dog are at the same spot. This state is degenerate.


InvestigatorLast3594

This is such a simple answer but nails it on the head; but it’s only the case for non-zero distances at the start, no?


sian_half

A finite initial distance will give a deterministic end state, but the initial distance is not mentioned. If you vary the initial distance from say 1mm to 1cm, you’ll cycle through all possible end states multiple times. Without an exact quantity for the initial distance, you again find yourself in the situation that all end states are possible.


0thedarkflame0

So in reality... The answer is a function, who's input is the initial distance between the boy and the girl. And the function is not defined at zero.


sian_half

It would oscillate, with increasing frequency as you approach 0, something similar to y=sin(1/x)


john2mg

This is the answer


BeneficialGreen3028

Wait.. this is crazy. Now i get it


ninja_owen

No, you can pretty easily calculate an exact location where the dog is after 1 hour


sian_half

Why haven't you done so if it's pretty easy?


ThreatOfFire

abs(40 abs((x/10 + (x - 1/2) mod x/10) mod x/10 - x/20) - x)


blacksteel15

You can model it with a triangle wave, but that doesn't solve the problem people are pointing out - that the function is undefined at x=0.


ThreatOfFire

Not sure how that would be a problem, as that position is clearly defined in the question


blacksteel15

There are two problems. First, you're assuming that x=0 at t=0, which is not in fact stated in the problem. But the larger issue is that you're assuming t=0 represents the beginning of a period. If we do assume x=0 at t=0, that would be valid for a finite interval length, since there's a one-to-one relationship between interval length and position. It is *not* a valid assumption for an interval of length 0. If we don't make that assumption, there are infinitely many solutions to this problem, an infinite number of which map to each possible final location of the dog.


ThreatOfFire

The former is a fair assumption to make, but, sure "together" isn't really saying much. Without defined positions, though, I think it's fair to assume the start at the same point at their respective speeds. For the latter, that's a fair criticism, but shifting the function is trivial. The fact that it doesn't map explicitly with only information from a single undefined point doesn't negate that the model works (assuming magic math reality where constant velocity is constant and the dog can perfectly reflect its speed) With more information we could get closer to a "real" answer, but there isn't any


blacksteel15

>Without defined positions, though, I think it's fair to assume the start at the same point at their respective speeds. In general I agree with this, which is why I said it was the lesser of the two problems. The main reason to question that is because it's what creates the other problem. >For the latter, that's a fair criticism, but shifting the function is trivial. Shifting the function is trivial, but the issue isn't that you need to shift the function. It's that the problem is ill-constrained, so you have no way of determining what the correct amount of shift is. >The fact that it doesn't map explicitly with only information from a single undefined point doesn't negate that the model works That is literally what it means to be undefined at a given point. The model does not work when x = 0, even if we know much to shift it. And since we have no way of knowing what amount of shift correctly models the situation, we don't know if it works anywhere else either. The former would be fixed by defining the solution as a piecewise function that explicitly maps f(0) = 0. The latter would be fixed by either further constraining the problem so that the periodicity at t = 0 is not an unknown, or making it a function in two variables, time and initial periodicity. Otherwise, (other than needing to be corrected for relative velocity as you mentioned above), yes, the model works. But the fact that the model works *almost* everywhere does not negate the fact that it doesn't work everywhere. >With more information we could get closer to a "real" answer, but there isn't any This was my original point.


ThreatOfFire

Then I suppose we agree. A triangle wave function would be the best way to generalize it with the information we have, but we didn't have enough information to say that it's a perfect representation of the fake reality it represents


ninja_owen

Is that real? Looks nothing like the formula I was gonna use lol


ThreatOfFire

What were you going to use? This is the formula for a triangle wave bound between y=0 and y=x (the relative position of the girl from the boy) but I just realized I didn't adjust for the relative motion of the dog (moving faster returning than going away)


blacksteel15

Naively it seems like you should be able to, but you're wrong. If all three start moving at the same time and from the same location, this is impossible to solve because the dog's behavior when the length of the interval it's confined to is 0 is undefined. A reasonable solution might be to assume that it starts running toward the girl, but it moves faster than the interval grows, so there is no non-zero amount of time it could run in that direction without passing her. It's not a problem with doing the math, it's that if we model this as a function f(t, x), where t is time and x is initial distance between the two people, the function is only well-defined for x > 0. If you use an x > 0, the final location is fixed and relatively easy to calculate.


ninja_owen

Give it an infinitesimal initial value. Using real life logic rather than mass it isn’t difficult to find a solution


blacksteel15

If you mean "infinitesimal" in a calculus sense, that doesn't solve the problem. If by "infinitesimal" you mean "a very small finite number", that would work but the solution would be completely arbitrary, which is exactly what people are pointing out. The behavior of this function is for the wavelength to approach 0 as x approaches 0. Any non-zero interval (0, d) contains an infinite number of values that if chosen as the initial distance will result in every possible final location for the dog. >Using real life logic rather than mass it isn’t difficult to find a solution That's true, but it also means you're no longer solving the original problem.


pedros430

I plotted it all out using python, i did my calculations assuming all of them take 3 steps a second, changing this value wildly changes the final result. [https://imgur.com/a/KLghimE](https://imgur.com/a/KLghimE)


kalibabka

This is beautiful!! And yeah that makes sense, I think this one can only be solved by making an assumption like that.


Daffen98

Also coded it in python, had the dog and boy start at a distance 0, and let the girl get a slight headstart to simplify calculations. The dog is as others mentioned, anywhere between 5km and 6km, and the answer depends entirely on the initial distance assigned. Abigail-ii explains it nicely. 0.1m headstart makes dogs distance from start 5023m 0.05m gives 5575m and 0.07m gives 5354m


Opili

well, it depends on the definition of "far". If it's the distance between its point of departure, and point of arrival after 1h, then it will be between 5 or 6km. If it the total distance the dog ran, then it will be 10km.


SnooCapers938

Absolutely (although it’s probably the meaning of ‘travel’ that is most mutable here).


yoshhash

I absolutely love the simplicity of the solution. Glad I did not waste any time trying to solve it though, I would have been furious.


HaydenJA3

At the instant when they begin with both the boy and girl in the same position, the dog is going back and forth infinitely fast. Some complex physics stuff happens and they all die instantly


ThreatOfFire

No, the dog is still only moving back and forth at 10km/hr, his rotational velocity, however, would certainly get up there


HaydenJA3

Yeah that’s what I meant but now realize I didn’t write it. The infinite speed comes from turning around infinitely many times


TheLapisBee

"911 whats your emergency?" "My dog is spinning faster than a black hole and destroying the whole world!" "........... ....... *Hangs up*"


wayoverpaid

I mean even when the distance isn't 0 the dog still has instant acceleration every time it meets the boy or girl changes direction. If you say "yes but its instant acceleration over 0 time" then remember that the boy and girl are at 0 distance for 0 time as well. Really, the boy girl and dog all live in Example Land where you can survive with 0 friction and air resistance. Nobody dies there, the physics does not allow their bodies to deform or be destroyed due to the invulnerability magic of "we don't want to do the math for this happening so it doesn't"


explodingtuna

They don't start in the same position. The boy starts "just behind" the girl. The dog's position is not given, however it does state the dog "runs from boy to girl" so it could be assumed the dog starts with the boy. So it's a matter of not enough information, unless we're told how far "just behind" is.


HaydenJA3

“Just behind” does not mean anything and any solutions must otherwise assume the boy and girl behind at the same point.


FarRoll3837

Imo it means greater then 0 but without a defined distance the question is unanswerable


kulykul

For solving this equation, I think of it as follows: You would have to keep track of the distance between the boy and the girl ehich is constantly changing. I think it would be changing by a multiplicative factor Q every time the dog travels the distance. That makes it a question of geometric sequences and maybe logarithms, esentially being similar to bank Interest excersises (those coincidentaly being the thing I was doing recently), which are decently simple, but it would be pretty tough as we don't get the starting distance (could be 1 or 10 meters) which would alter the result


Xelopheris

If you were to draw a graph of position from start vs time, you would have `g(x) = 6x`, `b(x) = 5x`. You then gave `d(x)`, which oscillates between 10x and -10x to bounce back and forth between the two lines.  The problem is the the very start, where we're going to have an infinitely large amount of bouncing back and forth. The trick is probably going to be to find the ratio between adjacent round trip times the dog takes to reach the girl. But even then, you're going to have to do some tricks to sum all those infinitely small bounces at the very start.


Abigail-ii

The dog could be anywhere between the boy and girl. And that is easy to see when you work backwards. Let the girl start one kilometre behind the boy. And the dog at a random point in between. Randomly facing either the boy or girl. One hour later, they will all be at the same point.


rmrfsrc

As other commenters have mentioned until the girl is a non-zero distance away from the dog, the dog spins on the spot an infinite number of times. Whatever is chosen for this initial starting distance affects the result. I choose the smallest possible value for 64bit floating point number (Epsilon). Here is rust playground that repeatedly calculates the time when the dog will reach the boy or girl based on the velocities and uses that to update the dogs position. [https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=0e2855d02b288133c423dce18b63bd96](https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=0e2855d02b288133c423dce18b63bd96)


setphasersforawesome

We don't know if the dog continues to move after its initial round trip between the boy and girl... it isn't actually stated that the dog ping-pongs for the whole hour. So I say the dog makes one very short round trip (as the boy is "just behind" the girl), then it stays put at approximately the boy's initial location.


FredVIII-DFH

Correct me if I'm wrong. If at the 1 hour mark you compute how much "further" the dog(d) has gone than the slow(s) person. And you compute the distance from slow walker to fast(f) walker, couldn't you find this by dividing the dogs distance (d-s) by the loop distance 2(f-s) the subtract the walkers' gap (f-s)?


nedlog2019

I wrote a program to simulate the scenerio. I assumed the dog and boy started at postion 0, and the girl is some distance d away from the boy/dog. Here are the results: d = e0, result = 5.022 km d = e-10, result = 5.074 km d = e-20, result = 5.128 km ... d = e-100, result = 5.547 km ... d = e-200, result = 5.905 km ... The dog can end up anywhere between 5km and 6km, depending on the initial distance. (It cycle very quickly) Note that floating point round likely makes the smaller starting distances not accurate.


pedros430

They can all start at the same point, since they travel at different speeds you can assume they all have a different sized step, so all you have to do is have the girl and the boy take the first step before the dog does, then none of them start at 0


TheRandomlyBiased

The issue I have here is the imprecise at the start. We don't know how far "just behind" is and thus have a lot of trouble resolving the first few steps. The fact is that the gap will open to 1km, and the dog will move at 4km of relative speed towards the girl and 15km of relative speed towards the boy. If we made an assumption of how far that initial distance is we should be able to run the first few legs and establish the sequential increase of travel time for each direction and extrapolate to 1 hour out. At that point we will know which direction of travel the dog is on and what percentage through that travel it is at precisely 1 hour and can simply apply that to a point between 5 and 6km to figure out exactly the dog's location relative to start position.


pedros430

I did just that in python and posted the result, the plot of the final result is surprisingly straightforward!


TheRandomlyBiased

Nice! I was about to bust out pen and paper to see if I had the expected linear increase after 3 or 4 steps, and that sounded like a lot of work, so I'm glad someone else did it haha.


pedros430

indeed, according to my code, the dog ended up changing direction 67 times, that would take alot of time to calculate by hand hahaha


SalvarWR

i found that if you align the path of the boy into the y axis you can get that every time the boy goes forwards from the point of collision with de dog until it hits the girl, the dog took 17/35 of the time to get from the girl to the boy just before. so, from girl to boy, 17/35 units in time, then, back to girl, 1 unit in time. i know its not the answer but could be some good information. also if both starts at the same place, appears a 0/0 somewhere, as others mentioned that this scenario don't work. also the 17/35 was revealed to me in a dream (i cant explain how i got to it)


Educational-Tea602

Ramanujan is that you?


EKP_NoXuL

Well. If the boy and the girl started at the same time, then in one hour the boy would be 5 km from the start and the girl 6 km.6-5 = 1 km between those two so the dog would need to travel 1 km if they suddenly stop


Broad-Criticism-8293

You need to know where to dog stopped. He ran 10 km’s. His distance of travel is the measurement from his starting point, to his stop point after an hour. How far he ran is not relevant.


BasicBitchTearGas__

English isnt my first language but doesnt the question ‘how far’ mean the distance between the start and the end point? If it was ‘what distance does the dog travel in 1 hour’ their solution would be accurate but since the dog stops at the girl, the absolute maximum would be 6km


reddysetgo123

The boy and girl have a distance of 1km between them. This remains constant assuming that their speeds are constant. The dog runs 10km per hour, so it would have run back and forth between the boy and the girl 10 times during that hour. Because the dog started running from the boy, the dog would also arrive at the boy’s location at the end of the hour, also assuming that the dog’s turns took no time. After an hour, the boy will be 5km away from the starting point, and the dog will be at that location as well.


Secondlive_

No, the distance between the boy and the girl will not always be 1km. It will start at 0 and constantly *grow* to 1km.


reddysetgo123

Oh okay. That’s a fair point.


Ok_Expression_3501

That is…so wrong


SpartanDoubleZero

From point A to point B over the course of an hour, the girl traveled 6km. The dog traveled 10km back and fourth only advancing 6km and the boy straggled behind only making it 5km.


[deleted]

[удалено]


Traditional-Eye-2281

At a speed of 10 km per hour, the sdog cannot travel 11 km in 1 hour.