You have two sets of five coins. Each set has four real 30g coins and one 31g fake coin. It is easy to find the fake coins using a balance scale a total of four times, two weighings for each set.
Can you find a strategy which uses only three weighings?
let one set be ABCDE ,the other abcde/
1st: ABC on the left abc -right
if one prevails , say left then the heavy coins are :one from the set A,B, C, plus either d or e.
two separate weighings: A vs B, and d vs e determine a heavy coin from each set.
if first weighing results in equality,try for
next AB vs de if equal C is not the heavy one,
so it is A or B and either d or e (third time will show the
heavy one- e.g. pick up A vs d )/
It is similar reasoning for one of either sides being heavier: leave it to you.