2010/12/1 రహ్మానుద్దీన్ షేక్ <[email protected]>:
> I am struck at solving this 3 jugs problem , the problem statement is:
> there are three jugs of capacities 19oz, 13oz., and 7 oz.
> The 1st jar is empty and the other two are full. Now we need to obtain 10 oz
> into any one of the jar.
> How to solve this kind of problems. I just need the logic to start with.

For 3 jugs, use trilinear coordinates.
For N jugs, do a breadth first search.

Complete working example:
http://delphiforfun.org/programs/WaterJugs.htm


You have not mentioned what relation this post has to do
with FOSS.  In future, please mark such posts as off-topic.

- Raja
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to