There are three gallons X,Y & Z.

Gallon X having capacity of eight liters is with filled with 5 liters of liquid.

Gallon Y having capacity of five liters is with filled with 3 liters of liquid.

Gallon Z having capacity of three liters is with filled with 2 liters of liquid.

How can you measure 1 liter of liquid in minimum number of steps ?

Step 1) Pour 1 litre of liquid from gallon X to gallon Z. Now 4 litres of liquid is left in the gallon X and gallon Z is full.

Step 2) Pour liquid from gallon Z to gallon Y. Now as soon as gallon Y is full , you know there is one liter of liquid is in gallon Z.