There are 24 possible ways for the weights to be assessed to the four coins. With three weighings there are only 27 possible outcomes. Four outcomes from all 27 possibilites involve two or three equal weighings. Therefore at least one of the 24 possible ways to sort the coins involves at least two equal, different weighings.
The only possible way for a weighing of the coins to balance is to have the 21g and 22g coin on one side and the 20g and 23g on the other side. With only one possibility for an equal, there cannot be 24 possible outcomes from the weighings.
Federico Kereki gives an information theory solution here.
Charlie gives a more thorough analysis here.