Previous in Forum: Obsolete Stores for Solar Cells   Next in Forum: Best Glue to Hold in Marine Environment
Close
Close
Close
27 comments
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135

Dog and Rabbit Problem

08/11/2024 4:43 PM

About 25 years ago I saw the following problem in a magazine.

A dog sees a rabbit 100m away to the east. The dog can run at 10m/s, the rabbit at 5m/s. The rabbit sets off running north, at the same time the dog sets off, always running towards the rabbit.

At what time does the dog catch the rabbit?

An answer was given in the next edition of the magazine, without any derivation. I’ve forgotten the answer, but several times since I’ve tried to solve it (using calculus), without success.

I’ve now tried another approach, using XL to calculate the dog’s position and direction over a series of small time increments. I’m confident the result is correct, or at least a very close approximation, but I doubt very much that was the method intended by the problem setter.

If anybody can give an analytic solution to this I would be most interested.

__________________
Give masochists a fair crack of the whip
Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be Good Answers:

These comments received enough positive ratings to make them "good answers".
Guru

Join Date: Mar 2007
Location: by the beach in Florida
Posts: 33172
Good Answers: 1804
#1

Re: Dog and Rabbit Problem

08/11/2024 9:28 PM

I would look at it as progress towards the rabbit is equal to the difference in speed, plus the starting distance between them, and make a triangle that intersects at the meeting point...that should give you all the information to solve the distance...

http://sections.maa.org/okar/papers/2006/lloyd.pdf

__________________
All living things seek to control their own destiny....this is the purpose of life
Register to Reply
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135
#3
In reply to #1

Re: Dog and Rabbit Problem

08/12/2024 9:17 AM

That's on the assumption that the dog anticipates where the rabbit will get to and runs in a straight line to that point. That's quite a simple problem and I worked it out to give a bit of a check on the result from iteration.

But thanks for the link, it's very useful. Took a bit of fiddling about to get it to suit the problem, but then I plotted the curve from the formula and we agree spot-on.

A minor thing - it says at one point k = fox's speed/rabbit's speed, but later if k > 1, which corresponds to the rabbit running faster than the fox. I used k = 2

__________________
Give masochists a fair crack of the whip
Register to Reply
5
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9712
Good Answers: 1113
#2

Re: Dog and Rabbit Problem

08/11/2024 9:53 PM

I think this is correct. I wrote a simulation in Octave (free Matlab).

Expanding above figure...

The dog's initial position is at (0,0), and initial velocity (10,0). The rabbit's initial position is (100,0) and initial (constant) velocity is (0,5). I plotted with a step size of 0.01 seconds and 2000 iterations. When the dog's position hits 100 meters east, the value of k is 1335, elapsed time is 13.35 seconds.

Register to Reply Good Answer (Score 5)
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135
#4
In reply to #2

Re: Dog and Rabbit Problem

08/12/2024 12:16 PM

Thanks for that. Your simulation looks identical to mine. Interesting that there is an analytical solution, but it's beyond my calculus skills to get the result in SolarEagle's link. I'd be surprised if the original question setter expected people to do it that way, but it was a Mensa magazine, so maybe!

I'd like to attach my graph, but I can never work out how to do it on CR4. I saved it as a pdf but no joy. Can you give me any hints? I can copy and paste a photo (JPG) but it doesn't work with other docs.

__________________
Give masochists a fair crack of the whip
Register to Reply
Guru

Join Date: Mar 2007
Location: by the beach in Florida
Posts: 33172
Good Answers: 1804
#10
In reply to #4

Re: Dog and Rabbit Problem

08/12/2024 7:32 PM

Just do a screen capture with your graph on display and paste it into paint as a jpg....save it as a file and use file path to post...

__________________
All living things seek to control their own destiny....this is the purpose of life
Register to Reply
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9712
Good Answers: 1113
#11
In reply to #4

Re: Dog and Rabbit Problem

08/12/2024 9:08 PM

I save my graphs as jpg pictures out of Octave and then use the camera widget in this box to post it. If you can't save your graph as a gif or jpg, you might be able to use "Snipping Tool" (in Windows) to save a picture.

