A farmer needs 8 gallons of water. He has only three unmarked buckets, two 6 gallon and one 11 gallon bucket.
How can he collect 8 gallons of water using three unmarked buckets? Provide solution with minimal water wastage.
6G1; 6G2; 11G; waste
0; 0; 0; 0
6; 0; 0 ;0 - fill 6G1
0; 0; 6; 0 - empty 6G1 into 11G
6; 0; 6; 0 - refill 6G1
1; 0; 11; 0 - fill 11G from 6G1 leaving 1gall in 6G1
1; 6; 5; 0 - fill 6G2 from 11G leaving 5gall in 11G
1; 6; 0; 5 - waste contents of 11G
1; 0; 6; 5 - empty 6G2 back into 11G
1; 6; 6; 5 - refill 6G2
1; 1; 11; 5 - fill 11G from 6G2 leaving 1gall in 6G2
2; 0; 11; 5 - transfer contents of 6G2 to 6G1
2; 6; 5 ;5 - fill 6G2 from 11G
2; 6; 0; 10 - waste contents of 11G
0; 0; 8; 10 - pour contents of 6G1 and 6G2 into 11G