Naked Science Forum

General Discussion & Feedback => Just Chat! => Topic started by: Eternal Student on 12/04/2022 15:20:23

Title: A Short puzzle with dogs.
Post by: Eternal Student on 12/04/2022 15:20:23
Hi.

   Are you bored?  Do you want a short puzzle?  No?  Well here's one anyway.   
It doesn't require much mathematics, I reckon someone who's studied some maths or physics at post 16 years of age should have all they need to solve it.
- - - - - - - - - - - -

Four dogs are in four corners of a square of side length 1. Each dog starts running towards the dog immediately anti-clockwise to it. The dogs start at the same time, they all run at the same speed, and at every moment each dog is running directly towards the neighbouring dog.
(https://i.guim.co.uk/img/media/bdf978bbf7379b4eadaaf881079932711997a9e0/87_313_1688_1012/master/1688.jpg?width=620&quality=85&auto=format&fit=max&s=66cdde3eebe41025a7ef217db35cdf70)
During the pursuit, the dogs will run in a spiral before they all meet in the centre. How far does each dog travel before the group collision?

- - - - - - - - - - - -

Puzzle taken from an article published in the Guardian:   https://www.theguardian.com/science/2019/jun/03/can-you-solve-it-dogs-in-pursuit
   BUT DON'T FOLLOW that link unless you want to see the solution.   

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: chiralSPO on 12/04/2022 16:47:55
Are these dogs point particles that must be co-localized at the endpoint, or do they have some nonzero radius that is less than the "1" specified as the side length?
Title: Re: A Short puzzle with dogs.
Post by: Origin on 12/04/2022 17:53:03
Are these dogs point particles
LOL, good question...
Title: Re: A Short puzzle with dogs.
Post by: Halc on 12/04/2022 19:23:44
The calculus appears pretty complicated, but the picture shows some trivial facts.
First, to answer a prior question, I assume everything is a point, the problem otherwise not really being fully defined.

You've approximately shown nearly half the distance traveled. At the actual point (har!) the distances between them have been halved, the answer is simply twice the distance already traveled.

The remaining distance is a square still, but rotated something like 30 degrees or so. Each time the distance is halved, the square gets rotated by that amount, so the dogs are going to circle each other an infinite number of times before the collision after a total path length.

My attempt: The problem can be broke into tiny pieces, so let's say a dog moves a trivial distance x, almost a straight line. It will curve just a little bit, but for sufficiently small x, a straight line, bringing it exactly x closer to the next dog. This leaves the same initial condition, but rotated and a little closer. Therefore the path length of each dog is exactly 1 by symmetry since each movement of x reduces the distance between them by x.
Title: Re: A Short puzzle with dogs.
Post by: Bored chemist on 12/04/2022 21:17:39
Spoiler alert
Spoiler: show
Halc doesn't seem to know how to use spoiler tags


:-)
Title: Re: A Short puzzle with dogs.
Post by: Petrochemicals on 12/04/2022 22:52:11
Is the answer they will never reach.?
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 12/04/2022 23:13:34
Hi.

1.   Yes they are point particles.
2.   Halc's approach is perfectly reasonable.   Calculus could be used but it really isn't required in this instance.   Halc's second approach is just a minor variation on the solution recommended in the original article, so well done Halc.   I suspect the explanation given on the website is just slightly nicer - but only for people who already know something about velocity and vectors (hence I estimated study post-16 years of age).
3.   There's a full discussion on the Guardian website that was linked to in the first post,   the first page is just a discussion but there is a link from there to another page with a full solution.

   I've never tried using a spoiler.... so let's see if I can copy and paste the most relevant bit in here:

Spoiler: show
   The image of the four spirals, below, helps understand why. At each moment on their paths, the dogs are at four points of a square. The direction in which a dog is headed is therefore at all times perpendicular to the direction in which the dog that it is chasing (and which is chasing it) is headed.
