Logic Puzzles

1: You have a three gallon and a five gallon measuring device. You wish to measure out four gallons.

2: There are 3 black hats and 2 white hats in a box. Three men (we will call them A, B, and C) each reach into the box and place one of the hats on his own head. They cannot see what color hat they have chosen. The men are situated in a way that A can see the hats on B and C's heads, B can only see the hat on C's head and C cannot see any hats. When A is asked if he knows the color of the hat he is wearing, he says no. When B is asked if he knows the color of the hat he is wearing he says no. When C is asked if he knows the color of the hat he is wearing he says yes and he is correct. What color hat and how can this be?

3: You are an archaeologist that has just unearthed a long-sought triplet of ancient treasure chests. One chest is plated with silver, one with gold, and one with bronze. According to legend, one of the three chests is filled with great treasure, whereas the other two chests both house man-eating pythons that can rip your head off. Faced with a dilemma, you then notice that there are inscriptions on the chests:
Silver Chest
Treasure is in this Chest.

Gold Chest
Treasure is not in this Chest.

Bronze Chest
Treasure is not in the Gold Chest.

You know that at least one of the inscriptions is true and at least one of the inscriptions is false. Which chest do you open?

4: You have two ropes, each of which takes one hour to burn completely. Both of these ropes are nonhomogeneous in thickness, meaning that some parts of the ropes are chunkier than other parts of the rope. Using these nonhomogeneous ropes and a lighter, time exactly 45 minutes.

5: There are three closed and opaque cardboard boxes. One is labeled "APPLES", another is labeled "ORANGES", and the last is labeled "APPLES AND ORANGES". You know that the labels are currently misarranged, such that no box is correctly labeled. You would like to correctly rearrange these labels. To accomplish this, you may draw only one fruit from one of the boxes. Which box do you choose, and how do you then proceed to rearrange the labels?

6: In the following equation each letter maps to a unique digit in the range 1 through 9.

PORK / CHOP = C

and

C > 2

Write the equation using actual digits.

7: A trucking company operates a fleet of trucks between Dallas and Austin. There is always one truck leaving Dallas on the hour every hour for Austin. There is always one truck leaving Austin on the hour every hour for Dallas. The trip from Austin to Dallas takes 4 hours and it is the same amount of time from Dallas to Austin. How many trucks of the parent company does an operator see on I-35 on a trip from Austin to Dallas?

8: Imagine you are standing in front of a long hall way that has 100 doors. Each door is numbered starting from 1 and ending at 100. All the doors are closed. There are also 100 persons numbered from 1 to 100. The first person comes and opens all the doors. The second person starts at door number 2 and visits all the even doors and closes them.

The third person starts at door number 3 and visits all the doors that are multiples of 3. If a door is open he closes it. If a door is closed he opens it. The fourth person starts at door number 4 and visits all the doors that are multiples of 4 and he closes open doors and opens closed doors.

After all 100 people have gone through the hallway, how many doors are still open?

9: Melissa and Jessica were working on the computer along with their friends Sandy and Nicole. Suddenly, I heard a crash and then lots of shouts. I rushed in to find out what was going on, finding the computer monitor on the ground, surrounded with broken glass! Sandy and Melissa spoke almost at the same time:

Sandy saying, "It was Nicole!"
Melissa saying, "No, it was Sandy!"
Jessica yelled, "It wasn't me!"
With a pretty straight face Nicole said, "Sandy's a liar."

Only one of them was telling the truth, so who knocked over the monitor?

10: You have 20 coin machines, each of which produce the same kind of coin. You know how much a coin is supposed to weigh. One of the machines is defective, in that every coin it produces weighs 1 gram less than it is supposed to. You also have an electronic weighing machine. How can you determine which of the 20 machines is defective with only one weighing?

By one weighing, we mean you put a certain number of coins on the weighing machine and make a note of the reading and that is all. You are not allowed to add a few coins at a time on the weighing machine and watch the reading increase. That is multiple weighings.

You are allowed to crank out as many coins from each machine as you like.

11: There are four beetles on the four corners of a square that has sides of length 18 inches. Starting from the upper left corner and going clockwise the beetles are A, B, C, and D. Beetles A and C are males and beetles B and D are females. Once the beetles are set on the four corners and released A moves towards B, B moves towards C, C moves towards D, and D moves towards A. All the beetles move at constant speed and always at right angles to the direction that the target beetle is moving.

Draw the figure that describes the path that the beetles take. They will all eventually meet at the center of the square. What is the total distance covered by each beetle?

12: Bob and Charlie just met Alice. "When is your birthday?" Bob asked Alice.

Alice thought a second and said, "I am not going to tell you, but I will give you some clues." She wrote down a list of 10 dates:

May 15, May 16, May 19

June 17, June 18

July 14, July 16

August 14, August 15, August 17

"My birthday is one of these," she said.

Then Alice whispered in Bob's ear the month, and only the month, of her birthday. To Charlie, she whispered the day, and only the day.

"Can you figure it out now?" she asked Bob.

Bob: I don't know when your birthday is, but I know Charlie doesn't know, either.

Charlie: I didn't know originally, but now I do.

Bob: Well, now I know, too!

When is Alice's birthday?

