You have 4 weights weighing 2,3,5 and 7 pounds. The problem is none of them are marked. What is the fewest number of weighings you need using a balance scale figure out which weights are which?
Donald E Knuth actually has mentioned that you can not sort 4 values in
< 5 comparisons using sorting networks, but since this involves
weights, and you can add them up, etc... there is probably something
else to it!
|
Posted by dhruv
on 2004-08-23 11:54:45 |