(https://i.guim.co.uk/img/media/140d08d0be068c37956ec419c98871392ae582a6/0_0_1642_1112/master/1642.jpg?width=620&quality=85&auto=format&fit=max&s=3dc076e4d454e9d376364faaefc1694b)
    Consider the view from one of the dogs (the chaser). It is chasing a dog (the chasee) that at every point is moving perpendicular to the line between them. In other words, there is no part of the velocity of the chasee that is taking it further away, or closer to, the chaser beyond the movement of the chaser. As far as the chasing dog is concerned, the chasee may as well be standing still. The length of the total path travelled therefore is the distance between chaser and chasee at the start, which is the side of the square.


Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 12/04/2022 23:34:00
Hi again.

Is the answer they will never reach.?
    Interesting.  The situation is idealised, in reality the dogs probably can't turn arbitrarily sharply, so they might end up chasing each other around in a circle.   However, keeping the problem simple and idealised, they do actually meet in a finite amount of time.
    This also relates to something Halc said:
....so the dogs are going to circle each other an infinite number of times before the collision after a total path length....
    Yes.   It's another example where an infinite set of things happen within a finite amount of time (and distance travelled).

   I'll see if I can find another short puzzle with dogs in a day or two.

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: Petrochemicals on 13/04/2022 09:37:01
Hi again.

Is the answer they will never reach.?
    Interesting.  The situation is idealised, in reality the dogs probably can't turn arbitrarily sharply, so they might end up chasing each other around in a circle.   However, keeping the problem simple and idealised, they do actually meet in a finite amount of time.
   
Given that each dog is on the inside of the dog it chases, logic would dictate that the dogs would catch each other before they reach the centre, that somehow one dog will overtake the other even though they are travelling at the same speed. The theoretical idea of infinite curved paths seems like it relies on other factors, if it was limited only by velocity, when the rate of change equals the dog speed I would think they would be chancing their tails. This is a science forum which just loves things like centrifugal force and ceptripedal accelleration, gravity, free fall etc.
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 13/04/2022 13:32:38
Hi.

Given that each dog is on the inside of the dog it chases, logic would dictate that the dogs would catch each other before they reach the centre, that somehow one dog will overtake the other even though they are travelling at the same speed.
    The ability of the chaser to turn "inside" of the dog they were chasing is what made it possible for them to collide, if that helps.   If all the dogs were forced to follow one track (perhaps the perimeter of the original square) and couldn't just cut across and aim directly for the other dog then they would never have caught each other because they do all have the same speed exactly as you stated.
    The dogs had no idea they would end up at the centre.  They were always just aiming directly for the other dog.   This makes it a bit different to a typical human athletics race where the runners were actually aiming for a fixed position (the finish line) and having an inside track will help because the judges will blow a whistle (or shoot the offender with the starting pistol) if another runner just collides into you.

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 15/04/2022 13:46:53
Hi.

Here's a new short puzzle with dogs:

      You are standing at the centre of a circular field of radius R. The field has a low wire fence around it. Attached to the wire fence (and restricted to running around the perimeter) is a large, sharp-fanged, hungry dog. You can run at speed v, while the dog can run four times as fast. What is your running strategy to escape the field?

   That's it, that's the original wording of the puzzle and it's shorter and neater left this way.   Apply reasonable common sense to answer all the minor questions about how and why the dog moves.   I'll put some details under this spoiler if you want clarification - warning these details might lead you in the direction of a solution.   It would be better if you tried to imagine what is happening yourself first and only then check the first spoiler.
Spoiler: show
(i)   The dog is attached to the wire fence by something like a short piece of rope.  Ignore the length of the rope, it's short.  The person who tied the rope was careless and allowed it to slide along the wire, that's why the dog can run around the whole perimeter.
(ii)  The general idea is that the dog is keen to eat you.  This will happen if you and the dog end up in the same place (so that will be somewhere on the perimeter of the field).
(iii)  The dog will run around the perimeter so as to keep the distance between you and the dog as small as possible.  The dog doesn't have to keep running all the time, for example it will stay stationary if it is already as close to you as it can get.
(iv)  The dog can turn to run the other way around without any significant delay if required.


This puzzle was found on this website:    http://puzzles.nigelcoldwell.co.uk/thirteen.htm
   BUT DON'T FOLLOW  that link unless you want to see the solution.

There's a significant hint for a solution under this spoiler:
Spoiler: show
  Do you feel like you're often running around in circles?   

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: Halc on 15/04/2022 14:34:32
To get this straight, the nasty dog is restricted to the circular path and always moves at 4x your speed in the direction that takes it closer to the point on the circle to which you are nearest.

Seems pretty simple.
Spoiler: show
Run away from the dog. As it picks a direction, you change course and follow a circular path as well. This works fine as long as you're within a quarter of the distance from the center to the edge. So you are capable of keeping the dog at max distance until this point.  Starting at that point, you break for the edge, and angle your path in a 1-4 ratio from the dog's motion, just to buy a little more space.

Is this enough?  Circle of radius 1 and the dog needs to travel 3.14.  I am at 0.25 and need to travel 0.75.  No problem. I don't even need to do the angle bit.


I think a curved path might be optimal and it would seem an interesting problem to determine the max speed that the dog could run before you could not escape the circle. I suspect it's over 5x, but didn't work it out.
Title: Re: A Short puzzle with dogs.
Post by: Annieclo on 15/04/2022 16:27:07
HAHAHAHA:) This is really interesting game..
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 15/04/2022 20:40:44
Thanks @Annieclo
   I'm glad you enjoyed the puzzle.
