Hats on a Death Row

You are one of 20 prisoners on death row with the execution date set for tomorrow. Your king is a ruthless man who likes to toy with his people’s miseries. He comes to your cell today and tells you:
“I’m gonna give you prisoners a chance to go free tomorrow. You will all stand in a row (queue) before the executioner and we will put a hat on your head, either a red or a black one. Of course you will not be able to see the color of your own hat; you will only be able to see the prisoners in front of you with their hats on; you will not be allowed to look back or communicate together in any way (talking, touching…..).

The prisoner in the back will be able to see the 19 prisoners in front of him. The one in front of him will be able to see 18…

Starting with the last person in the row, the one who can see everybody in front of him, he will be asked a simple question: WHAT IS THE COLOR OF YOUR HAT?

He will be only allowed to answer “BLACK” or “RED”. If he says anything else you will ALL be executed immediately.

If he guesses the right color of the hat on his head he is set free, otherwise he is put to death. And we move on to the one in front of him and ask him the same question and so on…

Well, good luck tomorrow, HA HA HA HA HA HA!”

Now since you all can communicate freely during the night, can you find a way to guarantee the freedom of some prisoners tomorrow? How many?

Source: www.brainden.com

Find Answer here

The Dream Job

You are one of the 125 candidates that have been shortlisted to appear for an interview for a job in the company Amgon that pays five lakhs per month. Mr. Donny, a representative of Amgon is in the interviewing panel and he is responsible to select only one candidate for the job. He gives each candidate the same task in which he gives three dice each to every candidate. No marking of any kind has been done on any of the six faces of the dice. He tells them to write one letter each on all the faces of the three dice so that the top faces of the dice can show first three letters of all the months in the year. Can you complete the task and get the job?

Source: www.testfunda.com

Find Answer here

Knapsack Problem

Given weights and values of n gift items. We have a box of capacity W. Find a solution such that the total value of gifts in the box is maximum.
In this Problem, we have two integer arrays value[0,1,2,…,n-1] and weight[0,1,2,3…,n-1],it represents the values and weights associated with n items resp. Given an integer W which represents the total capacity of the box. Write a Program to find the maximum value V which is the sum of the subset of values (value[]) such that the sum of the weight of this subset is smaller than or equal to W.
We either have to pick the complete gift item or don’t pick it.

Also known as 0-1 Knapsack Problem because we cannot split the item mentioned. Either we don’t pick the item (i.e 0) or pick the complete item (i.e 1).

Source: www.geeksforgeeks.org
Find Solution here

Candy Game

A group of students are sitting in a circle with the teacher in the center. They all have an even number of candies (not necessarily equal). When the teacher blows a whistle, each student passes half his candies to the student on his left. Then the students who have an odd number of candies obtain an extra candy from the teacher.

Show that after a finite number of whistles, all students have the same number of candies.

Source: www.puzzletweeter.com

Find Solution here

Chess Board Puzzle

A semi-infinite chess board (vary from zero to infinity in both dimensions) with counters in the three bottom left squares, as shown in the below figure.

How to move: If the squares above and to the right are free, a counter can be removed and replaced by two counters, one in the square above and one in the square to the right – check below

Prove that it is not possible to leave the three bottom left squares empty.

Find Solution here

Black and White Squares Puzzle

Consider an n x n chessboard, where each square is arbitrarily chosen to be either black or white. Your goal is to make all squares in the chessboard white. At each step, you are allowed to “switch” a square, but each switch will toggle not only the particular square being switched, but also the 4 squares that are adjacent to it: Two vertically up and down and two horizontally up and down the square being switched.
Note : At corners only 4/3 squares are toggled, while at the center all 5 squares are toggled.

How you can make the entire chessboard white.
Found at : http://puzzletweeter.com

Find Solution here

The Mysterious Murder Of Obadiah Squelch Puzzle

On 15th April 1892 Obadiah Squelch left his tomato processing factory for the last time: inside 200 cans labelled “Finest Tinned Tomatoes”. Who had committed this dreadful crime?

The Police brought in the Twig And Leaf Division (Special Branch) to investigate the case. It was a brief case.

Within minutes they had reduced the suspect list to six. After a further two hours they had ruled out suicide, so that left just five. Now they need your help to solve the mystery.

The suspect list:

DIRTY HARRY – The meanest bandit in the West
PERSIL PETE – The cleanest bandit in the West
BRANFLAKE BILL – Always on the go
DOMESTOS DEN – Just kills everything
VLOK SVAGEN – Vorsprung Durch Technic as they say in German

The Police returned to the scene of the crime with three chickens and a cockerel. They were the Four Hens-ic Scientists. Closer examination at the factory revealed a pool of red liquid around the tomato juice extractor. But it was already in the papers. It had been leaked by the press.

The headlines next day relayed the story to the world:


In fact, all the papers got it wrong. So who killed Obadiah Squelch?

Find Solution here