Knowledge and reasoning
Introduzido
Vocabulário
| English | Significado |
|---|---|
| propositional logic | Logic combining statements with truth values using logical connectives. |
| inference/ˈɪnfərəns/ | Deriving conclusions from premises using a reasoning rule or model. |
| forward chaining | Applying rules to known facts to derive additional conclusions. |
| backward chaining | Starting with a goal and working backward to facts or subgoals that could support it. |
English
Rules and consequences
- Propositional logic: facts and rules ($P \to Q$); inference applies modus ponens. Forward chaining floods from the facts; backward chaining aims from the query — symbolic reasoning draws conclusions the data never saw.

{exercise:uni-cs1302-rules}
Prática
Forward chaining starts from —
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
Flood from what is known; backward chaining aims from the goal.
English
The course KB, run
- F1 Storm; F2 Weekend; R1 Storm → Delayed; R2 Weekend → HeavyTraffic; R3 HeavyTraffic → Delayed; R4 Delayed → RefundRisk. Forward chaining: wave one derives Delayed and HeavyTraffic, wave two RefundRisk.
- Backward chain for RefundRisk: goal ← Delayed (R4) ← Storm (R1) ← fact: proved in three steps, R2/R3 never fire — goal-directed search.
{exercise:uni-cs1302-kb}
Prática
The course KB derives RefundRisk in — waves
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
Wave one: Delayed, HeavyTraffic; wave two: RefundRisk.
English
Sound by construction
- Every step is modus ponens on assumed rules, so derivations cannot invent falsehood; completeness (every consequence reachable) is the harder property.
- To prove $Q$ by refutation: assume $\neg Q$, derive the empty clause by resolution — the machinery behind SAT solvers. The converse error ($P \to Q$ read as $Q \to P$) is the classic trap.
{exercise:uni-cs1302-sound}
Prática
Modus ponens makes inference —
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
Each step is a valid implication on assumed rules - no falsehood invented.