Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Efficient Purity


December, 2004: Wireless Futures and Fractal Shores

Solution to "Cruise Control," DDJ, November 2004.

  1. You need 6 kilometers. The troublesome cases occur when the car goes very fast. So we will concentrate on those. If you test kilometer 1 at 20.5 seconds, then you knock out 30 kph (kilometers per hour) to 170 kph (assuming the car has already passed). If you then test kilometer 2 at 26.6 seconds, you knock out 180 kph to 270 kph. Then test kilometer 3 at 33.22, leaving either 280 kph to 320 kph or 330 kph to 360 kph. The first needs three more kilometers. The second needs only two. No fewer than 6 is possible because there are more than 25 (32) possible answers.
  2. You can net the fugitive in 6 kilometers or less. The reason is that cars going at a fast speed can all be caught early on. This time, test marker 1 at 19.5 seconds. If you don't knock out 30 kph to 180 kph, then notice that there are just 16 possibilities left and so the speed can be determined using 4 more kilometer sensors, at which point, netting at 6 kilometers is no problem. So, let's say we still have 190 kph to 360 kph left. Again, test kilometer 2 at 26.6 seconds, leaving just 8 possibilities. If 190 kph to 270 kph are still possible (i.e., if the car hasn't passed), then 3 more kilometers are enough to catch the fugitive. So, let's say that we are left with speeds between 280 kph to 360 kph (i.e., the car has passed kilometer 2 by 26.6 seconds). Then we can net the car if we spring the net at 29.9 seconds. This is the best solution I know of if one cannot both deploy the net and access the sensor at the same kilometer.
  3. Yes, much better. Just deploy the net at 6 seconds at kilometer 1 and you'll catch the car no matter which speed it goes in this range.

This puzzle was inspired by an idea of Peter Carpenter during a drive through Wales.

DDJ

Back to Article


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.