### Random Post

### Recent Posts

### Recent Comments

geoffrounce on Enigma 440: Three X | |

Jim Randell on Enigma 1588: As easy as 1… | |

Jim Randell on Enigma 440: Three X | |

geoffrounce on Enigma 1106: Not a square… | |

Jim Randell on Tantalizer 458: Knifemen |

### Archives

### Categories

- article (11)
- enigma (1,156)
- misc (2)
- project euler (2)
- puzzle (39)
- site news (44)
- tantalizer (42)
- teaser (3)

### Site Stats

- 177,401 hits

Advertisements

Assuming I understand they layout of rugby pitches correctly. This is a solution that uses the functions I recently added to the

enigma.pylibrary to find numerical approximations of functions. (It is implemented using a Golden Section Search minimiser). It runs in 45ms.Solution:Assuming Joe manages the minimum achievable distance, the closest he comes to Ken is 7 ft.Here’s a symbolic solution using SymPy.

By using the observation that the minimum distance occurs when J is travelling directly towards K, you can deduce the equation for the minimum distance as:

d = 25 / sin(θ) – 24 / tan(θ)

or more generally:

d = g(1/sin(θ) – r/tan(θ))

where r is the ratio

vand_{j}/ v_{k}gis the initial distance between Joe and Ken.By differentiation we find this is minimised in the case where cos(θ) = r.

And the solution follows.

hi, can we use any programming language here?

If you’d like to share a programmatic solution, then feel free. In whatever language you choose. (See the “Notes” page for some tips on posting source code in WordPress).

At the moment I tend to post my solutions in

Pythonas I find it lends itself to concise readable code (but then I initially started writing solutions in the somewhat more esotericPerl), and is freely available on many platforms (and even pre-installed on some), but it’s always interesting to see other languages too, and assuming it’s reasonably self-explanatory I should be able to understand the algorithm.This is the first python program whose belong to me, I have learned today a little

I think that’s a good start. Python is fairly easy to pick up (especially if you already know some other programming language), and has relatively few gotchas (although division using the / operator is one of them).

Converting the speeds to feet per second, this diagram derives the distance between Joe and Ken.

Then let Wolfram Alpha work out the minimum distance.

I have published an analytic solution to the problem on my blog.

However, I can’t work out why the form of the solution should be that the sine of the angle that Joe runs at is in proportion to the speeds of Joe and Ken.

The analytic solution now has a derivation of the general formula for the minimum distance, and the derivation of the sine of the angle being the proportion of the speeds

Very neat… I didn’t know you could get maths laid out so nicely in Blogger.

And I’ve just discovered you can use LaTeX markup directly in WordPress…

Did it work? It did for me.

(Although without the ability to preview/edit comments you might have to be careful when using this feature).

In roughly 4.675 seconds Ken runs 600/7 feet and Joe 24/25 as far.

I think I’m right in saying that if their starting positions (and roles) were reversed, the diagram would be the same triangle. In about 4.87 seconds Ken would run the extra 7, making 625/7 ft = 25/24 times as much as Joe’s 600/7.

Of course it all assumes that rugby players are more intelligent than the dog that always runs directly towards its master: this old dog can’t work out the equation of the pursuit curve.