Sandeep's World >> Puzzle Mania

Last updated March 15, 2008 with the Two Dimensional array puzzle. All answers are available @ Puzzles Unravelled.


Searching Two-Dimensional Array
There is a two dimensional array, of size 'n' rows and 'm' columns, with all rows and columns sorted individually. Whats the best way to search for a value (say, 'v') in the array? Best way is obviously the one with the lowest order of search.


Choosing Weights
This is a representative of a huge variety of weights and common balance problems. U r given a common balance and is expected to chose weights, so that u can measure all integer weights from 1kg - 40kg.

The question is what are the weights u'll choose, if u have to do it with minimum number of weights.


Faulty Ball
There are 13 balls, out of which one of them one is faulty (in terms of weight, either overweight or underweight, which we dont know). If u r given a common balance, how many weighs will u need to find out the faulty. Ofcourse, it shud work for all cases!

A simpler variation of the problem is a group of 9 balls, with one of them underweight (here, we know the faulty is actually underweight).


Speed of the River
A man was roving up the river and saw a log flowing down about 1mile from his starting point. He continued roving for another hr (after he saw the log) and then turned around and started going back. When he reached the starting point, he again saw the log. Assuming that the man is roving at a constant speed and the river flowing at a constant speed, what is the speed of the log/river?

(For this question, its always possible to frame two equations in two variables and solve them, but the charm is in solving it without any maths equations! Precisely the reason why I've added it here)


Candy Packets
Candies are available in packets of 6, 9 and 20. Obviously most of the counts can be made using these packet sizes, lets say 50 candies = one 20 packet, two 9 packets and two 6 packets. What is the highest count of candies which cannot be made of these packet sizes?

(An easier version of the same puzzle is packet sizes of 3 and 20)


Birthday Puzzle
On a tuesday morning, two men are travelling in a train. One of them says: "If you take the year when I was born and sum up the four digits of it, then you get my age!"

The other one says: "Surprisingly, although my age is different, if I do the same with the four digits of the year when I was born, I get my age, too!"

A mathematician overhears the conversation and wishes both of them a happy birthday. The mathematician was right (of course!), and wouldn't have said it if he wasn't 100% sure.

Questions:

When did that happen? How old were the two men? When were they born?

(Give day, month and year. And dont worry, there is a unique solution.)


Product 'n Sum
X, Y are two numbers so that 2 <= X, Y <= 99 and X ! = Y

There are two smart guys P and S. P knows the product of X and Y and S knows the sum. Now they have this conversation:

S : I dont know the numbers
P : Neither Do I
S : I know that u dont know the numbers
P : Now I know the numbers
S : Now, I too do

So tell me what is X and Y ?

(Needless to say this also has a unique and logical solution)


Ant 'n Rod
There is an iron rod 1km long, an ant starts moving from one end of the rod at a rate of 1 cm/s. but, after each second the rod stretches by an extra 1km (yeah ... its 1km and not 1cm) on both sides.

The question is how long will the ant take to reach the other end, if at all it will ?

Dont worry about things like the length of the ant and the width of the rod. They are all zero. for a practical case, replace iron rod with a line segment and ant with a point object.


Power
This one is simple. Write down an 'efficient' program to find 'a' to the power of 'b' where 'a' and 'b' are integers. Well ... the catch is in the word 'efficient'. Yeah ... I mean efficiency in terms of number of operations and memory usage.

© 2008 Sandeep Unnimadhavan