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

Smooth As Ice


August, 2004: Smooth As Ice

Dennis is a professor of computer science at New York University. His latest books include Dr. Ecco's Cyberpuzzles: 36 Puzzles for Hackers and Other Mathematical Detectives (W.W. Norton, 2002) and Database Tuning: Principles, Experiments, and Troubleshooting Techniques (Morgan Kaufman, 2002). He can be contacted at DrEccoddj.com.


The tabloids made it a cover story. It was unfashionable to build very tall buildings, so Donald Pump wanted to build the largest possible ice rink.

"He wants to buy at least one of our Zamboni ice resurfacers," Ecco's visitor, Tony Zamboni explained. "We want to design a complete solution for him. We have a tradition to live up to."

"A tradition?" Ecco asked.

"Yes," Tony responded. "You have to understand my grandfather's passion for ice. During the 1930s, Frank Zamboni manufactured ice for boxcars full of lettuce. When that business declined, he began building ice rinks in southern California. The climate there is tough on ice and he had to resurface frequently. This meant bringing out a tractor, shaving the surface, removing the shavings, spraying water over the surface, and allowing the water to freeze. During the hour this took, many of his customers would leave. So he invented—and then reinvented many times over the years—an ice resurfacer. These are still called 'Zambonis.' The tradition is that we must continuously improve our machines and the way they are used.

"The basic problem is that when a Zamboni drives, everyone must just sit and wait. It no longer takes an hour, but it may take half an hour. In this new millennium, that seems way too long. So, we want to make it accomplish its job as quickly as possible. The trouble is that the Zamboni doesn't have a very tight turning radius. For this reason, it must sometimes drive over spots it has already resurfaced. The question is how to minimize the time.

"Knowing that you are a mathematician, we have abstracted the problem to the slightly asymmetric shape Pump wants it to be like, as shown in Figure 1: A 4×8 grid of points with the corners cut off plus four more nodes on the top (where the winners stand when there are figure-skating tournaments)—32 points in all.

"The distance between neighboring points is roughly the width of a Zamboni, so your goal is to have the Zamboni drive over every node at least once. At every darkened point (node), the Zamboni can turn 45 degrees from the direction it is moving in."

"So, if the Zamboni has moved from node A to node B as in Figure 2, it can move to node C if the angle formed by the rays AB and BC is 45 degrees," Ecco's niece Liane interjected. "In other words, certain paths are acceptable and others are not."

"Correct," said Tony to the 16-year-old. "Going from a node to a neighboring node takes 30 seconds. What is the smallest number of minutes you need to enter at the bottom (you can choose any bottom-most node), touch every node and then exit by some bottom node? Entering and exiting is from a driveway that is perpendicular to the bottom of the rink, so you can enter and exit at any angle you like."

Liane and her younger brother Tyler were able to find a solution in under 20 minutes.

"That improves our time by a third," the young Zamboni said. "The Donald should be pleased."

Reader: Would you like to see whether you can improve on this time?

After Tony had left, Ecco turned to his niece and nephew. "Nice work," he said. "How much bigger could you make the rink and still do it in the same time? Assume you have to keep the nodes of Pump's rink, but could add some. How many Zambonis would you need to cut the time down to 10 minutes for the Pump rink as it stands?"

I had to leave before I heard the answers.

Reader: Would you like to give these a try?

Check next month's Dr. Ecco installment for the solution.

DDJ


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.