Jug1----->Jug1(19 litres)
Jug2-move->Jug2(13 litres)
Jug3----->Jug3(7litres)
0----->13----->13--X-->6----->6----->
13--X-->0---->7----->7----->13--X-->
7----->7--X-->0----->7--X-->1----->
19----->19--X-->12----->12--X-->5----->
0----->1----->1----->8----->8----->
1--X-->0----->7--X-->0----->7--X-->
5----->18----->18--X-->11----->11--X-->
13--X-->0----->2----->2----->9----->
2----->2--X-->0----->7--X-->0----->
4----->4----->17----->17--X-->10----->10
9----->13--X-->0----->3----->3----->10
7--X-->3----->3--X-->0----->7--X-->0
The X is which jug poured
So...what kind of
pattern can we discern from this?
To me, it looks like we move from the lowest to the middle (until it will fill up the middle)
then from middle to biggest until it will over flow then we dump what we can into the small one and rinse repeat.
So
That should do it I think. Have no idea as to syntax or anything. It's all notepad psuedo'd
It's a really slow day at work...if only someone out there was bored enough to actually check my logic. >.>
[ August 18, 2008: Message edited by: Paul Yule ]