#### Nice and Challenging Puzzles

##### Sudoku Classic

Sudoku, sometimes also spelled Su Doku, is a logic-based placement puzzle. The aim of the canonical puzzle is to enter a numerical digit from 1 through 9 in each cell of a 9x9 grid made up of 3x3 subgrids (called "regions"), starting with various digits given in some cells (the "givens"). Each row, column, and region must contain only one instance of each numeral. Completing the puzzle requires patience and logical ability. Although first published in a U. S. puzzle magazine in 1979, Sudoku initially caught on in Japan in 1986 and attained international popularity in 2005 (use Web Sudoku or Uclick site for actual puzzles).

##### Poor Prisoners

The warden meets with the 23 prisoners when they arrive. He tells them:

You may meet together today and plan a strategy, but after today you will be in isolated cells and have no communication with one another. There is in this prison a "switch room" which contains two light switches, labeled "A" and "B", each of which can be in the "on" or "off" position. I am not telling you their present positions. The switches are not connected to any appliance. After today, from time to time, whenever I feel so inclined, I will select one prisoner at random and escort him to the "switch room", and this prisoner will select one of the two switches and reverse its position (e.g. if it was "on", he will turn it "off"); the prisoner will then be led back to his cell. Nobody else will ever enter the "switch room".

At any time, any of you may declare to me: "We have all visited the switch room." If it is true (each of the 23 prisoners has visited the switch room at least once), then you will all be set free. If it is false (someone has not yet visited the switch room), you will all remain here forever, with no chance of parole. Devise for the prisoners a strategy which will guarantee their release.

Hints: 1. They can plan any strategy before hand. 2. There are two switches. 3. Think of using one switch as a buffer. 4. How about electing one of them as a leader!

##### Fogcreek Programmers

100 fogcreek programmers are lined up in a row by an assassin. the assassin puts red and blue hats on them. they can't see their own hats, but they can see the hats of the people in front of them. the assassin starts in the back and says "what color is your hat?" the fogcreek programmer can only answer "red" or "blue." the programmer is killed if he gives the wrong answer; then the assassin moves on to the next programmer. the programmers in front get to hear the answers of the programmers behind them, but not whether they live or die. they can consult and agree on a strategy before being lined up, but after being lined up and having the hats put on, they can't communicate in any way other than those already specified. what strategy should they choose to maximize the number of programmers who are guaranteed to be saved?

Hints: 1. Saving half of them is trivial. 2. Saving all them for sure is impossible. 3. Saving all of them is possible some times.

##### Yarr Maties

Five parates discover a chest full of 100 gold coins. The pirates are ranked by their years of service, Pirate 5 having five years of service, Pirate 4 four years, and so on down to Pirate 1 with only one year of deck scrubbing under his belt. To divide up the loot, they agree on the following:

The most senior pirate will propose a distribution of the booty. All pirates will then vote, including the most senior pirate, and if at least 50% of the pirates on board accept the proposal, the gold is divided as proposed. If not, the most senior pirate is forced to walk the plank and sink to Davy Jones. locker. Then the process starts over with the next most senior pirate until a plan is approved.

These pirates are not your ordinary swashbucklers. Besides their democratic leanings, they are also perfectly rational and know exactly how the others will vote in every situation. Emotions play no part in their decisions. Their preference is first to remain alive, and next to get as much gold as possible and finally, if given a choice between otherwise equal outcomes, to have fewer pirates on the boat.

The most senior pirate thinks for a moment and then proposes a plan that maximizes his gold, and which he knows the others will accept. How does he divide up the coins? What plan would the most senior pirate propose on a boat full of 15 pirates?

Hints: 1. Imagine that there are only two parates. What strategy will senior parate will follow in this case? 2. Smelled any recursion?

##### Classic Weighing

This is a classic problem which i have heard many times before. this is the "harder" of the two problems, since in this one, you do not know if the invalid item weighs more or less than the others.

problem: the evil king from before sends his own assassin to take care of the evil queen who tried to poison him. of course, her trusty guards catch the assassin before any harm is done. the queen notices that the assassin is quite handsome and doesn't really want to punish him by death. she decides to test his wisdom.

