rec.puzzles Archive

A body of soldiers form a 50m-by-50m square ABCD on the parade ground.

analysis/dog Added material

Problem

A body of soldiers form a 50m-by-50m square ABCD on the parade ground.
In a unit of time, they march forward 50m in formation to take up the
position DCEF. The army's mascot, a small dog, is standing next to its
                                       handler at location A. When the
          B----C----E                  soldiers start marching, the dog
          |    |    |   forward-->     begins to run around the moving
          A----D----F                  body in a clockwise direction,
                                       keeping as close to it as possible.
When one unit of time has elapsed, the dog has made one complete
circuit and has got back to its handler, who is now at location D. (We
can assume the dog runs at a constant speed and does not delay when
turning the corners.)

How far does the dog travel?
Show solution
Generalize the problem by allowing the square to be a rectangle,
which will also provide a solution for the common variant in which
the dog runs to the front of the column and returns.  Consider the
length of the column to be one length unit and the length of a day
to be one time unit.  Let the width of the column be w length units.
Then the speed of the column is one unit of length / one unit of time =
one unit of speed.  The dog runs at speed d.  Divide the dog's run into
four segments corresponding to its run along each of the four sides.
The equations for each segment are:

d * t1 = sqrt(w^2 + t1^2)

d * t2 = 1 + t2

d * t3 = sqrt(w^2 + t3^2)

d * t4 = 1 - t4

Solving each of these for the times:

t1^2 = w^2 / (d^2 - 1)

t2 = 1 / (d - 1)

t3^2 =  w^2 / (d^2 - 1)

t4 = 1 / (d + 1)

Since the times must sum to unity:

t1 + t2 + t3 + t4 = 1

Substituting into this equation gives:

2w / sqrt(d^2 - 1) + 1 / (d - 1) + 1 / (d + 1) = 1

This simplifies into the quartic equation:

d^4 - 4d^3 + (2 - 4w^2) d^2 + 4d + 4w^2 + 1 = 0

This has the real solution:

d = (1 + 1/2 ((4 + 4/3 (((-1) + 2 w^2)) + ((4 2^(1/3) ((4 + 2 w^2 +
w^4))))/(( 3 ((16 + 12 w^2 + 21 w^4 - 2 w^6 + 3 sqrt3 sqrt(16 w^4 + 8
w^6 + 11 w^8 - 4 w^10)))^(1/3))) + 2/3 2^(2/3) ((16 + 12 w^2 + 21 w^4 -
2 w^6 + 3 sqrt3 sqrt(16 w^4 + 8 w^6 + 11 w^8 - 4 w^10)))^(1/3))) + 1/2
((8 + 8/3 (((-1) + 2 w^2)) - ((4 2 ^(1/3) ((4 + 2 w^2 + w^4))))/((3
((16 + 12 w^2 + 21 w^4 - 2 w^6 + 3 sqrt3 sqrt(16 w^4 + 8 w^6 + 11 w^8
- 4 w^10)))^(1/3))) - 2/3 2^(2/3) ((16 + 12 w^2 + 21 w^4 - 2 w^6 + 3
sqrt3 sqrt(16 w^4 + 8 w^6 + 11 w^8 - 4 w^10)))^(1/3) + ((32 + 32 (((-1)
+ 2 w^2))))/((4 ((4 + 4/3 (((-1) + 2 w^2)) + ((4 2^(1/ 3) ((4 + 2 w^2 +
w^4))))/((3 (( 16 + 12 w^2 + 21 w^4 - 2 w^6 + 3 sqrt3 sqrt(16 w^4 + 8
w^6 + 11 w^8 - 4 w^10)))^(1/3))) + 2/3 2^(2/3) ((16 + 12 w^2 + 21 w^4 -
2 w^6 + 3 sqrt3 sqrt(16 w^4 + 8 w^6 + 11 w^8 - 4 w^10)))^(1/3))))))))

Two special cases are the line (w = 0):

d = 1 + sqrt(2) ~= 2.41421

and the square (w = 1): 

d ~= 4.18113

If the width is twice the length:

d = 1 + sqrt(2) + 2 sqrt(2 + sqrt(2)) ~= 6.10973

For larger widths, d asymptotically approaches the perimeter:

d ~= 2 (1 + w)


Additional material

The variant in which the dog runs to the front of the column and back
was posted to rec.puzzles as the "army puzzle":

> An army 40 miles long is moving at constant speed. A horseman takes a
> message from the rear end of the army to the general in the front end
> of the army and returns back to the rear end of the army (moving with
> constant speed). During this time, the army moves a total of 40 miles.
>
> What total distance did the horseman travel?

Christine Park (cpark@qualcomm.com) wrote:
> I get total distance: 40 + 2s

[ Editor: s is the distance the army travels while the horseman rides
to the front. ]

The answer 40 + 2s is correct, the problem is what does 40 + 2s equal.
My guess is 96.57, calculated as follows.

The whole exercise is completed in time T.
The army covers 40 miles, the horse x miles.
=> The speed of the army is 40/T, the speed of the horse x/T.

The horse reaches the head of the army at 40+s miles after time y.
It has covered a distance 40+s.
The army has covered distance s in the same time.

40/T  * y = s
x/T [Editor: "r/T" in the original]  * y = 40 + s

y [Editor: "x" in the original] = (40/(x-40)) * T

The army travelled distance s in time (40/(x-40))T. The rider must travel
back this distance in time T [Editor: "1" in the original] - (40/(x-40))T.

=> 40/T * (40/(x-40))T = x/T * ((x-80)/(x-40))T

=> 1600 = x^2 - 80x

=> x^2 - 80x - 1600 = 0

for quadratic ax^2 + bx + c = 0, x = (-b (+/-) sqrt(b^2 - 4ac) )/ 2a

Answer 96.57 miles.

-- Guy Steven <rgs@etive.equinox.gen.nz>

Assume the speed of the army is Va and of the horseman Vh, then the
total distance the horseman traveled is 40*(Vh/Va) miles.  To find out
(Vh/Va), we may write the following equation

         40/(Vh+Va)+40/(Vh-Va)=40/Va

which gives (Vh/Va)=1+sqrt(2). Therefore, the answer is 40*[1+sqrt(2)]

-- TZ <zhang@biomed.med.yale.edu>

In article <1993Sep23.194341.12308@nevada.edu>, jangel@nevada.edu (Jeff
Angel) writes:
> However, this doesn't work.  Consider the following (exaggerated)
> situation:
>   Say the speed of the army is 1 mile/hr and the speed of the horse is
> 1.01 miles/hr.  After 100 hours, the army will have travelled 100 miles,
> and the horseman will have travelled 101 miles, but still will have
> not have reached the front of the army line.  It will take him 4000 hours
> to reach the front of the line, in which case he will have travelled a
> total of 4040 miles before starting back.  By changing the speed of the
> army and the speed of the horseman, we can make the distance be as long
> as we want.  In other words, there is not enough information to do this
> problem (unless I am missing something, in which case I would appreciate
> it if someone can tell me what.)

In your exaggerated situation, you violate one of the assumptions,
which states that the army travels 40 miles during the horseman's trip.
In your example, the army travels more than 4000 miles.

The solution shown above is, in fact, correct.

-- Timothy Vaughan <tvaughan@buphyk.bu.edu>

Here's a general algebraic solution to the problem.

Let:            Va        = speed of the army
                Vh        = speed of the horseman
                t         = total time for the round trip
                t1        = time riding to the front
                t2        = time riding back
                L         = length of the army
                d         = distance the army marched during the
                            horseman's trip.