Register to Reply
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135
#13
In reply to #11

Re: Dog and Rabbit Problem

08/13/2024 6:29 AM

I typed this but got error message below when I tried to send it.

You have encountered an error on our site. We're sorry for the inconvenience.

A transcript of this error has automatically been sent to our quality control group and the problem will be addressed.

Please hit the "Back" button on your browser and try your request again.

If the problem persists, please try again later.

Thanks for that. Managed to add graph below, but I had to print it, then scan it to get a jpg, which I can copy and paste. Seems a bit of a rigmarole, I must be missing something. I can't see any other way to get a jpg, and copy/paste doesn't work with other formats for some reason.

Anyway, my curve is identical to yours, the diagonal line is if the dog intercepts. The curve from the formula is also there, but it coincides with the simulation except near the end.

Thanks to everybody who commented.

__________________
Give masochists a fair crack of the whip
Register to Reply
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9712
Good Answers: 1113
#16
In reply to #4

Re: Dog and Rabbit Problem

08/13/2024 4:47 PM

With the simulation, I've come up with the formula for the time it takes the dog to catch the rabbit. It works only for when the dog's speed is twice the rabbit's speed.

Let the rabbit's speed be Vr (m/s), and the dog's speed Vd = 2 x Vr (m/s).

The rabbit's distance at the start is D meters from the dog's location, 100 meters in the example.

