How Linux saved my life E-mail
by David M Williams   
Thursday, 05 June 2008
“Ohhh,” one of the animals began, “This is the stuff of legends. The myth states the original architects made an entrance – even before the birth of Mark Forer himself – one which travels under Mark Forer’s pedestal, if you can believe it. A wondrous hollow pathway through which you can journey directly under the author. The legend is even that you can look upon him through magical openings in the roof of the path itself. We know it as the legend of the entry called ‘service’.”

“A service entry,” I remarked? “That’s brilliant. Let’s open it. What is the code?”

“Ohhh,” my guard intoned, perhaps the most depressing orator around. “The code is lost. Legend has it the number is that of a puzzle. Long ago the gods had three magical towers, taller than the eye can imagine. Placed on one tower were ten enormous discs that no man or animal can lift.

Each disc was hand crafted out of precious stones. The gods would play games with these discs. They would challenge each other to move all the discs from one tower to another.”

“It may sound simple,” he continued, noticing my bemused expression, “but there was a requirement. The discs are all of different sizes. And no disc may rest upon any disc that is smaller in size than itself.

So the challenge became getting the discs from one tower to another with the third used for temporary storage. It is rumoured that the entrance of service can only be opened by a magic number – the number being the most optimal of moves required to move these ten discs like so. No more.”

“Our people have played this game. Yet, we cannot find a number low enough. No matter how hard we try we do not succeed. Periodically a newcomer will better the last score and we attempt the entrance but with no success. We think the legend is purely a story to entertain children.”

“What is the best score so far?” I asked.

“4096,” my captor stated.

Well, I thought, I could either dig rocks or I could make an attempt to break this code. Given my disposition towards getting my hands dirty the answer seemed obvious. Yet, I knew I could not work out this problem by myself. I sat and fired up my ASUS Eee that I had fortunately brought along. Within mere seconds its SSD-powered body flickered into life.

I logged in and pressed CTRL-ALT-T. I was going to need the command line for this. And as fortune would have it, I remembered reading of such a problem not long ago. That’s right! It was the classic Towers of Hanoi problem, often a favoured example when teaching the concept of recursion in programming classes.

And lo and behold, I had saved a BASH script to perform such calculations. Why thank you, those who make source code available to the public.

Am I on the right track? Will I be released? Allow me to tell you more of my strange tale.

CONTINUED







 
< Next story in category   Previous story in the category >
iTWire user statistics Visitors last 30 days
694,279
Subscribers 15,210
#1 independent technology news advertise here
  •   *  
  • Search
  • AdvSeach
  • Login
  • Events
  • FreeStuff

- Advertisement -

Featured Whitepapers

Follow iTWire on Twitter

About iTWire

iTWire is all about technology news, information, jobs and community for the IT and telecommunications industry professional. Subscribe to our free ICT daily newsletter