the relevant equations are:

        (1)        t1 + t2            = t (obviously)
        (2)        Va * t             = d (army rate times time)
        (3)        (Vh - Va)t1        = L (the relative speed of the
                                           horseman w/respect to the army
                                           is reduced by Va since they are
                                           both going forward.  The distance
                                           traveled by the horseman w/respect
                                           to the army is the length of the
                                           army).
        (4)        (Vh + Va)t2        = L (on the return trip, the logic is
                                           reversed, and the horseman's
                                           relative speed is increased by Va).

        from (3) and (4)

        t1 = L / (Vh - Va)        and         t2 = L / (Vh + Va)

        Now plug these results into (1) to get:

            L             L
        --------   +  --------- = t
        (Vh - Va)     (Vh + Va)

        ... and simplifying this yields:

          2L * Vh
        ---------- = t
          2     2
        Vh  - Va

        Now from (2) we know that t = d / Va so we get:

          2L * Vh      d
        ---------- = ----
          2     2     Va
        Vh  - Va

        crossmultiplying yields:

                         2      2
        (2L*Va)Vh = (d)Vh - d*Va

        or in a quadratic form in terms of Vh:

             2                    2
        (d)Vh  -  (2L*Va)Vh - d*Va

        Solving using the quadratic equation yields:

                         --------------------
              2L*Va +  /   2  2       2  2
                      /  4L Va   +  4d Va
        Vh = -----------------------------
                        2d

        or

                       ------------
        2L*Va +  2*Va /  2       2
                     /  L   +  d
        ------------------------------
                    2d

        which equals:

              Va * [L + sqrt(L^2 + d^2)]
        Vh =  --------------------------
                         d

        but from (2) we know that Va = d / t
        giving us finally:

        Vh * t = L + sqrt(L^2 + d^2)

        Note that the LHS (Vh * t) is the distance the horseman traveled.

        The problem as stated gave the length of the army, L, and the
        distance traveled by the army, d, to be 40.  This would yield

          40 + sqrt(40^2 + 40^2)
        = 40 + 40 * sqrt(2)
        = 40 (1 + sqrt(2))         as others have mentioned.

        Note that if the army is stationary (i.e. d = 0), then the
        horseman's distance becomes:

          L + sqrt(L^2 + 0)
        = 2L                       as we would expect

        and also, trivially, if the army was of zero length, but did move
        distance d, the horseman would move

          0 + sqrt(0^2 + d^2)
        = d

        or the same distance as the army.

-- Howard W. Pinsley <head@dorsai.dorsai.org>

I have just seen this puzzle. For your information, it appears in
H. E. Dudeney, Modern Puzzles and How to Solve Them, pub. by Pearson,
London, 1926. See number 38: The Despatch Rider.

-- Andy Pepperdine <ahp@pact.srf.ac.uk>

[ Editor: a geometric solution of the column variant (w = 0), posted to
rec.puzzles in March 1994 under "Math Puzzles Speeded by Insight". ]

In article <wilso050.762969241@maroon.tc.umn.edu>,
         wilso050@maroon.tc.umn.edu (Barry T Wilson-2) writes:
>>     A messenger at the rear of a military column is dispatched to the
>>     head of the column.  He reaches the head of the column, delivers
>>     the message, and returns (having lost no time at the head of the
>>     column) at the same rate of speed to the rear of the column.  When
>>     he gets back to the rear of the column the rear of the column
>>     is at the same place the front of the column was when he started.
>>     How far did the messenger travel, in units of column length?

Ty Wilson, wilso050@maroon.tc.umn.edu has followed up with a fairly
concise algebraic answer.

I like this kind of puzzle.  Insight here usually means geometry.  And
in fact (knowing the answer helps) there is a geometric solution.
Unfortunately because it is so hard to draw decent pictures with ascii
characters, I'm going to have to struggle a bit to explain it.

Step 1. Draw a good distance-time diagram of the whole situation.

                           C
                         + +
                       +   +
                     E     +
                   +. . o  +
                 +        o+
               +   .    .  +o
             +             +  o
           A ++++ F ++++++ D ooo G
           +     .       +
           +           +
           +   .     +
           +       +
           + .   +
           +   +
           + +
           B

Here distance is drawn on the vertical axis and time on the horizontal.
Initially AB represents the column.  CD represents the column in its
final position.  The path of the messenger is represented by the dotted
line.  The messenger starts at B.  E represents the place where the
messenger catches the front of the column, after which the messenger
returns to D.  Ignore all lines marked `ooo', and the point G at this
stage.  (I will need them later and I don't want to have to make
another diagram.)

If you adjust the scales of distance and time so that the column
travels at exactly one unit of velocity, then the slope of line BD is
1.  Hence angle B is 45 degrees, as is the angle at C.

Now reflect triangle AED across the vertical line through E to obtain
GEF.  The angle at G is clearly 45 degree.  The tricky part is figuring
out why the triangle AEG is the same size as the triangles ADB and ADC.

I don't know a nice direct way of proving this.  But if you start by
assuming it is true and work backwards to construct the path of the
messenger, then you can easily verify that it works.  (i.e. you get a
straight path - no bend at F - with equal (but opposite) slopes there
and back.)

Of course if AEG is the same size as ADB and ADC then the messenger
travels (1 + sqrt{2}) times the length of the column.

-- hawthorn@waikato.ac.nz