Title: Re: A Short puzzle with dogs.
Post by: Petrochemicals on 15/04/2022 22:28:11
I believe this is the reverse of the previous conundrum, 1/4 perimeter speed, circular rotation, etc.
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 16/04/2022 01:07:23
Hi.

I believe this is the reverse of the previous conundrum, 1/4 perimeter speed, circular rotation, etc.
   Wow,  I wish I had been that smart.  I can see why the problems do look like they might be related or "dual problems" but actually I haven't done that deliberately.
   It took me long enough to find another puzzle that involved dogs and that's the only link with the previous puzzle I was going for.

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: Bored chemist on 16/04/2022 11:39:31
I believe this is the reverse of the previous conundrum, 1/4 perimeter speed, circular rotation, etc.
What problem is the reverse of what problem?
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 16/04/2022 13:22:39
Hi.

What problem is the reverse of what problem?
   None of them.
I can see why the problems do look like they might be related or "dual problems" but actually I haven't done that deliberately.

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 16/04/2022 21:37:30
Hi.

   An earlier post from someone has been seriously edited to become what appears to be an advert.  Although the original message was marked with a "thanks" or similar annotation from me, it was not my intention to promote a casino.  That "thanks" annotation has been withdrawn.

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: Petrochemicals on 16/04/2022 21:51:12
Hi.

What problem is the reverse of what problem?
   None of them.
I can see why the problems do look like they might be related or "dual problems" but actually I haven't done that deliberately.

Best Wishes.
Approach the dog keeping just out of reach and beat it to death with a stick.
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 16/04/2022 22:08:52
Hi.

It probably is time to make the solution available.
   Fortunately that's easy.  You can just go and read Halc's earlier post and uncover the spoiler they put there.

   There are many possible solutions or ways to escape from the dog.  There's a bit more of a discussion here on the website where the puzzle came from:
http://puzzles.nigelcoldwell.co.uk/thirteen.htm
I'm very cautious about suggesting anyone should follow a link - You DO NOT have to.  Halc's explanation is good enough and you can just read that off this website.   The link is here mainly because it's only fair to acknowledge the original author etc.

Approach the dog keeping just out of reach and beat it to death with a stick.
     That's a possible solution but not one I would recommend.  Anyway, I never said there were any sticks in the field.

I don't think I know any more short puzzles with dogs but I'll see what I can do in the near future.

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: Petrochemicals on 16/04/2022 22:43:18
Hi.
.

Approach the dog keeping just out of reach and beat it to death with a stick.
     That's a possible solution but not one I would recommend.  Anyway, I never said there were any sticks in the field.

You never said that there were not.

Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 12/05/2022 14:42:54
Hi.

   It might be time for a new and suitably short puzzle with dogs.

   Find the shortest route for a thirsty dog going home.

The dog starts  100 m  west of his home and  10 m North of it.    There's a river running west to east which is 30 m south of his home.   The dog must get home and get to river at least once on the way.    What is the shortest route?


Just to help I've given you a diagram.... but you should really draw it yourself.   Here's a possible route, not necessarily the shortest...

* dog-river2.png (44.03 kB . 1121x549 - viewed 2307 times)

Your task is to describe the shortest route.

Best Wishes.

(LATE EDITING:  Extra credit if you don't use calculus.)
Title: Re: A Short puzzle with dogs.
Post by: Halc on 12/05/2022 14:52:34
I'm still working on the circle problem, but have had almost no time to do so. It's coming.

Maybe the dog can shorten the effort by jumping on a board floating on the river, saving steps. I presume such complications are not part of the problem.
This problem has a physical solution:
Spoiler: show
Just put pegs in a board where the house and dog are, and a rod representing the river. Tie a string to the dog and the house looped around the rod and pull it tight. It will move to the shortest path, which momentarily touches the river 4/7th of the way, or ~43 m west of the house.

Title: Re: A Short puzzle with dogs.
Post by: Halc on 12/05/2022 15:01:04
Another physical solution:
Spoiler: show
Replace the river 'rod' with a mirror and shine a laser (a surveyors laser that leaves a line on the ground) from the dog to the reflection of the house
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 12/05/2022 15:12:17
Hi.

   Well that is a fast response, @Halc .
I like the practical approach you suggested with the string.  It obviously works this time but technically it only shows that you have the shortest route available which doesn't require any intermediate lengthening first.   Or to say it another way, you have reached a local minimum not necessarily a global minimum.

   I'm not going to comment on the laser idea, it's ok but we'll leave it under the spoiler for a day or two.

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: Halc on 12/05/2022 15:27:49
you have reached a local minimum not necessarily a global minimum
OK, you wait until a flood occurs and the water reaches just to the straight line between dog and house.
If that's on the table, you might as well wait for the flood to get even worse and perhaps carry the house much closer to the dog, which isn't too far off from my 'riding the raft' idea.
Title: Re: A Short puzzle with dogs.
Post by: Colin2B on 12/05/2022 18:37:43
Ok, I’m limited on wifi time available so complete guess (based on other physics)
I describe route by 2 straight lines, one towards the river which when hits river 2nd line goes to home. Angles on either side of perpendicular to river have to be the same.
Title: Re: A Short puzzle with dogs.
Post by: Rolerwill on 13/05/2022 21:46:02
In theory the will never reach each other, IRL it depends when one dog starts increasing its speed or the other(s) start decreasing it.
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 13/05/2022 23:34:08
Hi @Rolerwill ,

    I'm not sure I've spoken to you before.  Welcome to the forum.
I think you might be talking about the first ever puzzle discussed on this thread.    There are some answers already presented for that.   It's also just an idealised problem and in real life things would get in the way.   If you're interested, the discussion and solutions presented by the Guardian newspaper will probably save time rather than reading through the whole of this thread. 
   https://www.theguardian.com/science/2019/jun/03/can-you-solve-it-dogs-in-pursuit  .

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: alancalverd on 14/05/2022 00:14:55
Each dog starts running towards the dog immediately anti-clockwise to it.
Apologies for not addressing the problem mathematically, but the experimental scientist knows that whilst small children follow a pursuit curve, dogs are actually better hunters and tend to run in a straight line towards a predicted intercept. Eventually, some children learn the trick and turn into good cricketers or footballers. David Beckham's exceptional ability as a midfielder was being able to make long passes to an intercept so that wingers and strikers could run on to the ball at full speed in a straight line.

Late edit: it's also the art of a fighter controller!
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 14/05/2022 19:23:03
Hi.

   It's probably time to discuss the solution.  I first saw this puzzle (not sure it had a dog) in a magazine produced by Imperial College, London University where the writing team had spent a little time examining the approaches used by various undergraduates of different disciplines.

One Mathematician started at #0,   most Mathematicians and Physicists started at #1,   most others tended to skip straight to #2.   Less than half the people of any discipline used #3  (they used calculus instead).

0.    Banish the infinite  A finite length route exists (e.g. one is shown in the digram with the question).  All routes we consider from now on behave sensibly.  All routes we consider have finite length between all points along the route (else it can't be the shortest route).

1.    Establish that the dog only goes to the river once   
    If it intersects the river at two (or more) points, R1 ≠ R2  then pick any one point, R1.   Just draw straight lines from the start to R1 and from there to the dog house.   That new route satisfies our criteria and cannot be longer than the old route - just by the basic definition of a straight line in Euclidean Geometry as the unique shortest path between two points.   It's possible to show that the new route is actually shorter but only a few Mathematicians bothered, most people just claimed it.  The basic proof is obvious... the dog must get back to river at R2 so they deviated from the straight line sections somewhere.  (We did actually need step #0, if the point R on the river was infinitely far away then the dog can run along the river for a while and that's perfectly co-linear with straight line sections to the dogs home etc.)

2.   It should be clear that every finite route can be reduced to two straight line sections with three points of interest, the start (S), the point (R) on the river and the dogs home (H) at the end.   These are the only contenders for a shortest route we ever need to consider again.   Points S and H are fixed, the only issue is where you put the point R along the river.
    At this stage, over half the people (regardless of their discipline of study) continued by using calculus.  Set up a total distance function D with a single variable, x, which is the x co-ordinate of the point R along the river.   Find the local minimum.   That works.   It only finds a local minimum but you can improve on this and establish it's a global minimum just by sketching the function  etc.   (I don't think many people actually did bother).

