Information Technology Reference
In-Depth Information
“I'm not sure. What is an algorithm? Can you eat it?” asked Laurie.
“What? No, it's just a fancy way of saying 'how to do something.' But Algorithm looks more
impressive on the sign,” said Tinker.
Xor turned orange with disappointment.
“How to do something,” repeated Laurie. “In that case, I want to find a sensible way to visit
every town.”
“That sounds like an interesting problem. What have you been doing so far?”
Laurie told Tinker about her adventure in the Red-Black Forest and her visit with Eponym-
ous Bach.
“A Hamiltonian path, eh?” said Tinker. “That's a tough one. I hate to say it, because he
sounds like a nice person, but the Wandering Salesman might take a long, long time to finish
his tour of all the towns.”
“Oh, no! But why?”
“If you always go to the nearest town you haven't visited yet, you might miss a town that's
just a little farther away. Then you go to another town that's closer to you but still farther
from the one you missed, and so on. You can end up crisscrossing the whole country to get to
the last few towns.”
“That sounds exhausting,” said Laurie. The Wandering Salesman wasn't so sensible after all!
“So how do I find the shortest path?”
“I'll see what I have in stock. But it might be expensive.”
“I don't have much money with me,” Laurie said. She took a few quarters from her pocket
and showed them to Tinker.
He looked at them with surprise. “Quarter Dollar? I don't know what a Dollar is, never mind
a quarter of one. Is this money where you come from?”
“Of course it's money! That's seventy-five cents,” she said.
Search WWH ::




Custom Search