Forward and Backward Chaining
Forward chaining is data-driven: new facts fire rules, more facts appear, until the query is known. Backward chaining is goal-driven: start from what you want, ask what would prove it, recurse. Expert systems use both.
Medical: lots of symptoms arriving → forward. “Does the patient have measles?” → backward. Horn clauses keep both tractable.
Forward and Backward Chaining — output — forward derived {'dirt', 'suck'}. Backward starts from the goal suck.
One situation for each chaining style.