The queen gives the assassin 12 pills which are all completely identical in shape, smell, texture, size, except 1 pill has a different weight. the queen gives the man a balance and tells him that all the pills are deadly poison except for the pill of a different weight. the assassin can make three weighings and then must swallow the pill of his choice. if he lives, he will be sent back to the bad king's kingdom. if he dies, well, thats what you get for being an assassin. only one pill is not poison and it is the pill which has a different weight. the assassin does not know if it weighs more or less than the other pills. how can he save his skin?

##### Treasure Island

You find an old treasure map in your grandma's attic. the map shows a cannon, a coconut tree, and a palm tree. the map states that to find the treasure you must:

1. Start at the cannon, walk toward the palm tree while counting your paces. when you reach the palm tree, turn 90 degrees to your left and walk the same number of paces. mark that spot on the ground with a stake.
2. Start at the cannon again, walk toward the coconut tree while counting your steps. when you reach the coconut tree, turn 90 degrees to your right and walk the same number of paces. mark that spot on the ground with a stake.
3. Find the midpoint between the two stakes and dig for the treasure.

You set off in secrecy to the deserted island. upon reaching the shore you site the coconut tree and the palm tree, but someone has removed the cannon. without digging randomly all over the island, is it still possible to find the treasure?

##### 100 Doors in a Row

You have 100 doors in a row that are all initially closed. you make 100 passes by the doors starting with the first door every time. the first time through you visit every door and toggle the door (if the door is closed, you open it, if its open, you close it). the second time you only visit every 2nd door (door #2, #4, #6). the third time, every 3rd door (door #3, #6, #9), etc, until you only visit the 100th door.

question: what state are the doors in after the last pass? which are open which are closed?

##### World Series

you have \$10,000 dollars to place a double-or-nothing bet on the Yankees in the World Series (max 7 games, series is over once a team wins 4 games).

unfortunately, you can only bet on each individual game, not the series as a whole. how much should you bet on each game, so that, if the yanks win the whole series, you expect to get 20k, and if they lose, you expect 0?

basically, you know that there may be between 4 and 7 games, and you need to decide on a strategy so that whenever the series is over, your final outcome is the same as an overall double-or-nothing bet on the series.

##### IIT Student Puzzle

There were 9 IITian final year students. Their advisor wanted to test them. One day he told all of his 9 students that he has 9 hats, colored either in red or black. He also added that he has at least one hat with red color and at least one with black color. He keeps those hats on their heads and ask them tell me how many red and black hats I have? Obviously students can not talk to each other or no written communication, or looking into each other eyes; no such stupid options.

Advisor goes out and comes back after 20 minutes but nobody was able to answer the question. So he gave them 10 more minuets but the result was the same. So he decides to give them final 5 minutes. When he comes everybody was able to answer him correctly.

So what is the answer? and why?

##### The Oldest Plays the Piano

Two MIT math grads bump into each other while shopping at Fry's. They haven't seen each other in over 20 years.
First grad to the second: "How have you been?"
Second: "Great! I got married and I have three daughters now."
First: "Really? How old are they?"
Second: "Well, the product of their ages is 72, and the sum of their ages is the same as the number on that building over there..."
First: "Right, ok... Oh wait... Hmm, I still don't know."
Second: "Oh sorry, the oldest one just started to play the piano."
First: "Wonderful! My oldest is the same age!"

How old was the first grad's daughter?

##### All 5 Puzzle

This is an interesting puzzle from Einstein. There are 5 houses. Each house has its own unique colour. All house owners are of different nationalities. They all have different pets. They all smoke different cigarettes.

The english man lives in red house. The swade has a dog. The dene drinks tea. The green house is on left side of white house. They drink coffee in green house. The man who smokes Pall mall has birds. In the yellow house they smoke Dunhill. In the middle house they drink milk. The Norwegian lives in first house. The man who smokes Blend lives in house next to house with cats. In the house next to the house where they have horse,they smoke Dunhill. The man who smokes Blue Master drinks beer. The German smokes Prince. The norwegian lives next to the blue house. They drink water in the house next to the house where they smoke blend.

So who owns the zebra?

##### Real Train Problem

This is real time puzzle. Swap the boggi "A" & "B" and then Engine should be at its original position! Boggie can't be moved without the help of engine.

Length of boggie A & boggie B is 15 units. Length of Engine E is 20 units. * and \$ indicates infinite length track while # is track of 15 units (that means engine can not go there!)