∑GATE DA Atlas

Propositional Logic

Syntax and semantics of propositional logic, truth tables, validity, satisfiability and entailment, the key logical equivalences, converting to CNF, sound inference rules (modus ponens, modus tollens, resolution), proof by resolution refutation, Horn clauses with forward and backward chaining, and knowledge-based agents.

Section 710 practice questions

Syntax

Atomic propositions (p,q,rp, q, r, or names like Raining) are combined with connectives:

ConnectiveSymbolRead as
negation¬p\neg pnot pp
conjunctionp∧qp \wedge qpp and qq
disjunctionp∨qp \vee qpp or qq (inclusive)
implicationp→qp \to qif pp then qq
biconditionalp↔qp \leftrightarrow qpp if and only if qq

Precedence (highest first): ¬\neg, ∧\wedge, ∨\vee, →\to, ↔\leftrightarrow.

Semantics

A model (interpretation) assigns true/false to every atom; the truth of compound sentences follows the truth tables:

ppqq¬p\neg pp∧qp\wedge qp∨qp\vee qp→qp\to qp↔qp\leftrightarrow q
TTFTTTT
TFFFTFF
FTTFTTF
FFTFFTT
TermMeaning
Valid (tautology)true in every model, e.g. p∨¬pp \vee \neg p
Satisfiabletrue in at least one model
Unsatisfiable (contradiction)true in no model, e.g. p∧¬pp \wedge \neg p
Entailment KB⊨α\text{KB} \models \alphaα\alpha is true in every model of KB
Equivalence α≡β\alpha \equiv \betasame truth value in every model

Key facts: α\alpha is valid iff ¬α\neg\alpha is unsatisfiable; KB⊨α\text{KB} \models \alpha iff KB→α\text{KB} \to \alpha is valid iff KB∧¬α\text{KB} \wedge \neg\alpha is unsatisfiable.

Logical equivalences

LawEquivalence
Double negation¬¬p≡p\neg\neg p \equiv p
De Morgan¬(p∧q)≡¬p∨¬q\neg(p \wedge q) \equiv \neg p \vee \neg q; ¬(p∨q)≡¬p∧¬q\neg(p \vee q) \equiv \neg p \wedge \neg q
Implication eliminationp→q≡¬p∨qp \to q \equiv \neg p \vee q
Contrapositivep→q≡¬q→¬pp \to q \equiv \neg q \to \neg p
Biconditionalp↔q≡(p→q)∧(q→p)p \leftrightarrow q \equiv (p \to q) \wedge (q \to p)
Distributivityp∨(q∧r)≡(p∨q)∧(p∨r)p \vee (q \wedge r) \equiv (p \vee q) \wedge (p \vee r); dually
Commutativity, associativityfor ∧\wedge and ∨\vee
Exportation(p∧q)→r≡p→(q→r)(p \wedge q) \to r \equiv p \to (q \to r)
Absorptionp∨(p∧q)≡pp \vee (p \wedge q) \equiv p

Normal forms

  • Literal: an atom or its negation. Clause: a disjunction of literals.
  • CNF (conjunctive normal form): a conjunction of clauses — the input to resolution and SAT solvers.
  • DNF: a disjunction of conjunctions of literals.

Conversion to CNF: (1) eliminate ↔\leftrightarrow and →\to; (2) push ¬\neg inwards with De Morgan and double negation; (3) distribute ∨\vee over ∧\wedge.

Inference rules

RulePremisesConclusion
Modus ponensα→β\alpha \to \beta, α\alphaβ\beta
Modus tollensα→β\alpha \to \beta, ¬β\neg\beta¬α\neg\alpha
And-eliminationα∧β\alpha \wedge \betaα\alpha
Hypothetical syllogismα→β\alpha \to \beta, β→γ\beta \to \gammaα→γ\alpha \to \gamma
Disjunctive syllogismα∨β\alpha \vee \beta, ¬α\neg\alphaβ\beta
Resolutionℓ1∨⋯∨ℓk∨p\ell_1 \vee \dots \vee \ell_k \vee p, ¬p∨m1∨⋯∨mn\neg p \vee m_1 \vee \dots \vee m_nℓ1∨⋯∨ℓk∨m1∨⋯∨mn\ell_1 \vee \dots \vee \ell_k \vee m_1 \vee \dots \vee m_n

A procedure is sound if it derives only entailed sentences and complete if it can derive every entailed sentence.

Resolution refutation

To prove KB⊨α\text{KB} \models \alpha: convert KB∧¬α\text{KB} \wedge \neg\alpha to CNF and repeatedly resolve pairs of clauses; deriving the empty clause (a contradiction) proves entailment. Resolution refutation is sound and complete for propositional logic.

Horn clauses and chaining

A Horn clause has at most one positive literal: facts (qq), rules (p1∧⋯∧pk→qp_1 \wedge \dots \wedge p_k \to q), and goals/constraints (¬p1∨⋯∨¬pk\neg p_1 \vee \dots \vee \neg p_k). For Horn knowledge bases, inference takes linear time:

  • Forward chaining (data-driven): repeatedly fire rules whose premises are all known, adding conclusions until the query appears or nothing changes.
  • Backward chaining (goal-driven): to prove qq, find a rule concluding qq and recursively prove its premises (the basis of Prolog).

Knowledge-based agents

An agent keeps a knowledge base, TELLs it percepts, ASKs it what to do, and acts. The Wumpus world is the textbook example: from "breeze in [1,2]" and the rule "a square is breezy iff a neighbour has a pit", the agent infers where pits might be. Propositional logic is limited because it cannot express general statements about objects compactly — that is what predicate logic adds.

Quick revision

Practice questions

GATE-style questions: 4 one-mark and 6 two-mark. Wrong MCQs cost ⅓ of their marks in the real exam; MSQ and NAT have no negative marking. Attempt each before opening the solution.

Q1MCQ1 mark

The implication p→qp \to q is logically equivalent to

Q2MSQ2 marks

Which of the following are tautologies (true under every assignment)?

One or more options are correct.

Q3NAT2 marks

Over the variables p,q,rp, q, r, the number of truth assignments that satisfy (p∨q)∧¬r(p \vee q) \wedge \neg r is ______.

Q4MCQ2 marks

The conjunctive normal form of (p∧q)→r(p \wedge q) \to r is

Q5MCQ1 mark

A knowledge base KB entails a sentence α\alpha (KB⊨α\text{KB} \models \alpha) if and only if

Q6NAT2 marks

Over p,q,rp, q, r, the number of models of (p→q)∧(q→r)(p \to q) \wedge (q \to r) is ______.

Q7MCQ2 marks

Applying the resolution rule to the clauses (p∨q)(p \vee q) and (¬p∨r)(\neg p \vee r) yields

Q8MSQ2 marks

Which of the following inference patterns are sound?

One or more options are correct.

Q9NAT1 mark

The number of rows in a truth table over 5 propositional variables is ______.

Q10MCQ1 mark

Which clause is a Horn clause (at most one positive literal)?