Thursday, February 09, 2006

Divide 40 KG Stone

Puzzle: Divide 40 Kg Stone into 4-Pieces such that using
4-Pieces we can measure the all weights from 1 to 40 (only integer values).

I took half day to solve this problem.

Comments:
As you have stated the puzzle, a solution is not possible. Please provide more details on the method of weighing.

I assume you mean weighing using a balance, where you can put the unknown mass (which you want to determine) on one side, and put any combination of stones on either side of the balance ?
 
Thanks for your comment.

We can put stones both sides of balance
 
anonymous said:
> As you have stated the puzzle,
> a solution is not possible.

You're wrong. The weights 1, 3, 9 and 27 work perfectly fine.
 
Hello Pradeep,

Maybe you can guide us: do you want people to not post answers? Are you interested in programs that solve the puzzles? I solved the 40kg puzzle in Lisp. What languages are other people using?
 
Yes! I am interested in solving puzzles programmatically.

Please post your code in lisp. I am familiar with C++ so i will try to convert your code to C/C++.
 
wats the answer to this problem??
can someone kindly explain :S
 
The answer is 1,3,9,27
 
Lets call n the first weight.

The next consecutive even/odd integer would have to be (n+2)

So the 4 weights would look like :- n, n+2, n+4, n+6
Now set their sum equal to 40 and
solve for n.
n+(n+2)+(n+4)+(n+6)=40
4n+12=40
4n=28
n=7
Therefore 7,9,11,and 13 are the four numbers.
 
"The next consecutive even/odd integer would have to be (n+2)". How did you arrive at this conclusion?.
 
Post a Comment

Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?