Results 1 to 40 of 40

Thread: Tough Brain Teaser (or is it?)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391

    Tough Brain Teaser (or is it?)

    Hello everyone,


    I came across a problem posted on a brain teaser website a while back (I no longer have the address) that I wanted to share with you. It took me a long time to solve it and the solution I came up with was rather tedious. When I checked the solution I found that my answer was correct but apparently I had taken a very difficult path towards solving the problem. I still don't understand how they arrived at their solution.

    Anyway, I figured I would post the problem here. Maybe one of you guys will see an easy solution to this problem. If not, maybe you'll like the challenge of solving it the hard way. Enjoy...

    Oh, numerical solutions are good, but I think the general solution is a bit more interesting. But whatever floats your boat I guess ....


    Here goes:

    The Wolf and the Chicken:

    A wolf and a chicken begin separated by a distance of 100 meters. The wolf begins to chase the chicken. However, the chicken is restricted to running in a direction that is perpendicular to the line that is defined by the initial starting points of the wolf and chicken (so, if initially the wolf is 100 meters north of the chicken, then the chicken may only run in a straight line from its starting point directly towards the east). The wolf is also restricted. He must always run directly at the chicken. He is always directly facing the chicken as he runs. If the chicken can run 3 m/sec and the wolf can run 4 m/sec, how far does the chicken get from its starting point before the wolf catches him.


    Hope that isn't confusing.

    Enjoy!

  2. #2
    Hyperactive Member
    Join Date
    May 2002
    Location
    Chicago
    Posts
    271
    Is the chicken always running perpendicular to the wolf, or is she always running east? I think they are both running around in circles. Is the answer a whole number like 75m?
    Sometimes what you're looking for is exactly where you left it.

  3. #3
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    err...

    West is also perpendicular to the wolf, how does the chicken decide which perpendicular direction to run in? Is it allowed to change direction?

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391
    JohnVB6: The chicken is always running east in a straight line so they do not run in circles. The answer is not a whole number.

    Judd: You're right, it could also be west. In terms of the problem it doesn't matter. The chicken cannot change directions however. It must always move in a straight line, directly east or
    west from its starting point. Choose whichever direction you want, but only one.
    Last edited by wy125; Jun 25th, 2002 at 05:59 AM.

  5. #5
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Not sure but....

    Sounds like a double integration problem to me. The wolf must begin to approch the chicken asymptotically, in some sort of exponential decay curve...

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  6. #6
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337
    Possibly...

    Integrate the wolf's position wrt to that of the chicken inside an integration over time? Until the wolf's x, y coordinates coincide with the chickens...

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  7. #7
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337
    Is the answer 37.796s?

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391
    Judd:

    No, that's not it. Are you trying to do it numerically?

  9. #9
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Unhappy Nope!

    I'm trying to remember enough trig/calculus to find the analytic solution.

    I'm trying to come up with the time based function for the wolf's movement, knowing that the length of the arc is 4t for every 3t of chicken movement. Ultimately, I'm trying to work out the time based equation for 'y' (the distance 'south' that the wolf has moved). Then when y = 100, you can work out t and hence x (the distance the chicken has moved).

    I'm of the distinct impression that I can't actually remember enough maths to figure this out ...

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  10. #10
    sql_lall
    Guest

    Talking A paradox??

    I'm not sure, but if you work this one out like THat guy chasing the tortoise, i think the wolf will never catch it.

    However, it you work it out properly, there should be an answer, as most missiles use this technique of constantly changing direction.

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391
    sql_lall:

    The wolf does catch the chicken since he runs faster.

  12. #12
    Addicted Member
    Join Date
    Feb 2001
    Posts
    198
    He'll definitely catch him, somewhere between 37.796 and 100s.
    I'm with Judd at this point.

  13. #13
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Talking yup

    t must be greater than 25s at least

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  14. #14
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Gradient

    You really need to be able to work out the equation for the rate of change of the gradient of the path on which the wolf runs.

    But I can't.

    Wher is Guv when you need him?

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  15. #15
    Hyperactive Member
    Join Date
    May 2002
    Location
    Chicago
    Posts
    271
    I guess I also tried this incorrectly because I get Judd's answer,
    Chicken runs for 37.79s = 113.389m. Obviously, the wolf runs 1/4 the circumference of a parabola with a wide side of 6m/s and a short side of 200m or vice-versa.
    Sometimes what you're looking for is exactly where you left it.

  16. #16
    New Member
    Join Date
    Jun 2002
    Location
    Netherlands
    Posts
    1
    i guess you can do it by the numbers.

    Looking at it per sec. you can determine the new angle of
    the wolf is approaching target.
    t=1 :
    arctg(angle) = x / y = 3/100
    Then determine de x and y of the Place vector of the wolf.
    Xwolf = 4 * sin(arctg(3/100))
    Ywolf = 4 * cos(arctg(3/100))

    t = 2 :
    now you can do the same for the new triangle.
    to get new angle:
    arctg(angle) = x / y
    where x has become : 6 - 4 *sin(arctg(3/100))
    y : 100 - 4 * cos(arctg(3/100))
    determine x and y of this new vector

    and on and on...

    maybe you can extrapolate it in a function with t and angle.

    but i don't see it.

  17. #17
    Hyperactive Member
    Join Date
    May 2002
    Location
    Chicago
    Posts
    271
    C'mon, we just got to find the formula that will cancel out the seconds in the equation. distance=speed * time
    Sometimes what you're looking for is exactly where you left it.

  18. #18

  19. #19

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391
    NotLKH has the correct solution. Numerical or analytical?

    JohnVB6 has the right idea.

  20. #20
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397

    Numerical VB Programming.

    Now, How about altering the Problem, so that the Wolf and Chicken
    start 10 LightSeconds from each other, the Wolf can run at
    4 tenths of a LightSecond per second, The Chicken can run at 3
    tenths of a LightSecond per Second, And you have to take into
    account the Lag Between the Movement of the Chicken and the
    actual time the Wolf sees the Chicken Move.


  21. #21

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391
    Hey whatever floats your boat

  22. #22
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    Since it seemed my progie worked, I plugged in 2 more sets of
    value for WolfSpeed and ChickenSpeed. It seems that,
    developing some equations and then testing them out with
    furthur data sets, and double checking against my progie, the
    following is the generic answer.

    Code:
    Assigning the following constants to their respective terms:
    		Wolf Speed 				= Ws
    		Chicken Speed 				= Cs
    		Initial distance Between Wolf and Chicken	= WC_d
    		Final Travel Distance of the Chicken 	= C_d
    		Final Travel Distance of the Wolf		= W_d
    
    Then, it seems that:
    		C_d 	= Ws*Cs*WC_d / ( Ws2 – Cs2 )
    		W_d 	= Ws2*WC_d / ( Ws2 – Cs2 )
    Is this right?

  23. #23
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    I'll have a look at an analytical approach. It's my supper time now so I'll post back tomorrow evening...
    There are 10 types of people in the world - those that understand binary, and those that don't.

  24. #24

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391
    NotLHK:

    That's very impressive. You got the correct answer, but I'm not exactly sure how you did it? Did you try various forms until you got the correct answer? That's quite interesting. It looks like a difficult equation to just come up with by looking just examining data.

    Good job.

    It took me a long time to solve it analytically. And like I said before I can't understand how the original 'easy' solution was arrived at. Hopefully, someone will figure it out.

  25. #25
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    The way I developed the formula was somewhat simple.

    Since I had the data for Ws = 4, Cs = 3, I decided to try
    Ws = 2, Cs = 1, thinking that there could be a pattern revealed
    useing such a simple set. And there was. I placed the data into
    excel so you can see for yourself:

    Attached Images Attached Images  

  26. #26
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    As you can see, with {1,2}, it jumps right out at you that
    cfinal chickan distance plus the total distance the wolf traveled to
    catch the chicken equals 200, twice that of the initial seperation.

    Once I saw that, it was obvious that with {3,4}, the sum of the two equaled 400. So, it seemed that

    C_d + W_d = Ws*WC_d

    And, we also know that {Since Cs*time = C_d, and Ws*time = W_d}

    the ratio Cs/C_D = Ws/W_d, since the travel time for the two are identical.
    So, Solveing for independant equations for C_d and W_d, in terms of Cs, Ws, and WC_d, I got the following:

    C_d = (Cs*Ws*WC_d)/(Cs+Ws)
    W_d = (Ws*Ws*WC_d)/(Cs + Ws)

    However, Once I saw that, I knew something was wrong.
    It was apparant that if the chicken and the wolf ran at the same speed, the wolf would still catch the chicken.

    Hmmm.

    So, I then deceided to progie the data for Cs = 1, Ws = 3.
    This is what I got:


    As you can see, the sum of the chicken and wolf is 150, which is Half of Ws*WC_d. and as you can see , 2 = Ws - Cs, where in the first two data sets, Ws - Cs = 1.
    So, another correlation.

    Useing this, it seemed that
    C_d + W_d = (Ws*WC_d) / (Ws - Cs)
    Which, again in combination with Cs/C_D = Ws/W_d,
    Gave me the following:

    C_d = (Cs*Ws*WC_d)/[ (Cs + Ws)*(Ws - Cs) ]
    W_d = (Ws*Ws*WC_d)/[ (Cs + Ws)*(Ws - Cs) ]

    Which definetely made more sense in the case of Cs = Ws. {Div
    By Zero means the wolf can't catch the chicken when they run at
    the same speed}

    So, then I decided to verify the equations, and useing Cs = 5, Ws = 7, saw that C_d = 145.8333333, and W_d = 204.1666667.
    Then I ran my progie, and it also came up with the same results.

    [edit] I now realize I should have used something else, where Ws - Cs <> 2 or 1, perhaps Ws = 11, Cs = 8. [/edit]

    So, I assumed I had the right equations.
    Of course, I never varied WC_d, so perhaps if they started at 50 instead of 100, there might have been another deviation, but
    My brain was fried, decided to see what you said.

    Now, the toughie is trying to develop the equation that projects
    the path the wolf takes in X, Y coordinates. {I'm a weee bit stuck here! }

    Something simpler, though would be altering your puzzle by
    haveing the chicken run at a constant speed at other than a 90
    degree angle.

    Well, there's always tomorrow.
    Attached Images Attached Images  

  27. #27

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391
    Now, the toughie is trying to develop the equation that projects
    the path the wolf takes in X, Y coordinates. {I'm a weee bit stuck here! }


    I think that given your past success you might be able to do it, though it may be difficult to just look at the numbers as they are. You might require a small bit of manipulation.


    Something simpler, though would be altering your puzzle by haveing the chicken run at a constant speed at other than a 90 degree angle.

    I'm working on that part now. I think I'm close to a solution. I'll post if I can figure it out. I think that solution is the key to figuring out how the original 'simple' solution was determined.

  28. #28
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    Huh,
    Dontcha have any Q's about my Progie?
    Guess not.

    But, if your not up to snuff with Calc, this technique 'd probly help you with the Chicken angle prob.
    Just through in a chicken_y, and some other stuff, well, never mind.


    -lou

  29. #29
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    I'm stumped after 1 hour.

    My problem is that in order to find the path of the Wolf, you need to know it's x and y co-ords (at least definitely the y co-ord). I can only see how to do this if the angle between the Wolf and Chicken is know. Unfortunately the angle is defined (inseparably) in terms of the x and y co-ords.
    There are 10 types of people in the world - those that understand binary, and those that don't.

  30. #30
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    When I first noticed this Thread (several days ago), I expected to find an analytical solution in 15 minutes to an hour. After 2-3 hours (20-30 minutes at a time over two days), no analytical solution was in sight, so I wrote a VB application to find a numerical solution.

    The numerical solution indicated that the chicken ran a little over 171 meters, which agrees with the NotLKH solution.

    Over 50 years ago I encountered this problem on an examination, and did not have much trouble solving it. Ten or twenty years later, it came up again when I was helping the son of a friend with his college mathematics. It is a very standard differential equations problem, and should cause no problem for somebody currently taking a pertinent course. For somebody who never took such a course, it is a formidable (if not impossible) task to find an analytical solution.

    BTW: The problem proposed to me years ago involved a bull and a man. The man was wearing a scarlet shirt and bright yellow pants. He was in a pasture alongside a high stone wall when he and the bull saw each other. The man ran toward an opening in the wall through which he had entered the pasture. This was the reason for the straight line path of the quarry. The bull was too dumb to realize where he was headed, so he charged toward the man, correcting his course as the man moved along the wall.

    For my analytical solution, I started the man at the origin running along the X-Axis in the positive direction, with the bull starting on the Y-Axis 100 meters from the origin.

    I was surprised that I could not recreate the solution which seemed so easy many years ago. After I post this, I will try again. I am sure I am missing something simple. Perhaps I should have the man run along the Y-Axis. It seems correct to have the quarry run along a coordinate axis, which simplifies his equation of motion.

    In the original problem from many years ago, the bull did not start at a point perpendicular to the path taken by the man. In that problem, he started at coordinates like (50, 50) with the man starting at the origin. The bull’s path started toward the origin, curved toward the X-Axis, and then curved away from the Y-Axis, becoming asymptotic to the X-Axis as he started overtaking the man.

    My numerical solution copes with various initial conditions, not requiring the bull to start at a point perpendicular to the man’s path.

    Considering the problem with the quarry running along a line not perpendicular to the pursuer’s initial direction is equivalent to a different starting position for the pursuer. Some initial positions for the pursuer result in a path which has a later point at which the pursuer path is perpendicular to the quarry path.

    NotLKH: My numerical solution agrees with yours, except for what I think is round off error. I wonder how close our methods were. I used very small time slices to calculate where the man and bull were at each instant. Using 524,288 (218) slices per second, I got a lower bound of 171.428576 and an upper bound of 171.428581 for the distance run by the quarry. In problems like this, a power of two is a good value for the number of time slices. It results in slightly better precision.

    The exact values for the sum of the distances seems to me to be coincidental. Note that the ratio of the pursuer and quarry distances is equal to the ratio of their velocities since they both ran for the same amount of time. This increases the chance of some coincidental distance sums.

    When I varied the velocities, I found a lot of problems with what looked like an irrational sum for the distances.

    If I have some idlel time in the next few days, I might try to add a plot of the pursuer's path for the this problem.

    BTW: I had a slight problem with determining reasonable conditions for terminating my computational loop.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  31. #31
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    Originally posted by Guv
    .......and so on.....
    Guv,'
    I think the problem is that of being outside of an habitual
    environment.

    We know of the df/dy, and we know of an integration that
    provides a length of area traveled. {based on time}
    unfortunately, since the time of our teachings, our knowledge has
    gone sour.

    And, in reality, if we have had no need for such knowledge till
    now, why should we require to retain such knowledge for the
    future?


    However, I am certain, if our jobs were to rely upon this, we
    would, within a day or two, figure it out.

    -Lou

  32. #32
    New Member
    Join Date
    Jul 2002
    Posts
    1
    The anser to this problem is as follows

    the distance covered by the chicken is x.
    the distance covered by hte wolve is 100 + x.

    speed = distance/time i.e S=d/t

    speed of chicken : Sc=3 = x/t x is distance covered by chicken (1)

    speed of wolve :Sw=4=(x+100)/t ........... (2)

    time t is the same for both

    from equation (1) t=x/3 ..................(3)

    from equation (2) t=(100+x)/4 ........(4)

    hence equation (1) = equation (2) since t is the same for both

    i.e x/3 = (100+x)/4

    from this we get x = 300 metres as the distance covered by the chicken.

    substitute 300 for x in equation (3)

    you get t = 300/3 =100 seconds..........that is the answer to your puzzle..............................................................................



    the cat

  33. #33
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Dylanzim: You solved a different problem. Your answer would be correct if the chicken had a 100 meter head start on a straight path.

    In the problem for this thread, the wolf takes a curved path. He starts at a point 100 meters from the chicken on a line perpendicular to the chicken's straight line path.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  34. #34

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391

    Solution

    I finally got around to writing up my solution, which was harder than I thought. But before reading it check out the 'easy' solution, which was originally posted on the website that I found the problem.

    Compute the distance that the chicken would get if the chicken ran directly away from the wolf. Then compute the distance the chicken would get if the chicken ran directly at the wolf. Averaging those two distances gives you the answer.

    It's amazing how simple the solution to this problem is. I still can't see how they arrived at it. Can anyone explain it? I'm still working on the more general problem of what happens if the chicken runs in a straight line at an arbitrary angle.

    I put my solution into MS word to make it easier to read since there were a lot of equations.

  35. #35
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    Hi wy125,

    Nice writeup. I never thort of using ds/dt as v of the wolf. Well done.

    I think there may be a mistake from eq (12) to the following line which starts "which reduces to"..., namely I think it doesn't reduce to cos(theta). Did you mean cosec(theta)?

    I'll read on after you reply...
    There are 10 types of people in the world - those that understand binary, and those that don't.

  36. #36
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Wy125: I am impressed with your solution. I thought I remembered it being easier, but it was over 50 years ago that I took a course in differential equations. Since I forgot how to do it, it would not be surprising if I also forgot how difficult it was.

    I like a bull/man description of the problem instead of a wolf/chicken description. The man runs along a high stone wall toward the hole in the wall through which he entered a pasture. The bull always charges directly toward the man, changing course as the man moves. Given constant speeds for bull and man, treat bull & man as point objects. Analyze the pursuit problem, and determine where the bull overtakes the man, assuming the hole in the wall is too far away for the man to escape.

    The bull/man description provides a reason for the straight line path of the quarry. I would always be distracted by wondering why a chicken would choose a straight line path other than one directly away from the wolf.

    The skewed man path should be viewed from a different perspective. Your solution should be applicable. See below.

    I suspect that the easy solution might be impossible to formally prove, although I think it is valid. Also see below.

    There is a description of another interesting pursuit problem below.

    The skewed man path is equivalent to changing the starting place for the bull. Think of the man as starting at the origin and running along the X-Axis in the positive direction. Starting points for the bull below the origin are trivial symmetric variants of corresponding starting points above the X-Axis, and will be ignored. There are three fundamentally different starting points for the bull. In each case, the bull moves toward the origin for an infinitesimal time interval.
    • Case 1: The bull starts at point in the first quadrant like (100, 100), (40, 70), or (150, 20). The bull path moves toward the Y-Axis, becomes vertical for an instant, and then moves away from the Y-Axis. The path always moves toward the X-Axis, and might seem to be asymptotic to it. It is not asymptotic if the bull runs faster than the man. The path is undefined after the bull catches the man. If the bull ran slower than the man or at the same speed, the path would be asymptotic to the X-Axis. Note that if the bull ran at the same speed as the man, there would be a time after which the bull and the man would appear to be running along the X-Axis a constant distance apart. The path of the bull would become an asymptote that appeared to be the X-Axis. If the man ran faster than the bull, there would be a time after which both seemed to be running along the X-Axis with the man getting farther and farther ahead.
    • Case 2: The bull starts at a point in the second quadrant like (-100, 100), (-40, 70), or (-150, 20). This type of path is similar to the latter part of a Case 1 path. I am almost certain that each path of this type is exactly equivalent to the latter part of some Case 1 path.
    • Case 3: The bull starts at a point on the Positive Y-Axis. This case is the subject of the thread. Note that all Case 1 paths have a point at which the bull path is vertical for an instant of time. From that point on, a Case 1 path looks like an entire Case 3 path. In fact, each case 3 path is exactly equivalent to the latter part of some Case 1 path.
    Cases 1 & 2 are equivalent to a skewed man path.

    Starting the man at the origin does not lose any generality. There might be a problem with case 1 due to an infinite derivative at the instant that the bull path is vertical. Perhaps there is some advantage to having the man run along the Y-Axis.

    I wrote a VB application which solves any of the above cases by numerical approximation of the bull path. With small time slices (I used 524,288 slices per second), the results agree with the simple solution to about 8 significant digits (171.428575515 instead of 171.428571429).

    For those who have not read all posts, the averaging method of solution applies to Case 3. It calculates the time required for a collision if the bull and the man run toward each other. It then calculates the timed required for the bull to overtake the man if the man always runs directly away from the bull. The average of these times is the solution to a Case 3 problem.

    After some numerical experiments, I believe that the averaging method calculates the correct answer. I tried several sets of initial conditions. In each case the averaging method and the numerical integration method agreed, except for roundoff error.

    Without verifying it via a proof or by comparison with results from a proven method, I would see no reason to accept the averaging method as valid.

    I am convinced that the averaging method is valid, but I wonder if there is a way to prove it. It is my guess that any proof would be esoteric and difficult to grok. There might be no known proof.

    The numerical integration method will work for cases 1 & 2. I doubt that any variation of the averaging method will work for these cases.

    The numerical integration method is known to be valid for solving problems like this, and a convincing proof of this method can be developed. Comparing results for 10, 20, 50, 50,000 sets of initial conditions might convince almost anybody that the averaging method is also valid. However, this is not a proof that the method is valid. The millionth set of initial conditions might show that the two methods disagree. I would be surprised if a counterexample exists, but without a formal proof, can one be certain that the easy method is valid?

    BTW: There is a cute differential equations problem involving pursuit which has an obviously valid easy solution. It is as follows.

    Imagine four objects initially on the corners of a large square. Each pursues the counterclockwise object. Treat each object as a point whose course is corrected instantaneously, and assume that all move at the same speed. It is obvious that the four objects (perhaps guided missiles, falcons, bugs on a table, et cetera) are always on the corners of a square which contracts and rotates. The path of each object is a spiral, and the four objects meet at the center of the original square.

    Given the speed of the objects and the size of the original square, determine how far each object travels before the collision at the center of the original square.

    The differential equations solution to this one is easier than the bull/man pursuit problem. The following is the easy intuitive solution.

    The velocity vector of each quarry and his pursuer are always orthogonal. Since no quarry has a velocity component toward or away from his pursuer, the motion of a quarry never results in an increase or a decrease in the distance between the quarry and his pursuer. Therefore the pursuer must travel the original distance separating himself from his quarry. The speed of the objects has no effect on the length of the paths. The distance traveled by each object is the length of one side of the original square.

    In theory, the four objects spiral an unbounded number of times around the center of the square, although the length of the path is finite.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  37. #37
    Addicted Member
    Join Date
    Feb 2001
    Posts
    198
    I may be meddling with forces I don’t understand here (please tell me if I’m wrong).
    I approached this somewhat differently, can’t get a result, but the method may be simpler if not entirely incorrect. I’m trying to calculate the length of path of the wolf with respect to movement of the chicken.

    On the graph with the wolf (or the bull) starting at y=(0,100), and the chicken(or man) at (0,0), I took a small change in y^2 to be: small movement by the wolf (dw) squared minus the equivalent small movement of the chicken (dc) squared.
    Or dy = sqrt( (dw)^2 – (dc)^2)
    Now sqrt( (dw)^2 – (dc)^2) = sqrt(((dw/dc)^2) - 1) * dc
    And we know that dw/dc = 4/3.
    So the equation can now be written as dy = sqrt(((4/3)^2) - 1) * dc
    Or dy = sqrt((16 / 9) - 1) * dc
    Or dy = sqrt(7/9)*dc

    And so dy/dc = (7/9)^0.5

    That’s where I get stuck as my nearest guess is:
    Y=(2/3)*((7*chickenMovement)/9)^(3/2)

    I feel that a value of y=100 should be given when chickenMovement = the answer.
    And I can’t get anything like the accepted answer from this no matter how much I cheat.

    Help!, where does this go wrong?

  38. #38
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Starman: The following might give you a clue. It is the calculation subroutine from a VB application I wrote to solve this problem numerically. I used 524,288 (219) time slices per second, which resulted in about 8 digits of precision.

    I have omitted a lot of the application, and do not show some Dim Statements external to this Subroutine. The omitted details process user input of initial conditions.

    The Latitude Function uses VB Atn Function to determine an angle. I use it to avoid problems with tangent of 90 degrees, and to get slightly more precision by only requiring the Atn Function to compute angles less than 45 degrees (Pi/4 radians).

    If you draw a diagram, you can probably understand what is being calculated. The curved path taken by the bull/wolf is approximated by small distances along tangents to the curve. The small distance traveled by the bull/wolf in a time slice is the length of the hypotenuse of a right triangle. The legs of the triangle are the changes in XY coordinates. The man/chicken runs along the X-Axis.

    The Subroutine will do computations for any reasonable starting point for bull/wolf. A starting point on Y-Axis is not required. Starting points off the Y-Axis are equivalent to a man/chicken path not perpendicular to initial velocity vector for bull/wolf (Id est: A skewed chicken/man path).

    I might add a picture Box to the application and display a plot of the bull/wolf path.
    VB Code:
    1. Private Sub cmdCompute_Click()
    2. Dim IterationTally As Double
    3. Dim Angle As Double
    4. Dim LastBullX As Double
    5. Dim LastBullY As Double
    6. Dim LastManX As Double
    7. Dim ManDistance As Double
    8.  
    9. If BullSpeed > ManSpeed Then
    10.         'This is okay
    11.     Else
    12.         Junk = MsgBox("Bull is too slow: Try again")
    13.         Exit Sub
    14.   End If
    15.  
    16. 'Unhide some text boxes used to hold calculated values.
    17. Call ShowText
    18.  
    19. BullX = BullStartX
    20. BullY = BullStartY
    21. ManX = ManStart
    22. Call ValueLoader 'Display some initial conditions.
    23.  
    24. TimeIncrement = 1 / TimeSlices
    25. BullMove = BullSpeed * TimeIncrement
    26. ManMove = ManSpeed * TimeIncrement
    27. IterationTally = 0
    28.  
    29. Do
    30.     LastBullX = BullX
    31.     LastBullY = BullY
    32.     LastManX = ManX
    33.    
    34.     Angle = Latitude(ManX - BullX, BullY)
    35.     BullY = BullY - BullMove * Cos(Angle)
    36.     BullX = BullX + BullMove * Sin(Angle)
    37.     ManX = ManX + ManMove
    38.    
    39.     If IterationTally Mod 10000 = 0 Then
    40.             'Display some calculated values to the user.
    41.             Call ValueLoader
    42.             DoEvents
    43.       End If
    44.    
    45.     IterationTally = IterationTally + 1
    46.  
    47.   Loop While ManX > BullX Or BullY > 1
    48.  
    49. Call ValueLoader
    50. 'Show values just prior to bull passing the man.
    51. txtManFinish.Text = Dformat(LastManX)
    52. txtBullFinishX.Text = Dformat(LastBullX)
    53. txtBullFinishY.Text = Dformat(LastBullY)
    54. txtBullDistance.Text = Dformat(ManX)
    55.  
    56. ManDistance = LastManX - ManStart
    57. txtBullDistance.Text = Dformat(BullVelocity * ManDistance / ManVelocity)
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  39. #39
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    Here's my sub, but its got some extra stuff in it. But the pertanent point is
    Chicken_X is what we are calculating.

    VB Code:
    1. Private Sub cmdStart_Click()
    2. KeepGoing = True
    3. 'define some stuff
    4. Dim WolfSpeed As Double
    5. Dim ChickenSpeed As Double
    6. Dim MyPower As Long
    7.  
    8. Dim MyWid As Long
    9. Dim MyH As Long
    10. MyWid = (Picture1.Width / 10)
    11. MyH = (Picture1.Height / 10)
    12.  
    13. Dim TimeCount As Double
    14. Dim TimeUnit As Double
    15. Dim TotWolf_Y As Double
    16. Dim TotChicken_X As Double
    17. Dim Wolf_Sum As Double
    18. Dim LastCx As Long
    19. Dim LastCy  As Long
    20. Dim LastWx As Long
    21. Dim LastWy As Long
    22. Dim CCx As Long
    23. Dim CCy As Long
    24. Dim CWx As Long
    25. Dim CWy As Long
    26.  
    27. Dim Wolf_X As Double
    28. Dim Wolf_Y As Double
    29. Dim Chicken_X As Double
    30. Dim Chicken_Y As Double
    31. Dim Chick_Wolf_X As Double
    32. Dim Chick_Wolf_Y As Double
    33. Dim Chicken_Distance_Wolf As Double
    34. Dim Wolf_Rate_X As Double
    35. Dim Wolf_Rate_Y As Double
    36. Dim Max_Y As Double
    37. 'TimeUnit = (2 ^ MyPower) 'start with 1 second intervals
    38. 'initialize some stuff
    39. WolfSpeed = 4
    40. 'ChickenSpeed = 4
    41. ChickenSpeed = 3 'WolfSpeed * (-1 + Sqr(5)) / 2
    42.  
    43. MyPower = -14
    44. While (KeepGoing = True)
    45. 'Init Conditions
    46. TimeUnit = (2 ^ MyPower)
    47. Wolf_X = 0
    48. Wolf_Y = 0
    49. LastCx = 0
    50. LastCy = 100 * 25
    51. LastWx = 0
    52. LastWy = 0
    53. Chicken_X = 0
    54. Chicken_Y = 100
    55. Max_Y = Chicken_Y
    56. TimeCount = 0
    57. Wolf_Sum = 0
    58. 'lets have the wolf run at the chickens current spot
    59. 'calculate
    60. While (Wolf_Y < Max_Y) And (KeepGoing = True)
    61.     TimeCount = TimeCount + 1
    62.     Chick_Wolf_X = Chicken_X - Wolf_X
    63.     Chick_Wolf_Y = Chicken_Y - Wolf_Y
    64.     Chicken_Distance_Wolf = Sqr((Chick_Wolf_X ^ 2) + (Chick_Wolf_Y ^ 2))
    65.     Wolf_Rate_X = WolfSpeed * (Chick_Wolf_X / Chicken_Distance_Wolf)
    66.     Wolf_Rate_Y = WolfSpeed * (Chick_Wolf_Y / Chicken_Distance_Wolf)
    67.     Wolf_Y = Wolf_Y + (TimeUnit * Wolf_Rate_Y)
    68.     Wolf_X = Wolf_X + (TimeUnit * Wolf_Rate_X)
    69.     Chicken_X = TimeCount * TimeUnit * ChickenSpeed
    70.     Wolf_Sum = Wolf_Sum + (TimeUnit * WolfSpeed)
    71. 'from here to there is only some code to grapph, and can be ignored
    72. 'here
    73.     CCx = Int(25 * Chicken_X)
    74.     CCy = 2500
    75.     CWx = Int(25 * Wolf_X)
    76.     CWy = Int(25 * Wolf_Y)
    77.     If (CCx <> LastCx) Or (CCy <> LastCy) Then
    78.         'lstChickanRan.AddItem CCx & " " & CCy
    79.         Picture1.Line ((CCx + MyWid), (CCy + MyH))-((LastCx + MyWid), (LastCy + MyH)), vbRed
    80.         LastCy = CCy
    81.         LastCx = CCx
    82.         DoEvents
    83.     End If
    84.     If (CWx <> LastWx) Or (CWy <> LastWy) Then
    85.         Picture1.Line (CWx + MyWid, CWy + MyH)-(LastWx + MyWid, LastWy + MyH), vbRed
    86.         LastWy = CWy
    87.         LastWx = CWx
    88.         DoEvents
    89.     End If
    90.     DoEvents
    91. 'there
    92. Wend
    93. 'the following returns current values
    94. lstChickanRan.AddItem (TimeCount * TimeUnit) & ": C_X = " & Chicken_X & ", Wolf_Y = " & Wolf_Y & ", Wolf_X = " & Wolf_X & " Wolf_Tot = " & (Wolf_Sum) ' / Chicken_X)
    95. DoEvents
    96. MyPower = MyPower - 1
    97. 'MsgBox MyPower
    98. Wend
    99. MsgBox "Done"
    100. End Sub

  40. #40
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    I think there may be a mistake from eq (12) to the following line which starts "which reduces to"..., namely I think it doesn't reduce to cos(theta). Did you mean cosec(theta)?
    You around wy125?
    There are 10 types of people in the world - those that understand binary, and those that don't.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width