13: After a flood three married couples found themselves surrounded by water, and had to escape from their holiday hotel in a boat that would only hold three persons at a time. Each husband was so jealous that he would not allow his wife to be in the boat or on either bank with any other man (or men) unless he was himself present.

Find a way of getting the couples across the water to safety which requires the smallest number of boat crossings. Swimming or helicopters are not allowed!

14: By putting arithmetical signs in suitable places between the digits make the following sum correct:

1 2 3 4 5 6 7 8 9 = 100

There is more than one solution.

15: A green grocer had a pair of scales and four weights. The weights were such that with them he could correctly weigh any whole number of kilo grams from 1 to 40. How heavy was each weight and how could he manage to weigh all the different weights?

16: This problem appeared in Life Magazine on 17 Dec 1962.

  1. There are five houses.
  2. The Englishman lives in the red house.
  3. The Spaniard owns the dog.
  4. Coffee is drunk in the green house.
  5. The Ukrainian drinks tea.
  6. The green house is immediately to the right of the ivory house.
  7. The Old Gold smoker owns snails.
  8. Kools are smoked in the yellow house.
  9. Milk is drunk in the middle house.
  10. The Norwegian lives in the first house on your left.
  11. The man who smokes Chesterfields lives in the house next to the man with the fox.
  12. Kools are smoked in the house next to the house where the horse is kept.
  13. The Lucky Strike smoker drinks orange juice.
  14. The Japanese smokes Parliaments.
  15. The Norwegian lives next to the blue house.
Now, who drinks water? Who owns the zebra?

In the interest of clarity, it must be added that the five houses are in one line and each is painted a different color (red, blue, yellow, green, and ivory), and their inhabitants are of different national extractions (Englishman, Japanese, Norwegian, Spaniard, and Ukrainian), own different pets (dog, fox, horse, snails, and zebra), drink different beverages (coffee, milk, orange juice, tea, and water) and smoke different brands of American cigarets [sic] (Chesterfield, Kools, Lucky Strike, Old Gold, and Parliament).

One other thing: in statement 6, right means your right as you face the houses.

17: What is the four-digit number in which the first digit is one-third the second, the third is the sum of the first and second, and the last is three times the second?

18: A pot contains 75 white beans and 150 black ones. Next to the pot is a large pile of black beans.

A somewhat demented cook removes the beans from the pot, one at a time, according to the following strange rule: He removes two beans from the pot at random. If at least one of the beans is black, he places it (the black bean) on the bean pile and drops the other bean, no matter what color, back in the pot. If both beans are white, on the other hand, he discards both of them and removes one black bean from the pile and drops it in the pot.

At each turn of this procedure, the pot has one less bean in it. Eventually, just one bean is left in the pot. What color is it?

19: A stick 100 cm long needs to be cut into 100 one centimeter pieces. What is the minimum number of cuts required if you are allowed to cut several pieces of stick at the same time?

Also outline an algorithm that performs this task with the minimum number of cuts for a stick that is n cm long.

20: In a single elimination tournament - such as the tennis Grand Slam championships - every losing player is immediately eliminated from the subsequent rounds of play until a single winner is determined. If such a tournament starts with n players, determine the following:

  1. What is the total number of matches needed to get a winner?
  2. How many rounds are there in such a tournament?
  3. How many more matches need to be played to determine the second best player based on the information produced by the tournament?

21: A guy is sitting in some foreign country in death row awaiting his execution the next day. The executioner decides to grant him one last favor; he'll give him a choice in the execution method. The prisoner is therefore allowed to make one last statement. If this statement is true, he'll be hanged the next day. If however his statement is false he will be beheaded the next day. What should the prisoner say?

22: You are trapped in a room with two doors. One leads to certain death and the other leads to freedom. You don't know which is which.

There are two robots guarding the doors. They will let you choose one door but upon doing so you must go through it.

You can, however, ask one robot one question. The problem is one robot always tells the truth, the other always lies and you don't know which is which.

What is the question you ask?

23: There are two beautiful yet remote islands in the south pacific. The Islanders born on one island always tell the truth, and the Islanders from the other island always lie.

You are on one of the islands, and meet three Islanders. You ask the first which island they are from in the most appropriate Polynesian tongue, and he indicates that the other two Islanders are from the same Island. You ask the second Islander the same question, and he also indicates that the other two Islanders are from the same island.
Can you guess what the third Islander will answer to the same question?

24: You have twelve coins. You know that one is fake. The only thing that distinguishes the fake from the real ones is that its weight is imperceptibly different. You have a perfectly balanced scale that only tells which side weighs more than the other side.

What is the smallest number of times you must use the scale in order to always find the fake coin?

Use only the twelve coins themselves and no others, no other weights, no cutting coins, no pencil marks on the scale. etc.

These are modern coins, so the fake coin is not necessarily lighter.

Presume the worst case scenario, and don't hope that you will pick the right coin on the first attempt.

25: Mr. Gupta, his sister, his son, and his daughter are tennis players. The following facts refer to the people mentioned:
a. The best player's twin and the worst player are of opposite gender.
b. The best player and the worst player are the same age.
Which one of the four is the best player?

26: You want to traverse a square grid of size 4x4. You have to start at the upper left corner and land on the lower right corner one square at a time. You can only move to the right or move down. How many different paths can you take to travel through the grid?