Credit-apportionment in rule-based systems: problem analysis and algorithm synthesis