Time=(2*D/(3*vr)

In the example D=100 m, vr=5 m/s, Time=13.333 seconds

Register to Reply
Guru

Join Date: Oct 2006
Location: 44.56024"N 15.307971E
Posts: 7758
Good Answers: 264
#17
In reply to #16

Re: Dog and Rabbit Problem

08/13/2024 5:32 PM

What if the dog passes near a tree on his way to the rabbit?

You will have to allow time for raising and lowering leg,drain time,restart acceleration rate with a slightly lighter load,lots of variables.

__________________
"A man never stands so tall as when he stoops to help a child." "Never argue with a stupid person.They will drag you down to their level and beat you with experience" "Homo homini lupus"
Register to Reply Off Topic (Score 5)
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135
#18
In reply to #17

Re: Dog and Rabbit Problem

08/14/2024 8:41 AM

And if he spots a bitch on the way, all bets are off!

__________________
Give masochists a fair crack of the whip
Register to Reply Off Topic (Score 5)
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135
#19
In reply to #16

Re: Dog and Rabbit Problem

08/14/2024 8:58 AM

Nice! My simulation works differently, so can't calculate time, apart from seeing what time corresponds to dog's 100m easterly travel.

I'd guess you could come up with a formula for time with other values of D and vr, if those values were used in the simulation.

__________________
Give masochists a fair crack of the whip
Register to Reply
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9712
Good Answers: 1113
#20
In reply to #19

Re: Dog and Rabbit Problem

08/14/2024 12:41 PM

I don't know how your simulation works, but what I did is to advance time (Δt) one increment at a time, adjusting the canine velocity vector, Vd, at each iteration, the same magnitude re-aimed at the updated position of the rabbit. I got the travel time by multiplying the loop counter by Δt and the eastward distance measurement by summing the horizontal component of Vd * Δt. I set a flag so that when it reached 100 meters, it records the time once only. (The dog is fixated on that rabbit and once it reaches it, continues orbiting.)

Register to Reply
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135
#22
In reply to #20

Re: Dog and Rabbit Problem

08/15/2024 7:32 AM

In my simulation, I have time interval 0.1s, and at the start of each interval calculate the angle between the line from dog to rabbit and the x-axis, θ = atan((rabbit's y-value minus previous)/(100m minus dog's previous x-value)).

Hypotenuse is constant, h = dog speed*time interval, so new x = h*cos θ + previous, new y = h*sin θ + previous.

Clearly both our approaches work.

In the link, I just about understand the calc in Special Case of Pursuing a Straight Line Target, but I'd never have got there from first principles. Interesting though.

__________________
Give masochists a fair crack of the whip
Register to Reply
Guru
Hobbies - DIY Welding - Don't Know What Made The Old Title Attractive... Popular Science - Weaponology - New Member United States - US - Statue of Liberty - 60 Year Member

Join Date: Apr 2009
Location: Yellowstone Valley, in Big Sky Country
Posts: 7153
Good Answers: 290
#21
In reply to #19

Re: Dog and Rabbit Problem

08/14/2024 2:56 PM

I am unable to post a link, or I would do so.

Search for ‘Radiodrome’.

A radiodrome is the specific type of pursuit curve we are considering here.

__________________
When you come to a fork in the road, take it. (Yogiism)
Register to Reply
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135
#23
In reply to #21

Re: Dog and Rabbit Problem

08/15/2024 10:07 AM

Wiki link below seems to work. There's also stuff on pursuit curves on the web.

Radiodrome

__________________
Give masochists a fair crack of the whip
Register to Reply
Guru
Hobbies - DIY Welding - Don't Know What Made The Old Title Attractive... Popular Science - Weaponology - New Member United States - US - Statue of Liberty - 60 Year Member

Join Date: Apr 2009
Location: Yellowstone Valley, in Big Sky Country
Posts: 7153
Good Answers: 290
#24
In reply to #23

Re: Dog and Rabbit Problem

08/15/2024 3:58 PM

Thanks for the link.

I’m having an issue posting things, I believe this to be related more to my antique seven year old device than to CR4.

__________________
When you come to a fork in the road, take it. (Yogiism)
Register to Reply
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135
#25
In reply to #24

Re: Dog and Rabbit Problem

08/16/2024 12:26 PM

I thought I'd sent this already, but either I forgot to hit send or there's another problem with the site.

So am I with posting issues. When I try Insert Image I can browse for a file, but when I click OK I get "There was an error uploading the image."

I attached a photo (jpg) some years ago, can't remember whether it's ever worked with other types. But trying it now, with my simulation or a random photo as a test, get message in #13.

Edit - seems to have gone OK this time.

__________________
Give masochists a fair crack of the whip
Register to Reply
Guru

Join Date: Oct 2006
Location: 44.56024"N 15.307971E
Posts: 7758
Good Answers: 264
#5

Re: Dog and Rabbit Problem

08/12/2024 12:32 PM

It is a vector quantity,like crossing a river that is running 5mph in a boat that is running 10mph...also similar to a hunter leading a flying bird.

__________________
"A man never stands so tall as when he stoops to help a child." "Never argue with a stupid person.They will drag you down to their level and beat you with experience" "Homo homini lupus"
Register to Reply
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135
#6
In reply to #5

Re: Dog and Rabbit Problem

08/12/2024 12:52 PM

But the analogy with a river crossing is if the dog anticipates where the rabbit will get to and runs in a straight line to that point. A much simpler problem.

__________________
Give masochists a fair crack of the whip
Register to Reply
Guru
Hobbies - DIY Welding - Don't Know What Made The Old Title Attractive... Popular Science - Weaponology - New Member United States - US - Statue of Liberty - 60 Year Member

Join Date: Apr 2009
Location: Yellowstone Valley, in Big Sky Country
Posts: 7153
Good Answers: 290
#8
In reply to #5

Re: Dog and Rabbit Problem

08/12/2024 4:10 PM

The dog has no grasp of plane geometry, time, or distance. His only actionable information is where the rabbit is right now.

This results in the pursuit curve shown in Rixter’s comment.

__________________
When you come to a fork in the road, take it. (Yogiism)
Register to Reply
Guru

Join Date: Oct 2006
Location: 44.56024"N 15.307971E
Posts: 7758
Good Answers: 264
#7

Re: Dog and Rabbit Problem

08/12/2024 1:47 PM

OK,I will take a SWAG at it:,no formulas,no graphs,just Kentucky Windage: 11.180339 seconds after the start,approximately.

__________________
"A man never stands so tall as when he stoops to help a child." "Never argue with a stupid person.They will drag you down to their level and beat you with experience" "Homo homini lupus"
Register to Reply
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135
#9
In reply to #7

Re: Dog and Rabbit Problem

08/12/2024 4:31 PM

I know it was a joke, but it must be more than 11.18 seconds because it takes 11.55 seconds on a straight run interception basis. From the data in SolarEagle's link it comes to 13.3333 seconds.

__________________
Give masochists a fair crack of the whip
Register to Reply
Guru
Engineering Fields - Nuclear Engineering - New Member

Join Date: Sep 2009
Location: Louisville, OH
Posts: 1826
Good Answers: 35
#12
In reply to #7

Re: Dog and Rabbit Problem

08/12/2024 11:37 PM

Anything after 11 seconds is beyond "approximately." But you were teasing us I assume.

__________________
Lehman57
Register to Reply
Guru

Join Date: Oct 2006
Location: 44.56024"N 15.307971E
Posts: 7758
Good Answers: 264
#14
In reply to #12

Re: Dog and Rabbit Problem

08/13/2024 6:34 AM

A SWAG I said,son,A SWAG! (Foghorn Leghorn)

__________________
"A man never stands so tall as when he stoops to help a child." "Never argue with a stupid person.They will drag you down to their level and beat you with experience" "Homo homini lupus"
Register to Reply
Guru

Join Date: Oct 2006
Location: 44.56024"N 15.307971E
Posts: 7758
Good Answers: 264
#15

Re: Dog and Rabbit Problem

08/13/2024 6:40 AM

On a side note,it is amazing that the human brain can do of the calculation instantly and put the body and appendages in the right position and place at the right time.Outfielders catching a ball,half court basketball dead ringer,in the net,nothing but net while running full blast.Brains are the most sophisticated computers on the planet.

Even a dog catching a Frisby can do this easily.

__________________
"A man never stands so tall as when he stoops to help a child." "Never argue with a stupid person.They will drag you down to their level and beat you with experience" "Homo homini lupus"
Register to Reply Off Topic (Score 5)
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9712
Good Answers: 1113
#26

Re: Dog and Rabbit Problem

08/18/2024 5:53 PM

Here is a good explanation of the solution to the dog and rabbit problem:

https://www.researchgate.net/publication/1899909_The_dog-and-rabbit_chase_problem_as_an_exercise_in_introductory_kinematics

You can compute the intercept time for any values of distance, rabbit-speed and dog-speed, provided that dog-speed > rabbit-speed.

The formula is: Time = (Distance x Vdog) / (Vdog2 - Vrab2)

The table below is the intercept time for values of Vdog (horizontal) vs Vrab (vertical) for a distance = 100 meters.

vrab v || vdog->12345678910
1066.666637.526.666720.833417.142914.583412.698511.2510.1011
20059.999833.333323.809518.7515.555613.333411.688310.4167
300057.142331.249922.222217.514.545512.510.989
4000055.554829.999921.212116.666713.846211.9048
50000054.544529.166220.512816.071413.3333
600000053.845128.570919.999915.6249
7000000053.332128.124319.6076
80000000052.939727.777
900000000052.63
100000000000
Register to Reply
Guru

Join Date: Jul 2005
Location: Stoke-on-Trent, UK
Posts: 4435
Good Answers: 135
#27
In reply to #26

Re: Dog and Rabbit Problem

08/19/2024 6:02 AM

Thanks for that, very interesting. So it's easy to calculate the time, and with that, the distances of each at point of contact. Harder to calculate the dog's trajectory.

The original question just asked for the time, if I remember right, and may have assumed people would know the formula, or work it out.

__________________
Give masochists a fair crack of the whip
Register to Reply
Register to Reply 27 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be Good Answers:

These comments received enough positive ratings to make them "good answers".
Copy to Clipboard

Users who posted comments:

Codemaster (11); Doorman (3); HiTekRedNek (5); Lehman57 (1); Rixter (5); SolarEagle (2)

Previous in Forum: Obsolete Stores for Solar Cells   Next in Forum: Best Glue to Hold in Marine Environment

Advertisement