Potential games are necessary to ensure pure nash equilibria in cost sharing games