3.   It's not necessarily "better" and it might actually take just as many lines to explain but you can, of course, solve this without calculus.
 [ Invalid Attachment ]
    Just consider a related problem which is finding the shortest path from S to  H'  that crosses the river at least once.  Where H' is another dogs home located so that it is the reflection of the proper home H in a mirror along the river.  Fill in the details... Just as in the original problem it reduces to placing a point R on the river and straight line sections from S to R and from R to H'.    The total Distance D for the original problem =  SR + RH,  while the total distance for the reflected problem is SR + RH'    but  due to the triangles being identical   RH = RH'   and so these total distances are always the same.  Considering optimal solutions for either problem amounts to nothing more than varying the position of R along the river and evaluating the associated total distance D (or the identical value of D').
     Proving the existence and uniqueness of an optimum solution for the reflected problem is easy...  any path from S to H' will cross the river at least once.... so that problem reduces to find the shortest path from S to H' .   By Euclidean geometry, that's a straight line.  ∴ R can only be placed at one point on the river for an optimal solution to the reflected problem.
    That's it,  dot the i and cross the t .   The existence and uniqueness of an optimal solution for the original problem follows.
   Simple geometry will then tell you where R must be placed,   @Halc  said ~43m west of the house,  @Colin2B  said to use the angle of incidence = angle of reflection.   Well done to those two and especially for spotting that reflection would help instead of going straight for the calculus.

- - - - - - - - - - -
    If you were developing these ideas, you could have the dog go for a swim in the river and be slower when wet.  To solve these problems you need a woofraction index, a ratio of speeds while wet and dry.

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: alancalverd on 15/05/2022 09:40:34
I've always wondered whether "proper" mathematicians allowed the use of obvious symmetry and reflection as tools in a formal proof. I was so inspired in my youth by Kasner and Newman's "Mathematics and the Imagination" that I married the only girl I ever met who shared that enthusiasm (both, it turned out, recommended by our electrical engineer fathers). Like a good novel, it began with a surprise - the use of obvious symmetry to simplify a classic proof.

