Puzzles

1. You have 3 bags of mislabeled marbles in front of you. One says "Black," one says "White," and one says "Mixed." What's the least number of marble(s) you need to pick from what bag(s) to ascertain the contents of all three?

2. You are given 10 seeds. What will the configuration look like if you have to use those 10 seeds to plant 5 rows with 4 seeds in each row?

3. You are standing in front of a mote. You are in the desert. There are no trees, castles, or anything. The mote is 100 feet wide and 100 feet deep. The mote is empty. You are given two things to get across the mote: a 10 foot wooden ladder and an infinite amount of rope. How do you get across the mote?

4. You have 4 people to get across 1 bridge in the dark night. You have 1 flashlight. Person 1 takes 1 minute to cross. Person 2, 2 minutes. Person 3, 14 minutes. Person 4, 15 minutes. You can only have 2 people on the bridge at any one time. You only have 24 minutes to get all 4 people across the bridge. How do you do it?

5. You have one fuse that burns at an inconsistent rate and burns out completely in one hour. How can you be sure when you’ve reached the 30 minute point?

5a. You have two fuses, each that burns at an inconsistent rate and each that burns out completely in one hour. How do you know when you’ve reached the 45 minute point?

6. You have 9 marbles, all the same size, but one weighing more than the other 8. You have a scale (a balance). What is the least number of tries you’ll need to ascertain the weightier marble?

7. You have a 5 gallon jug and an 8 gallon jug. Both are empty. You are given a faucet with an unlimited water supply. Without any measuring devices other than the jugs themselves, how can you ensure that the 8 gallon jug is half-full?

Puzzle. You are given a square 4x6 of integer numbers. You must fill the cells with integers in the way that the sum of elements on all rows are equal between them and are equal with sum of elements on all columns. You have to find out if this is possible to do, prove that it is possible, or prove that it is not possible. The only possibility to make this happen is to fill the square with 0. Otherwise it is not possible, because the sum of sums on columns and on rows should be equal. And the square is 4X6. Respectively there is no integer X that is the sum of elements on columns and rows that will satisfy the equation: 4*X=6*X

5. Puzzle - You have 25 horses and you can run them in groups of 5 only find out the top 3 in the minimum number of races.

4. Riddle question, There is two empty cans, one is 5 liter and another one is 7 liter

How can I get 4 liter of water using those two cans?

* Asked me about various .net technologies used at my work. Most Challenging work.

* Showed me a game & asked me to write a logic to find the winner at any given point of the game

I don't know the name of the game, it has 6 rows & 7 columns. We can place either Red or Yellow coins in each slot. If any one color coins appear in a sequence of 4 in a row or straight or diagonal , we have a winner.

I took a two dimensional char array (6,7) & iterated each row & cell to find the solution, but he wanted more efficient solution. Suggested me to you interger array instead.

Q: (Puzzle) You have 9 bags of coins with 10 coins in each bag. One bag has some fake coins that weigh less than the real coins. Given a balancing scale how can you determine which bag contains the fake coins?

A: Put 3 bags of coins on each side of the balance. If the scale balances then the fake bag is among the 3 bags not on the scale. If the scale doesn’t balance then you know which set of 3 bags contains the fake coins. Then put one bag on each side of the scale and you’ll know which of the 3 bags contains the fake coins.

Q: (Puzzle) What is the maximum amount of coinage you can have and not be able to produce exactly one dollar.

A. 3 Quarters, 4 Dimes, 4 Pennies = $1.19

You have 12 stacks of coins and one of the stacks is of counterfeit coins. The difference is detectable by weight. The genuine coins weigh like ten grams each and the counterfeit are like nine grams. You have a scale but you can only weigh one time. How do you find which coins are counterfeit. What he left out of his explanation of the problem is the fact that the one time weight event can be of any combination of coins from any or all of the stacks. As soon as I understood this the answer was obvious.

The answer: Take one coin from the first stack two from the second thee from the third etc.. until you have 1 - 12 coins from each stack( not arbitrary but sequential). Calculate the weight that the stack should weigh if all the coins where 10 grams. The difference will between what the stack should be and a 1-12 gram difference will tell you which stack, 1-12, is counterfeit.

1) Given a bag of 10 white marbles, 12 red marbles,

> and 16 black marbles, how many marbles would you

> have

> to remove to be sure and get 3 of one color?

>

> 2) Given a ladder with N rungs, and you can take a

> step of either 1 or 2 rungs, how many ways are there

> to climb the ladder with N rungs?

>

> 3) You have two 6 sided dice with numbers on them,

> and

> you want to display the day of the month, 03, 12,

> 19... What numbers would be on each die?

>

> 4) given the picture...

> b w b w

> > | < < <

> A B C D

> Where A is looking at a wall, and B is looking at

> the

> wall, C is looking at B and the wall... Each of them

> have a hat on. There are two hats that are black,

> and

> two that are white. If in the first ten minutes

> someone can say what color there hat is, they will.

> They cannot turn, the wall is not a mirror. After

> the

> ten minutes are up, who will know what color their

> hat

> is and how can they be 100% sure of it?

>

> 5) |-|-|

> |-|-|-|-|

> |-|-|-|-|

> |-|-|

> Looking at this as 3 rows, 2 columns in the top

> row,

> 4 middle, and 2 bottom. Place the numbers 1 thru 8

> in

> this drawing where no two numbers which are in

> sequence can be either adjacent or diangle from each

> other.

No comments: