Interview Questions Headline Animator

Thursday, January 03, 2008

Puzzle...

One of my managers, who also happens to be a pretty smart guy, and I were having a discussion today. We were talking about various interesting subjects including Engineering subjects like Natural Language Processing (NLP) and AI. And he asked me, "How do we make a computer smart enough to be able to solve a puzzle?" Now the puzzle could be a mathematical puzzle, a logical puzzle or even a language puzzle. And just to give me an example he asked me a puzzle.

What is a 2 digit number, that, when multiplied with 9, gives a 3 digit number. Now the first digit of the 3 digit answer is the same as the first digit of the original 2 digit number and the last digit of the 3 digit answer is the same as the 2nd digit of the original 2 digit number and the 2nd digit of the 3 digit answer is 0.

so if XY * 9 = X0Y, what is X and Y?

Now the problems is quite simple and I could solve it in the time required by me to leave from my desk to my bike parked below. And that's like less than 2 minutes. The issue here is how did you approach this problem and how do you make a computer arrive to the best approach.

So this is a question to all readers. Please solve this problem and tell me how you solved it and what approach you took.