The dog and river problem actually has a practical application in navigation. If you are sailing or flying to a visible destination with an unknown cross wind or tide, simply aiming directly at the target will take you on a spiral pursuit curve, arriving pointing directly into wind. The trick is to maintain your original compass heading for half the distance, then turn through four times the difference between that and the new bearing. It's oddly counterintuitive but definitely optimal.
Title: Re: A Short puzzle with dogs.
Post by: Petrochemicals on 15/05/2022 13:13:46
Hi.

   It might be time for a new and suitably short puzzle with dogs.

   Find the shortest route for a thirsty dog going home.

The dog starts  100 m  west of his home and  10 m North of it.    There's a river running west to east which is 30 m south of his home.   The dog must get home and get to river at least once on the way.    What is the shortest route?



Straight to the dog house and vertically down to the river.
Title: Re: A Short puzzle with dogs.
Post by: Eternal Student on 16/05/2022 00:55:02
Hi.

I've always wondered whether "proper" mathematicians allowed the use of obvious symmetry and reflection as tools in a formal proof.
     At school, sure no problem.   You just had other problems to worry about, like whether an unusual proof would actually be on the mark scheme.   I mean, if there's a small error then even if the marker did spend time to examine what you tried, if it wasn't on the mark scheme and what can they do?

     At university, it depends on whether you were doing Pure Mathematics or Applied mathematics.   It general, it's OK and potentially very good - but there might be a shift in how you present the information.  In pure maths there are numerous things that are fairly obvious results when described in plain English but take undergraduates a week's coursework to set up and prove formally.   If you want to keep a Pure Mathematician busy, ask them if "this result" can be proven without Euclidean Geometry.

....that I married the only girl I ever met...
    That bit was well written.  Congratulations, it sounds amazing.

Straight to the dog house and vertically down to the river.
   I guess that might work.   The original problem did ask you to find the shortest route for a thirsty dog to get home.  The dog did get home and it was thirsty.

Best Wishes.
Title: Re: A Short puzzle with dogs.
Post by: Petrochemicals on 16/05/2022 10:36:43
Straight to the dog house and vertically down to the river.
   I guess that might work.   The original problem did ask you to find the shortest route for a thirsty dog to get home.  The dog did get home and it was thirsty.

Best Wishes.
It did, and it is possibly the shortest distance to answer the riddle. Conversely with the dog being thirsty it may be the quickest (shortest duration) for the dog to arrive immediately at the river and then toddle off home as the dog probably will function far better once refreshed.
Title: Re: A Short puzzle with dogs.
Post by: Bored chemist on 16/05/2022 10:59:20
What sort of "home" for a dog doesn't provide water?
Title: Re: A Short puzzle with dogs.
Post by: Rolerwill on 27/07/2022 18:21:45
I was so inspired in my youth by Kasner and Newman's "Mathematics and the Imagination" that I married the only girl I ever met who shared that enthusiasm

I'm impressed by your level of inspiration of this book and commitment. Just for humor, what would've happened if you met another girl with the same (or more) level of enthusiasm for "Mathematics and the Imagination"?
Title: Re: A Short puzzle with dogs.
Post by: Rolerwill on 27/07/2022 18:23:29
What sort of "home" for a dog doesn't provide water?

The common kind of home where no matter if you provide the best water, food or comfort to your dog, he/she will always go out and drink dirty water from a puddle and chew on a death squirrel just because  ;D
Title: Re: A Short puzzle with dogs.
Post by: alancalverd on 27/07/2022 19:31:39
I was so inspired in my youth by Kasner and Newman's "Mathematics and the Imagination" that I married the only girl I ever met who shared that enthusiasm

I'm impressed by your level of inspiration of this book and commitment. Just for humor, what would've happened if you met another girl with the same (or more) level of enthusiasm for "Mathematics and the Imagination"?
No contest. I decided on the name of the woman I was going to marry when I was 5 years old and she hadn't been conceived. I fell in love at first sight, and never met anyone with the same name until after she died. We discussed K&N on our first date.