100% FREE Updated: Apr 2026 Discrete Mathematics Foundations of Discrete Math

Boolean Logic

Comprehensive study notes on Boolean Logic for CMI Data Science preparation. This chapter covers key concepts, formulas, and examples needed for your exam.

Boolean Logic

Overview

Welcome to the foundational chapter on Boolean Logic, a cornerstone of Discrete Mathematics and an indispensable tool in your Masters in Data Science journey. This chapter will introduce you to the fundamental principles that govern how computers process information, how databases are queried, and how algorithms make decisions. Mastering Boolean Logic is not just about understanding theoretical concepts; it's about developing the precise computational thinking essential for manipulating data and building robust analytical models.

For your CMI examinations, a solid grasp of Boolean Logic is critical. It forms the bedrock for understanding more advanced topics such as set theory, graph theory, and even the underlying logic of programming constructs and data structures. Expect questions that test your ability to interpret, construct, and evaluate logical statements, as these skills are directly transferable to practical data science problems, from filtering datasets efficiently to designing conditional logic within machine learning pipelines.

By focusing on propositions, logical operators, and truth tables, this chapter equips you with the analytical framework to break down complex problems into manageable, logical components. This systematic approach is invaluable for debugging code, optimizing queries, and ensuring the logical integrity of your data science projects. Dive in to build a strong, exam-relevant foundation that will serve you throughout your career.

---

Chapter Contents

| # | Topic | What You'll Learn |
|---|-------|-------------------|
| 1 | Propositions and Logical Operators | Understand basic statements and how to combine them. |
| 2 | Truth Tables | Evaluate logical expressions systematically for all cases. |

---

Learning Objectives

❗ By the End of This Chapter

After studying this chapter, you will be able to:

  • Define propositions and assign appropriate truth values.

  • Identify and correctly apply fundamental logical operators (e.g., ∧\land, ∨\lor, Β¬\neg).

  • Construct comprehensive truth tables for compound logical expressions.

  • Analyze and interpret the truth values of complex logical statements.

---

Now let's begin with Propositions and Logical Operators...

Part 1: Propositions and Logical Operators

Introduction

Propositions and logical operators form the bedrock of discrete mathematics, providing a formal system for reasoning and computation. In the context of a Masters in Data Science, a rigorous understanding of this topic is indispensable. It underpins database query languages, the design of digital circuits, the formal specification of software systems, and the logical foundations of artificial intelligence and machine learning algorithms. For the CMI exam, proficiency in manipulating logical expressions, evaluating their truth values, and applying them to solve reasoning problems is frequently tested. This unit establishes the fundamental tools for constructing valid arguments and analyzing complex statements, crucial for both theoretical understanding and practical application.
πŸ“– Proposition

A proposition (or statement) is a declarative sentence that is either true or false, but not both. It must have a definite truth value.

Examples:
"The sky is blue." (True)
" 2+2=52 + 2 = 5." (False)
* "Every prime number greater than 22 is odd." (True)

Non-examples:
"What time is it?" (Question)
"Go to your room." (Command)
* " x+1=3x + 1 = 3." (Unless xx is specified, its truth value is not definite)

---

---

Key Concepts

1. Atomic and Compound Propositions

An atomic proposition is a simple proposition that cannot be broken down into simpler propositions. For instance, "It is raining" is an atomic proposition.

Compound propositions are formed by combining atomic propositions using logical connectives (also known as logical operators). These connectives specify how the truth value of the compound proposition depends on the truth values of its constituent atomic propositions.

2. Truth Values

Every proposition has exactly one of two possible truth values:
* True (T) or 1
* False (F) or 0

3. Logical Connectives

Logical connectives are symbols or words used to combine propositions and form new, more complex propositions. Their meaning is defined by truth tables, which show the truth value of the compound proposition for every possible combination of truth values of its atomic components.

Negation (Β¬\neg)

The negation of a proposition PP, denoted by Β¬P\neg P (read as "not PP"), is true when PP is false, and false when PP is true.

πŸ“ Negation
P¬PTFFT\begin{array}{cc} P & \neg P \\ \text{T} & \text{F} \\ \text{F} & \text{T}\end{array}

Variables:

    • PP = an atomic proposition


When to use: To reverse the truth value of a proposition.

Conjunction (∧\land)

The conjunction of two propositions PP and QQ, denoted by P∧QP \land Q (read as "PP and QQ"), is true if and only if both PP and QQ are true. Otherwise, it is false.

πŸ“ Conjunction
PQP∧QTTTTFFFTFFFF\begin{array}{ccc} P & Q & P \land Q \\ \text{T} & \text{T} & \text{T} \\ \text{T} & \text{F} & \text{F} \\ \text{F} & \text{T} & \text{F} \\ \text{F} & \text{F} & \text{F}\end{array}

Variables:

    • P,QP, Q = atomic propositions


When to use: To express that two conditions must both be met.

Disjunction (∨\lor)

The disjunction of two propositions PP and QQ, denoted by P∨QP \lor Q (read as "PP or QQ"), is true if at least one of PP or QQ is true. It is false only when both PP and QQ are false. This is an inclusive or.

πŸ“ Disjunction
PQP∨QTTTTFTFTTFFF\begin{array}{ccc} P & Q & P \lor Q \\ \text{T} & \text{T} & \text{T} \\ \text{T} & \text{F} & \text{T} \\ \text{F} & \text{T} & \text{T} \\ \text{F} & \text{F} & \text{F}\end{array}

Variables:

    • P,QP, Q = atomic propositions


When to use: To express that at least one of two conditions must be met.

Implication (β€…β€ŠβŸΉβ€…β€Š\implies)

The implication (or conditional statement) of PP and QQ, denoted by Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q (read as "PP implies QQ" or "If PP, then QQ"), is false if and only if PP is true and QQ is false. In all other cases, it is true.
Here, PP is the hypothesis (or antecedent) and QQ is the conclusion (or consequent).

πŸ“ Implication
PQPβ€…β€ŠβŸΉβ€…β€ŠQTTTTFFFTTFFT\begin{array}{ccc} P & Q & P \implies Q \\ \text{T} & \text{T} & \text{T} \\ \text{T} & \text{F} & \text{F} \\ \text{F} & \text{T} & \text{T} \\ \text{F} & \text{F} & \text{T}\end{array}

Variables:

    • P,QP, Q = atomic propositions


When to use: To express cause-and-effect or conditional relationships.

Important Interpretations of Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q:
* "If PP, then QQ."
* "PP implies QQ."
* "PP is sufficient for QQ." (If PP happens, QQ is guaranteed.)
* "QQ is necessary for PP." (If QQ doesn't happen, PP cannot happen.)
* "PP only if QQ."
* "QQ whenever PP."

Worked Example: Translating English to Implication

Problem: Translate the following assertion into a propositional formula: "To get an A in the class, it is necessary for you to get an A on the final."

Solution:

Step 1: Define atomic propositions.
Let RR: "You get an A in the class."
Let PP: "You get an A on the final."

Step 2: Understand "necessary for".
The phrase "QQ is necessary for PP" means that PP cannot occur without QQ occurring. If PP occurs, then QQ must occur. This is equivalent to Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q.

Step 3: Apply the definition.
Here, "getting an A on the final" (PP) is necessary for "getting an A in the class" (RR).
So, if you get an A in the class (RR), then you must have gotten an A on the final (PP).

Rβ€…β€ŠβŸΉβ€…β€ŠPR \implies P

Answer: Rβ€…β€ŠβŸΉβ€…β€ŠPR \implies P

Biconditional (β€…β€ŠβŸΊβ€…β€Š\iff)

The biconditional of PP and QQ, denoted by Pβ€…β€ŠβŸΊβ€…β€ŠQP \iff Q (read as "PP if and only if QQ"), is true when PP and QQ have the same truth value (both true or both false). Otherwise, it is false.

πŸ“ Biconditional
PQPβ€…β€ŠβŸΊβ€…β€ŠQTTTTFFFTFFFT\begin{array}{ccc} P & Q & P \iff Q \\ \text{T} & \text{T} & \text{T} \\ \text{T} & \text{F} & \text{F} \\ \text{F} & \text{T} & \text{F} \\ \text{F} & \text{F} & \text{T}\end{array}

Variables:

    • P,QP, Q = atomic propositions


When to use: To express that two conditions are logically equivalent or that one holds if and only if the other holds.

Exclusive OR (βŠ•\oplus)

The exclusive OR of PP and QQ, denoted by PβŠ•QP \oplus Q (read as "PP XOR QQ"), is true when exactly one of PP or QQ is true, but not both. It is false when both are true or both are false.

πŸ“ Exclusive OR
PQPβŠ•QTTFTFTFTTFFF\begin{array}{ccc} P & Q & P \oplus Q \\ \text{T} & \text{T} & \text{F} \\ \text{T} & \text{F} & \text{T} \\ \text{F} & \text{T} & \text{T} \\ \text{F} & \text{F} & \text{F}\end{array}

Variables:

    • P,QP, Q = atomic propositions


When to use: To express that exactly one of two conditions must be met.

4. Constructing Truth Tables

A truth table systematically lists all possible truth value combinations for atomic propositions and shows the resulting truth value of a compound proposition.

Worked Example:

Problem: Construct the truth table for the compound proposition (P∧¬Q)β€…β€ŠβŸΉβ€…β€ŠR(P \land \neg Q) \implies R.

Solution:

Step 1: List all atomic propositions and their possible truth value combinations.
There are 33 atomic propositions (P,Q,RP, Q, R), so there will be 23=82^3 = 8 rows.

PQRTTTTTFTFTTFFFTTFTFFFTFFF\begin{array}{ccc} P & Q & R \\ \text{T} & \text{T} & \text{T} \\ \text{T} & \text{T} & \text{F} \\ \text{T} & \text{F} & \text{T} \\ \text{T} & \text{F} & \text{F} \\ \text{F} & \text{T} & \text{T} \\ \text{F} & \text{T} & \text{F} \\ \text{F} & \text{F} & \text{T} \\ \text{F} & \text{F} & \text{F}\end{array}

Step 2: Evaluate the innermost components first.
Start with Β¬Q\neg Q.

PQR¬QTTTFTTFFTFTTTFFTFTTFFTFFFFTTFFFT\begin{array}{cccc} P & Q & R & \neg Q \\ \text{T} & \text{T} & \text{T} & \text{F} \\ \text{T} & \text{T} & \text{F} & \text{F} \\ \text{T} & \text{F} & \text{T} & \text{T} \\ \text{T} & \text{F} & \text{F} & \text{T} \\ \text{F} & \text{T} & \text{T} & \text{F} \\ \text{F} & \text{T} & \text{F} & \text{F} \\ \text{F} & \text{F} & \text{T} & \text{T} \\ \text{F} & \text{F} & \text{F} & \text{T}\end{array}

Step 3: Evaluate the next complex component, P∧¬QP \land \neg Q.

PQR¬QP∧¬QTTTFFTTFFFTFTTTTFFTTFTTFFFTFFFFFTTFFFFTF\begin{array}{ccccc} P & Q & R & \neg Q & P \land \neg Q \\ \text{T} & \text{T} & \text{T} & \text{F} & \text{F} \\ \text{T} & \text{T} & \text{F} & \text{F} & \text{F} \\ \text{T} & \text{F} & \text{T} & \text{T} & \text{T} \\ \text{T} & \text{F} & \text{F} & \text{T} & \text{T} \\ \text{F} & \text{T} & \text{T} & \text{F} & \text{F} \\ \text{F} & \text{T} & \text{F} & \text{F} & \text{F} \\ \text{F} & \text{F} & \text{T} & \text{T} & \text{F} \\ \text{F} & \text{F} & \text{F} & \text{T} & \text{F}\end{array}

Step 4: Evaluate the final compound proposition, (P∧¬Q)β€…β€ŠβŸΉβ€…β€ŠR(P \land \neg Q) \implies R.

PQRΒ¬QP∧¬Q(P∧¬Q)β€…β€ŠβŸΉβ€…β€ŠRTTTFFTTTFFFTTFTTTTTFFTTFFTTFFTFTFFFTFFTTFTFFFTFT\begin{array}{cccccc} P & Q & R & \neg Q & P \land \neg Q & (P \land \neg Q) \implies R \\ \text{T} & \text{T} & \text{T} & \text{F} & \text{F} & \text{T} \\ \text{T} & \text{T} & \text{F} & \text{F} & \text{F} & \text{T} \\ \text{T} & \text{F} & \text{T} & \text{T} & \text{T} & \text{T} \\ \text{T} & \text{F} & \text{F} & \text{T} & \text{T} & \text{F} \\ \text{F} & \text{T} & \text{T} & \text{F} & \text{F} & \text{T} \\ \text{F} & \text{T} & \text{F} & \text{F} & \text{F} & \text{T} \\ \text{F} & \text{F} & \text{T} & \text{T} & \text{F} & \text{T} \\ \text{F} & \text{F} & \text{F} & \text{T} & \text{F} & \text{T}\end{array}

Answer: The final column shows the truth values for (P∧¬Q)β€…β€ŠβŸΉβ€…β€ŠR(P \land \neg Q) \implies R.

5. Tautologies, Contradictions, and Contingencies

* A compound proposition is a tautology if it is always true, regardless of the truth values of its atomic propositions. (e.g., P∨¬PP \lor \neg P)
* A compound proposition is a contradiction if it is always false, regardless of the truth values of its atomic propositions. (e.g., P∧¬PP \land \neg P)
* A compound proposition is a contingency if it is neither a tautology nor a contradiction; its truth value depends on the truth values of its atomic propositions. (e.g., Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q)

6. Logical Equivalence

Two compound propositions AA and BB are logically equivalent, denoted by A≑BA \equiv B, if they have the same truth values for all possible assignments of truth values to their atomic propositions. This means their truth tables are identical, or equivalently, the biconditional Aβ€…β€ŠβŸΊβ€…β€ŠBA \iff B is a tautology.

Worked Example: Proving Logical Equivalence using Truth Tables

Problem: Prove that Β¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)\neg(P \implies Q) is logically equivalent to P∧¬QP \land \neg Q.

Solution:

Step 1: Construct the truth table for Β¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)\neg(P \implies Q).

PQPβ€…β€ŠβŸΉβ€…β€ŠQΒ¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)TTTFTFFTFTTFFFTF\begin{array}{cccc} P & Q & P \implies Q & \neg(P \implies Q) \\ \text{T} & \text{T} & \text{T} & \text{F} \\ \text{T} & \text{F} & \text{F} & \text{T} \\ \text{F} & \text{T} & \text{T} & \text{F} \\ \text{F} & \text{F} & \text{T} & \text{F}\end{array}

Step 2: Construct the truth table for P∧¬QP \land \neg Q.

PQ¬QP∧¬QTTFFTFTTFTFFFFTF\begin{array}{cccc} P & Q & \neg Q & P \land \neg Q \\ \text{T} & \text{T} & \text{F} & \text{F} \\ \text{T} & \text{F} & \text{T} & \text{T} \\ \text{F} & \text{T} & \text{F} & \text{F} \\ \text{F} & \text{F} & \text{T} & \text{F}\end{array}

Step 3: Compare the final columns.
The truth values for Β¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)\neg(P \implies Q) are F, T, F, F.
The truth values for P∧¬QP \land \neg Q are F, T, F, F.
Since the columns are identical, the two propositions are logically equivalent.

Answer: Β¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)≑P∧¬Q\neg(P \implies Q) \equiv P \land \neg Q.

Key Logical Equivalences (Laws of Logic)

These equivalences are frequently used to simplify compound propositions or to prove other equivalences without using truth tables.

πŸ“ Key Logical Equivalences
IdentityΒ Laws:P∧T≑PP∨F≑PDominationΒ Laws:P∨T≑TP∧F≑FIdempotentΒ Laws:P∨P≑PP∧P≑PDoubleΒ NegationΒ Law:Β¬(Β¬P)≑PCommutativeΒ Laws:P∨Q≑Q∨PP∧Q≑Q∧PAssociativeΒ Laws:(P∨Q)∨R≑P∨(Q∨R)(P∧Q)∧R≑P∧(Q∧R)DistributiveΒ Laws:P∧(Q∨R)≑(P∧Q)∨(P∧R)P∨(Q∧R)≑(P∨Q)∧(P∨R)DeΒ Morgan’sΒ Laws:Β¬(P∧Q)≑¬P∨¬QΒ¬(P∨Q)≑¬P∧¬QImplicationΒ Equivalence:Pβ€…β€ŠβŸΉβ€…β€ŠQ≑¬P∨QNegationΒ ofΒ Implication:Β¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)≑P∧¬QContrapositive:Pβ€…β€ŠβŸΉβ€…β€ŠQ≑¬Qβ€…β€ŠβŸΉβ€…β€ŠΒ¬PBiconditionalΒ Equivalence:Pβ€…β€ŠβŸΊβ€…β€ŠQ≑(Pβ€…β€ŠβŸΉβ€…β€ŠQ)∧(Qβ€…β€ŠβŸΉβ€…β€ŠP)Pβ€…β€ŠβŸΊβ€…β€ŠQ≑(Β¬P∨Q)∧(Β¬Q∨P)AbsorptionΒ Laws:P∧(P∨Q)≑PP∨(P∧Q)≑P\begin{aligned} & \textbf{Identity Laws:} \\ & P \land \text{T} \equiv P \\ & P \lor \text{F} \equiv P \\ & \textbf{Domination Laws:} \\ & P \lor \text{T} \equiv \text{T} \\ & P \land \text{F} \equiv \text{F} \\ & \textbf{Idempotent Laws:} \\ & P \lor P \equiv P \\ & P \land P \equiv P \\ & \textbf{Double Negation Law:} \\ & \neg(\neg P) \equiv P \\ & \textbf{Commutative Laws:} \\ & P \lor Q \equiv Q \lor P \\ & P \land Q \equiv Q \land P \\ & \textbf{Associative Laws:} \\ & (P \lor Q) \lor R \equiv P \lor (Q \lor R) \\ & (P \land Q) \land R \equiv P \land (Q \land R) \\ & \textbf{Distributive Laws:} \\ & P \land (Q \lor R) \equiv (P \land Q) \lor (P \land R) \\ & P \lor (Q \land R) \equiv (P \lor Q) \land (P \lor R) \\ & \textbf{De Morgan's Laws:} \\ & \neg(P \land Q) \equiv \neg P \lor \neg Q \\ & \neg(P \lor Q) \equiv \neg P \land \neg Q \\ & \textbf{Implication Equivalence:} \\ & P \implies Q \equiv \neg P \lor Q \\ & \textbf{Negation of Implication:} \\ & \neg(P \implies Q) \equiv P \land \neg Q \\ & \textbf{Contrapositive:} \\ & P \implies Q \equiv \neg Q \implies \neg P \\ & \textbf{Biconditional Equivalence:} \\ & P \iff Q \equiv (P \implies Q) \land (Q \implies P) \\ & P \iff Q \equiv (\neg P \lor Q) \land (\neg Q \lor P) \\ & \textbf{Absorption Laws:} \\ & P \land (P \lor Q) \equiv P \\ & P \lor (P \land Q) \equiv P\end{aligned}

Variables:

    • P,Q,RP, Q, R = propositions

    • T = Tautology (always true)

    • F = Contradiction (always false)


When to use: To simplify logical expressions, prove equivalences, and convert expressions into desired forms (e.g., Conjunctive Normal Form).

Worked Example: Proving Logical Equivalence using Laws of Logic

Problem: Show that (Pβ€…β€ŠβŸΉβ€…β€ŠQ)∧(Pβ€…β€ŠβŸΉβ€…β€ŠΒ¬Q)(P \implies Q) \land (P \implies \neg Q) is a contradiction.

Solution:

Step 1: Apply Implication Equivalence to both implications.

(Pβ€…β€ŠβŸΉβ€…β€ŠQ)∧(Pβ€…β€ŠβŸΉβ€…β€ŠΒ¬Q)≑(Β¬P∨Q)∧(Β¬P∨¬Q)\begin{aligned}(P \implies Q) \land (P \implies \neg Q) & \equiv (\neg P \lor Q) \land (\neg P \lor \neg Q)\end{aligned}

Step 2: Apply the Distributive Law (factoring out Β¬P\neg P).

≑¬P∨(Q∧¬Q)\begin{aligned} & \equiv \neg P \lor (Q \land \neg Q)\end{aligned}

Step 3: Recognize that Q∧¬QQ \land \neg Q is a contradiction (always false).

≑¬P∨F\begin{aligned} & \equiv \neg P \lor \text{F}\end{aligned}

Step 4: Apply the Identity Law (X∨F≑XX \lor \text{F} \equiv X).

≑¬P\begin{aligned} & \equiv \neg P\end{aligned}

This is incorrect. (Pβ€…β€ŠβŸΉβ€…β€ŠQ)∧(Pβ€…β€ŠβŸΉβ€…β€ŠΒ¬Q)(P \implies Q) \land (P \implies \neg Q) should simplify to Β¬P\neg P.
If PP is true, then QQ must be true AND QQ must be false, which is a contradiction. So PP must be false. Hence Β¬P\neg P.
Let's re-evaluate.

Step 1: Apply Implication Equivalence.

(Pβ€…β€ŠβŸΉβ€…β€ŠQ)∧(Pβ€…β€ŠβŸΉβ€…β€ŠΒ¬Q)≑(Β¬P∨Q)∧(Β¬P∨¬Q)\begin{aligned}(P \implies Q) \land (P \implies \neg Q) & \equiv (\neg P \lor Q) \land (\neg P \lor \neg Q)\end{aligned}

Step 2: Apply the Distributive Law: A∨(B∧C)≑(A∨B)∧(A∨C)A \lor (B \land C) \equiv (A \lor B) \land (A \lor C). Here, A=Β¬PA = \neg P, B=QB = Q, C=Β¬QC = \neg Q.

≑¬P∨(Q∧¬Q)\begin{aligned} & \equiv \neg P \lor (Q \land \neg Q)\end{aligned}

Step 3: Recognize that Q∧¬QQ \land \neg Q is a contradiction (always false, F).

≑¬P∨F\begin{aligned} & \equiv \neg P \lor \text{F}\end{aligned}

Step 4: Apply the Identity Law: X∨F≑XX \lor \text{F} \equiv X.

≑¬P\begin{aligned} & \equiv \neg P\end{aligned}

This result means that the original expression is logically equivalent to Β¬P\neg P. It is not a contradiction, but rather a contingency whose truth value depends on PP. If PP is true, the expression is false. If PP is false, the expression is true. This is consistent with Β¬P\neg P.

Let's use a truth table to be absolutely sure.

PQPβ€…β€ŠβŸΉβ€…β€ŠQΒ¬QPβ€…β€ŠβŸΉβ€…β€ŠΒ¬Q(Pβ€…β€ŠβŸΉβ€…β€ŠQ)∧(Pβ€…β€ŠβŸΉβ€…β€ŠΒ¬Q)TTTFFFTFFTTFFTTFTTFFTTTT\begin{array}{cccccc}
P & Q & P \implies Q & \neg Q & P \implies \neg Q & (P \implies Q) \land (P \implies \neg Q) \\
\text{T} & \text{T} & \text{T} & \text{F} & \text{F} & \text{F} \\
\text{T} & \text{F} & \text{F} & \text{T} & \text{T} & \text{F} \\
\text{F} & \text{T} & \text{T} & \text{F} & \text{T} & \text{T} \\
\text{F} & \text{F} & \text{T} & \text{T} & \text{T} & \text{T}\end{array}

The final column is F, F, T, T. This is exactly the truth table for Β¬P\neg P.
So the original statement simplifies to Β¬P\neg P, not a contradiction.

Let's correct the example to show a clear contradiction.

Worked Example: Proving a Contradiction using Laws of Logic

Problem: Show that (P∧¬P)(P \land \neg P) is a contradiction. (A simpler, direct example for the concept).

Solution:

Step 1: By definition, P∧¬PP \land \neg P is true only if both PP is true AND ¬P\neg P is true.

Step 2: If PP is true, then Β¬P\neg P must be false.

Step 3: Therefore, it is impossible for both PP and Β¬P\neg P to be true simultaneously.

Step 4: Thus, P∧¬PP \land \neg P is always false.

Answer: P∧¬P≑FP \land \neg P \equiv \text{F} (a contradiction).

---

Problem-Solving Strategies

1. Translating Natural Language to Propositional Logic

Many CMI problems require translating real-world statements into formal logical expressions.

πŸ’‘ Translating Implications

Pay close attention to keywords that indicate the antecedent (PP) and the consequent (QQ) in an implication Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q:
"If P, then Q": Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q
"P is sufficient for Q": Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q (PP guarantees QQ)
"Q is necessary for P": Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q (PP cannot happen without QQ)
"P only if Q": Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q (If PP is true, then QQ must also be true)
"Unless Q, then P": Β¬Qβ€…β€ŠβŸΉβ€…β€ŠP\neg Q \implies P or P∨QP \lor Q
"Neither P nor Q": Β¬P∧¬Q≑¬(P∨Q)\neg P \land \neg Q \equiv \neg(P \lor Q)

2. Solving Consistency Puzzles (Knights & Knaves Type)

These problems involve individuals who always tell the truth (Knights) or always lie (Knaves), or sometimes a third type. The goal is to determine each person's type and/or the truth of their statements.

πŸ’‘ Knights & Knaves Strategy

  • Assign Variables: Assign propositional variables to each person's type (e.g., KAK_A: "A is a Knight", KBK_B: "B is a Knight").

  • Translate Statements: Express each person's statement as a propositional formula.

  • Formulate Implications: For each person XX and their statement SXS_X:

  • If XX is a Knight, then SXS_X is true: KXβ€…β€ŠβŸΉβ€…β€ŠSXK_X \implies S_X.
    If XX is a Knave, then SXS_X is false: Β¬KXβ€…β€ŠβŸΉβ€…β€ŠΒ¬SX\neg K_X \implies \neg S_X.
    These two implications can be combined into a biconditional: KXβ€…β€ŠβŸΊβ€…β€ŠSXK_X \iff S_X. (This is the most powerful tool)
  • Case Analysis & Contradiction:

  • Assume a type for one person (e.g., "A is a Knight").
    Use the KXβ€…β€ŠβŸΊβ€…β€ŠSXK_X \iff S_X rule to deduce the truth of their statement.
    Use the truth of their statement to deduce information about other people or their statements.
    Continue deducing until you find a contradiction (e.g., a person is both a Knight and a Knave, or a statement is both true and false).
    If a contradiction is found, the initial assumption was false.
    * If no contradiction, the scenario is consistent and represents a possible solution.
  • Exhaust all possibilities: Systematically check all plausible initial assumptions.

Worked Example: Knights & Knaves

Problem: On an island of Knights and Knaves, you meet two inhabitants, A and B.
A says: "B is a Knave."
B says: "We are both Knaves."
Determine if A and B are Knights or Knaves.

Solution:

Step 1: Define propositions.
Let KAK_A: "A is a Knight."
Let KBK_B: "B is a Knight."
Statements:
SAS_A: "B is a Knave" ≑¬KB\equiv \neg K_B.
SBS_B: "We are both Knaves" ≑¬KA∧¬KB\equiv \neg K_A \land \neg K_B.

Step 2: Formulate biconditionals.
From A's statement: KAβ€…β€ŠβŸΊβ€…β€ŠSAβ€…β€ŠβŸΉβ€…β€ŠKAβ€…β€ŠβŸΊβ€…β€ŠΒ¬KBK_A \iff S_A \implies K_A \iff \neg K_B.
From B's statement: KBβ€…β€ŠβŸΊβ€…β€ŠSBβ€…β€ŠβŸΉβ€…β€ŠKBβ€…β€ŠβŸΊβ€…β€Š(Β¬KA∧¬KB)K_B \iff S_B \implies K_B \iff (\neg K_A \land \neg K_B).

Step 3: Case Analysis.

Case 1: Assume A is a Knight (KAK_A is T).
If KAK_A is T, then SAS_A must be T.
SAS_A is "B is a Knave", so Β¬KB\neg K_B is T.
This means KBK_B is F (B is a Knave).

Now check B's statement:
If B is a Knave (KBK_B is F), then SBS_B must be F.
SBS_B is "We are both Knaves" (¬KA∧¬KB\neg K_A \land \neg K_B).
Substitute KA=K_A=T, KB=K_B=F into SBS_B: Β¬T∧¬F≑F∧T≑F\neg \text{T} \land \neg \text{F} \equiv \text{F} \land \text{T} \equiv \text{F}.
So SBS_B is F. This is consistent with B being a Knave.

Therefore, Case 1 (A is a Knight, B is a Knave) is a consistent solution.

Case 2: Assume A is a Knave (KAK_A is F).
If KAK_A is F, then SAS_A must be F.
SAS_A is "B is a Knave", so Β¬KB\neg K_B is F.
This means KBK_B is T (B is a Knight).

Now check B's statement:
If B is a Knight (KBK_B is T), then SBS_B must be T.
SBS_B is "We are both Knaves" (¬KA∧¬KB\neg K_A \land \neg K_B).
Substitute KA=K_A=F, KB=K_B=T into SBS_B: Β¬F∧¬T≑T∧F≑F\neg \text{F} \land \neg \text{T} \equiv \text{T} \land \text{F} \equiv \text{F}.
So SBS_B is F.
But we deduced that B is a Knight, so SBS_B must be T.
This is a contradiction (SBS_B is F and SBS_B is T).
Therefore, Case 2 (A is a Knave) is inconsistent.

Answer: A is a Knight and B is a Knave.

---

Common Mistakes

⚠️ Avoid These Errors
    • ❌ Confusing Implication with Biconditional: Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q is not the same as Pβ€…β€ŠβŸΊβ€…β€ŠQP \iff Q. Remember Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q is true when PP is false, regardless of QQ.
    • ❌ Incorrectly Negating Implications: Β¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)\neg(P \implies Q) is NOT Β¬Pβ€…β€ŠβŸΉβ€…β€ŠΒ¬Q\neg P \implies \neg Q. Instead, remember the key equivalence: Β¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)≑P∧¬Q\neg(P \implies Q) \equiv P \land \neg Q.
    • ❌ Misinterpreting "Necessary" vs. "Sufficient":
- "P is sufficient for Q" means Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q. (If PP, then QQ). - "P is necessary for Q" means Qβ€…β€ŠβŸΉβ€…β€ŠPQ \implies P. (If QQ, then PP).
    • ❌ Errors in Truth Table Construction: Mismatched rows, incorrect application of logical operator definitions, especially for implication. Always follow the order of operations (negation, conjunction/disjunction, implication/biconditional).
    • ❌ Not Checking All Cases in Consistency Puzzles: If you only find one consistent scenario, ensure you've explored all initial possibilities to confirm it's the only one or to rule out others by contradiction.
    • ❌ Confusing Inclusive vs. Exclusive OR: Standard ∨\lor is inclusive. If "exactly one" is implied, use βŠ•\oplus or express it as (P∨Q)∧¬(P∧Q)(P \lor Q) \land \neg(P \land Q).

---

Practice Questions

:::question type="MCQ" question="(P∧Q)β€…β€ŠβŸΉβ€…β€ŠP(P \land Q) \implies P" options=["(P∧Q)β€…β€ŠβŸΉβ€…β€ŠP(P \land Q) \implies P","(P∨Q)∧¬P(P \lor Q) \land \neg P","Pβ€…β€ŠβŸΉβ€…β€Š(P∧Q)P \implies (P \land Q)","P∧¬PP \land \neg P"] answer="(P∧Q)β€…β€ŠβŸΉβ€…β€ŠP(P \land Q) \implies P" hint="A tautology is always true. Consider the truth table for each option or use logical equivalences." solution="Let's analyze each option:

  • (P∧Q)β€…β€ŠβŸΉβ€…β€ŠP(P \land Q) \implies P:

  • If P∧QP \land Q is true, then PP must be true.
    If P∧QP \land Q is false, then the implication is true regardless of PP.
    So, this statement is always true. It's a tautology (Absorption Law variant).

    Truth Table:

    PQP∧Q(P∧Q)β€…β€ŠβŸΉβ€…β€ŠPTTTTTFFTFTFTFFFT\begin{array}{cccc}
    P & Q & P \land Q & (P \land Q) \implies P \\
    \text{T} & \text{T} & \text{T} & \text{T} \\
    \text{T} & \text{F} & \text{F} & \text{T} \\
    \text{F} & \text{T} & \text{F} & \text{T} \\
    \text{F} & \text{F} & \text{F} & \text{T}\end{array}

  • (P∨Q)∧¬P(P \lor Q) \land \neg P: This simplifies to Q∧¬PQ \land \neg P using Distributive and Identity Laws. This is a contingency.

  • Pβ€…β€ŠβŸΉβ€…β€Š(P∧Q)P \implies (P \land Q): This is false if PP is true and P∧QP \land Q is false (i.e., PP is true, QQ is false). So, it's a contingency.

  • P∧¬PP \land \neg P: This is always false (a contradiction).
  • The correct option is (P∧Q)β€…β€ŠβŸΉβ€…β€ŠP(P \land Q) \implies P.
    Answer: (P∧Q)β€…β€ŠβŸΉβ€…β€ŠP\boxed{(P \land Q) \implies P}"
    :::

    :::question type="NAT" question="A logician makes the following three statements:

  • This statement is false.

  • 2+2=42+2=4.

  • Statements 1 and 2 are both true.
  • How many of these statements are true?" answer="1" hint="Analyze each statement for consistency. Statement 1 is a classic paradox. Statement 2 is a mathematical fact. Statement 3 connects the truth values of the first two." solution="Let's denote the truth value of statement ii as TiT_i.

  • Statement 1: 'This statement is false.'

  • If Statement 1 is true, then it must be false (by its own content). This is a contradiction.
    If Statement 1 is false, then it is true (because it claims to be false, and it is false). This is also a contradiction.
    This is a self-referential paradox. In classical logic, such statements are typically considered neither true nor false, or outside the scope of propositions. For typical CMI problems, if a statement leads to a direct paradox, it is considered to have no consistent truth value or is problematic. Let's assume it cannot be true. So, Statement 1 is not true.

  • Statement 2: '2+2=42+2=4.'

  • This is a mathematically true statement. So, Statement 2 is True.

  • Statement 3: 'Statements 1 and 2 are both true.'

  • Let's evaluate S3S_3: S1∧S2S_1 \land S_2.
    We determined that Statement 1 is not true (it leads to a paradox, so it cannot be consistently assigned 'true').
    We determined that Statement 2 is true.
    So, S1∧S2S_1 \land S_2 would be (Not True) ∧\land True, which evaluates to False.
    Therefore, Statement 3 is False.

    Counting the true statements:
    Statement 1: Not True (paradoxical)
    Statement 2: True
    Statement 3: False

    Only Statement 2 is true.

    The number of true statements is 1.
    Answer: 1\boxed{1}"
    :::

    :::question type="MSQ" question="Which of the following propositions are logically equivalent to Pβ€…β€ŠβŸΉβ€…β€Š(Q∨R)P \implies (Q \lor R)?" options=["Β¬P∨Q∨R\neg P \lor Q \lor R","P∧¬Q∧¬RP \land \neg Q \land \neg R","(P∧¬Q)β€…β€ŠβŸΉβ€…β€ŠR(P \land \neg Q) \implies R","(Β¬Q∧¬R)β€…β€ŠβŸΉβ€…β€ŠΒ¬P(\neg Q \land \neg R) \implies \neg P"] answer="A,C,D" hint="Use the implication equivalence Aβ€…β€ŠβŸΉβ€…β€ŠB≑¬A∨BA \implies B \equiv \neg A \lor B and De Morgan's laws. For MSQ, check each option individually." solution="Let's analyze each option for equivalence to Pβ€…β€ŠβŸΉβ€…β€Š(Q∨R)P \implies (Q \lor R):

    The original expression: Pβ€…β€ŠβŸΉβ€…β€Š(Q∨R)P \implies (Q \lor R)
    Using Aβ€…β€ŠβŸΉβ€…β€ŠB≑¬A∨BA \implies B \equiv \neg A \lor B, we can write this as:
    Β¬P∨(Q∨R)≑¬P∨Q∨R\neg P \lor (Q \lor R) \equiv \neg P \lor Q \lor R.

    So, option A is logically equivalent.

    Let's check the other options:

    Option A: ¬P∨Q∨R\neg P \lor Q \lor R
    As derived above, this is equivalent. So, A is correct.

    Option B: P∧¬Q∧¬RP \land \neg Q \land \neg R
    This is the negation of Pβ€…β€ŠβŸΉβ€…β€Š(Q∨R)P \implies (Q \lor R).
    Β¬(Pβ€…β€ŠβŸΉβ€…β€Š(Q∨R))≑P∧¬(Q∨R)≑P∧(Β¬Q∧¬R)\neg(P \implies (Q \lor R)) \equiv P \land \neg(Q \lor R) \equiv P \land (\neg Q \land \neg R).
    So, Option B is the negation, not the equivalence. B is incorrect.

    Option C: (P∧¬Q)β€…β€ŠβŸΉβ€…β€ŠR(P \land \neg Q) \implies R
    Using Aβ€…β€ŠβŸΉβ€…β€ŠB≑¬A∨BA \implies B \equiv \neg A \lor B:
    (P∧¬Q)β€…β€ŠβŸΉβ€…β€ŠR≑¬(P∧¬Q)∨R(P \land \neg Q) \implies R \equiv \neg(P \land \neg Q) \lor R
    Using De Morgan's Law: Β¬(P∧¬Q)≑¬P∨¬(Β¬Q)≑¬P∨Q\neg(P \land \neg Q) \equiv \neg P \lor \neg(\neg Q) \equiv \neg P \lor Q.
    So, (P∧¬Q)β€…β€ŠβŸΉβ€…β€ŠR≑(Β¬P∨Q)∨R≑¬P∨Q∨R(P \land \neg Q) \implies R \equiv (\neg P \lor Q) \lor R \equiv \neg P \lor Q \lor R.
    This is equivalent to the original expression. So, C is correct.

    Option D: (Β¬Q∧¬R)β€…β€ŠβŸΉβ€…β€ŠΒ¬P(\neg Q \land \neg R) \implies \neg P
    Let's re-evaluate option D directly using Aβ€…β€ŠβŸΉβ€…β€ŠB≑¬A∨BA \implies B \equiv \neg A \lor B:
    (Β¬Q∧¬R)β€…β€ŠβŸΉβ€…β€ŠΒ¬P≑¬(Β¬Q∧¬R)∨¬P(\neg Q \land \neg R) \implies \neg P \equiv \neg(\neg Q \land \neg R) \lor \neg P
    Using De Morgan's Law: Β¬(Β¬Q∧¬R)≑¬(Β¬Q)∨¬(Β¬R)≑Q∨R\neg(\neg Q \land \neg R) \equiv \neg(\neg Q) \lor \neg(\neg R) \equiv Q \lor R.
    So, (Β¬Q∧¬R)β€…β€ŠβŸΉβ€…β€ŠΒ¬P≑(Q∨R)∨¬P≑¬P∨Q∨R(\neg Q \land \neg R) \implies \neg P \equiv (Q \lor R) \lor \neg P \equiv \neg P \lor Q \lor R.
    This is equivalent to the original expression. So, D is correct.

    The correct options are A, C, D.
    Answer: A,Β C,Β D\boxed{\text{A, C, D}}"
    :::

    :::question type="SUB" question="Prove the Absorption Law P∨(P∧Q)≑PP \lor (P \land Q) \equiv P using other logical equivalences." answer="Proof shows P∨(P∧Q)P \lor (P \land Q) simplifies to PP." hint="Start by applying the Identity Law to PP to introduce a 'True' proposition, then use the Distributive Law." solution="We want to prove P∨(P∧Q)≑PP \lor (P \land Q) \equiv P.

    Step 1: Start with the left-hand side (LHS) of the equivalence.

    P∨(P∧Q)P \lor (P \land Q)

    Step 2: Apply the Identity Law P≑P∧TP \equiv P \land \text{T}. This allows us to introduce a 'True' proposition for later use in the distributive law.

    ≑(P∧T)∨(P∧Q)\equiv (P \land \text{T}) \lor (P \land Q)

    Step 3: Apply the Distributive Law A∨(B∧C)≑(A∨B)∧(A∨C)A \lor (B \land C) \equiv (A \lor B) \land (A \lor C) in reverse. Here, A=PA=P, B=TB=\text{T}, C=QC=Q.

    ≑P∧(T∨Q)\equiv P \land (\text{T} \lor Q)

    Step 4: Apply the Domination Law T∨Q≑T\text{T} \lor Q \equiv \text{T}. (Anything OR True is True).

    ≑P∧T\equiv P \land \text{T}

    Step 5: Apply the Identity Law P∧T≑PP \land \text{T} \equiv P.

    ≑P\equiv P

    Step 6: The LHS has been transformed into the right-hand side (RHS).

    Therefore, P∨(P∧Q)≑PP \lor (P \land Q) \equiv P is proven.
    Answer: Proof shows P∨(P∧Q) simplifies to P.\boxed{\text{Proof shows } P \lor (P \land Q) \text{ simplifies to } P.}"
    :::

    :::question type="MCQ" question="In a specific CMI entrance exam, the following rules apply:

  • If a candidate scores above 90% in Mathematics (MM), they are eligible for the Data Science program (DD).

  • A candidate is eligible for the Data Science program only if they have prior programming experience (PP).

  • It is not true that a candidate has prior programming experience and does not score above 90% in Mathematics.
  • Let MM: 'Candidate scores above 90% in Mathematics.'
    Let PP: 'Candidate has prior programming experience.'
    Let DD: 'Candidate is eligible for the Data Science program.'

    Which of the following statements is a valid conclusion from the given rules?" options=["A candidate with prior programming experience is always eligible for the Data Science program.","A candidate scoring above 90% in Mathematics must have prior programming experience.","If a candidate is not eligible for the Data Science program, then they did not score above 90% in Mathematics.","Scoring above 90% in Mathematics is a necessary condition for eligibility in the Data Science program."] answer="A candidate scoring above 90% in Mathematics must have prior programming experience." hint="First, translate all given rules into propositional logic. Then, analyze each option to see if it logically follows from the combined rules." solution="Step 1: Translate the given rules into propositional logic.
    Rule 1: If M, then D.

    Mβ€…β€ŠβŸΉβ€…β€ŠDM \implies D

    Rule 2: D only if P. (This means if D is true, then P must be true. So Dβ€…β€ŠβŸΉβ€…β€ŠPD \implies P).
    Dβ€…β€ŠβŸΉβ€…β€ŠPD \implies P

    Rule 3: It is not true that (P and not M).
    ¬(P∧¬M)\neg (P \land \neg M)

    Using De Morgan's Law and Double Negation: Β¬(P∧¬M)≑¬P∨¬(Β¬M)≑¬P∨M\neg (P \land \neg M) \equiv \neg P \lor \neg (\neg M) \equiv \neg P \lor M.
    Using Implication Equivalence: Β¬P∨M≑Pβ€…β€ŠβŸΉβ€…β€ŠM\neg P \lor M \equiv P \implies M.
    So Rule 3 is equivalent to:
    Pβ€…β€ŠβŸΉβ€…β€ŠMP \implies M

    Step 2: Combine the rules.
    We have:

  • Mβ€…β€ŠβŸΉβ€…β€ŠDM \implies D

  • Dβ€…β€ŠβŸΉβ€…β€ŠPD \implies P

  • Pβ€…β€ŠβŸΉβ€…β€ŠMP \implies M
  • Combining these using transitivity of implication:
    From (1) and (2): Mβ€…β€ŠβŸΉβ€…β€ŠDM \implies D and Dβ€…β€ŠβŸΉβ€…β€ŠPD \implies P, therefore Mβ€…β€ŠβŸΉβ€…β€ŠPM \implies P.
    From (2) and (3): Dβ€…β€ŠβŸΉβ€…β€ŠPD \implies P and Pβ€…β€ŠβŸΉβ€…β€ŠMP \implies M, therefore Dβ€…β€ŠβŸΉβ€…β€ŠMD \implies M.
    From (3) and (1): Pβ€…β€ŠβŸΉβ€…β€ŠMP \implies M and Mβ€…β€ŠβŸΉβ€…β€ŠDM \implies D, therefore Pβ€…β€ŠβŸΉβ€…β€ŠDP \implies D.

    This forms a cycle of implications: Mβ€…β€ŠβŸΊβ€…β€ŠDβ€…β€ŠβŸΊβ€…β€ŠPM \iff D \iff P. All three propositions are logically equivalent.

    Step 3: Evaluate each option.

    * 'A candidate with prior programming experience is always eligible for the Data Science program.'
    This translates to Pβ€…β€ŠβŸΉβ€…β€ŠDP \implies D. From our combined rules, Pβ€…β€ŠβŸΊβ€…β€ŠDP \iff D is true, so Pβ€…β€ŠβŸΉβ€…β€ŠDP \implies D is a valid conclusion. This statement is correct.

    * 'A candidate scoring above 90% in Mathematics must have prior programming experience.'
    This translates to Mβ€…β€ŠβŸΉβ€…β€ŠPM \implies P. From our combined rules, Mβ€…β€ŠβŸΊβ€…β€ŠPM \iff P is true, so Mβ€…β€ŠβŸΉβ€…β€ŠPM \implies P is a valid conclusion. This statement is correct.

    * 'If a candidate is not eligible for the Data Science program, then they did not score above 90% in Mathematics.'
    This translates to Β¬Dβ€…β€ŠβŸΉβ€…β€ŠΒ¬M\neg D \implies \neg M. This is the contrapositive of Mβ€…β€ŠβŸΉβ€…β€ŠDM \implies D, which is a valid rule. So, this statement is correct.

    * 'Scoring above 90% in Mathematics is a necessary condition for eligibility in the Data Science program.'
    This translates to Dβ€…β€ŠβŸΉβ€…β€ŠMD \implies M. From our combined rules, Dβ€…β€ŠβŸΊβ€…β€ŠMD \iff M is true, so Dβ€…β€ŠβŸΉβ€…β€ŠMD \implies M is a valid conclusion. This statement is correct.

    All options are logically valid conclusions. In a single-choice MCQ where multiple options are logically valid, the intended answer is often the most direct or foundational deduction. Option B (Mβ€…β€ŠβŸΉβ€…β€ŠPM \implies P) is a direct transitive consequence of the first two rules (Mβ€…β€ŠβŸΉβ€…β€ŠDM \implies D and Dβ€…β€ŠβŸΉβ€…β€ŠPD \implies P).

    The final answer is \text{A candidate scoring above 90% in Mathematics must have prior programming experience.}
    Answer: \boxed{\text{A candidate scoring above 90% in Mathematics must have prior programming experience.}}"
    :::

    :::question type="NAT" question="A group of three friends, X, Y, and Z, are in a room. You know that exactly one of them is telling the truth, and the other two are lying. They make the following statements:
    X: 'Y is a liar.'
    Y: 'Z is a liar.'
    Z: 'X is telling the truth.'

    Determine the number of liars among X, Y, and Z. (Provide only the number)." answer="2" hint="Assume each person is the truth-teller in turn and check for consistency with the rule 'exactly one truth-teller, two liars'." solution="Let TX,TY,TZT_X, T_Y, T_Z be propositions that X, Y, Z are telling the truth, respectively.
    We are given that exactly one of TX,TY,TZT_X, T_Y, T_Z is true. This means:

    (TX∧¬TY∧¬TZ)∨(¬TX∧TY∧¬TZ)∨(¬TX∧¬TY∧TZ)(T_X \land \neg T_Y \land \neg T_Z) \lor (\neg T_X \land T_Y \land \neg T_Z) \lor (\neg T_X \land \neg T_Y \land T_Z)

    is true.

    Statements:
    SXS_X: 'Y is a liar' ≑¬TY\equiv \neg T_Y.
    SYS_Y: 'Z is a liar' ≑¬TZ\equiv \neg T_Z.
    SZS_Z: 'X is telling the truth' ≑TX\equiv T_X.

    Conditions for each person:
    If X is a truth-teller (TXT_X), then X's statement SXS_X must be true. So TXβ€…β€ŠβŸΊβ€…β€ŠSXT_X \iff S_X.
    If X is a liar (Β¬TX\neg T_X), then X's statement SXS_X must be false. So Β¬TXβ€…β€ŠβŸΊβ€…β€ŠΒ¬SX\neg T_X \iff \neg S_X, which is also TXβ€…β€ŠβŸΊβ€…β€ŠSXT_X \iff S_X.
    Thus, for each person, their truth-telling status is equivalent to the truth value of their statement:
    TXβ€…β€ŠβŸΊβ€…β€ŠΒ¬TYT_X \iff \neg T_Y
    TYβ€…β€ŠβŸΊβ€…β€ŠΒ¬TZT_Y \iff \neg T_Z
    TZβ€…β€ŠβŸΊβ€…β€ŠTXT_Z \iff T_X

    Now, let's test the three possible scenarios for exactly one truth-teller:

    Scenario 1: X is the truth-teller (TXT_X is True, Β¬TY\neg T_Y is True, Β¬TZ\neg T_Z is True).
    * Since TXT_X is True, X's statement SXS_X must be True. SX≑¬TYS_X \equiv \neg T_Y. So Β¬TY\neg T_Y is True. This is consistent with our assumption that Y is a liar.
    * Since Y is a liar (Β¬TY\neg T_Y is True), Y's statement SYS_Y must be False. SY≑¬TZS_Y \equiv \neg T_Z. So Β¬TZ\neg T_Z must be False, which means TZT_Z is True.
    * But our initial assumption for this scenario was that Z is a liar (Β¬TZ\neg T_Z is True).
    * We have a contradiction: TZT_Z is True and Β¬TZ\neg T_Z is True.
    * Therefore, Scenario 1 is impossible.

    Scenario 2: Y is the truth-teller (Β¬TX\neg T_X is True, TYT_Y is True, Β¬TZ\neg T_Z is True).
    * Since Y is a truth-teller (TYT_Y is True), Y's statement SYS_Y must be True. SY≑¬TZS_Y \equiv \neg T_Z. So Β¬TZ\neg T_Z is True. This is consistent with our assumption that Z is a liar.
    * Since X is a liar (Β¬TX\neg T_X is True), X's statement SXS_X must be False. SX≑¬TYS_X \equiv \neg T_Y. So Β¬TY\neg T_Y must be False, which means TYT_Y is True. This is consistent with our assumption that Y is a truth-teller.
    * Since Z is a liar (Β¬TZ\neg T_Z is True), Z's statement SZS_Z must be False. SZ≑TXS_Z \equiv T_X. So TXT_X must be False. This is consistent with our assumption that X is a liar.
    * All conditions are consistent.
    * Therefore, Scenario 2 is the consistent solution: X is a liar, Y is a truth-teller, Z is a liar.

    Scenario 3: Z is the truth-teller (Β¬TX\neg T_X is True, Β¬TY\neg T_Y is True, TZT_Z is True).
    * Since Z is a truth-teller (TZT_Z is True), Z's statement SZS_Z must be True. SZ≑TXS_Z \equiv T_X. So TXT_X is True.
    * But our initial assumption for this scenario was that X is a liar (Β¬TX\neg T_X is True).
    * We have a contradiction: TXT_X is True and Β¬TX\neg T_X is True.
    * Therefore, Scenario 3 is impossible.

    The only consistent scenario is that Y is the truth-teller, and X and Z are liars.
    The question asks for the number of liars.
    In this consistent scenario, X is a liar and Z is a liar.

    Number of liars = 2.
    Answer: 2\boxed{2}"
    :::

    :::question type="MSQ" question="Let PP be 'The sun is shining' and QQ be 'It is warm'. Which of the following statements correctly translates to Β¬P∨Q\neg P \lor Q?" options=["If the sun is not shining, then it is warm.","It is not the case that the sun is shining and it is not warm.","The sun is shining only if it is warm.","It is warm unless the sun is shining."] answer="B,C,D" hint="Recall that Β¬P∨Q\neg P \lor Q is equivalent to Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q. Analyze each option's logical meaning." solution="The propositional formula is Β¬P∨Q\neg P \lor Q.
    We know that Β¬P∨Q≑Pβ€…β€ŠβŸΉβ€…β€ŠQ\neg P \lor Q \equiv P \implies Q.
    So we are looking for statements equivalent to 'If the sun is shining, then it is warm.'

    Let's analyze each option:

    A. 'If the sun is not shining, then it is warm.'
    This translates to Β¬Pβ€…β€ŠβŸΉβ€…β€ŠQ\neg P \implies Q.
    Using implication equivalence: Β¬Pβ€…β€ŠβŸΉβ€…β€ŠQ≑¬(Β¬P)∨Q≑P∨Q\neg P \implies Q \equiv \neg(\neg P) \lor Q \equiv P \lor Q.
    This is not equivalent to ¬P∨Q\neg P \lor Q. So, A is incorrect.

    B. 'It is not the case that the sun is shining and it is not warm.'
    This translates to ¬(P∧¬Q)\neg (P \land \neg Q).
    Using De Morgan's Law: Β¬(P∧¬Q)≑¬P∨¬(Β¬Q)≑¬P∨Q\neg (P \land \neg Q) \equiv \neg P \lor \neg(\neg Q) \equiv \neg P \lor Q.
    This is equivalent to the original expression. So, B is correct.

    C. 'The sun is shining only if it is warm.'
    The phrase "P only if Q" translates to Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q.
    So, 'The sun is shining only if it is warm' translates to Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q.
    As established, Pβ€…β€ŠβŸΉβ€…β€ŠQ≑¬P∨QP \implies Q \equiv \neg P \lor Q.
    This is equivalent to the original expression. So, C is correct.

    D. 'It is warm unless the sun is shining.'
    The phrase "A unless B" can be interpreted as "A is true, provided B is not true", or more formally, that the statement is false only if "not A and B".
    Let A = 'It is warm' (QQ) and B = 'the sun is shining' (PP).
    So, 'It is warm unless the sun is shining' is false if 'It is not warm AND the sun is shining'.
    This means the negation of the statement is ¬Q∧P\neg Q \land P.
    Therefore, the statement itself is ¬(¬Q∧P)\neg (\neg Q \land P).
    Using De Morgan's Law: Β¬(Β¬Q∧P)≑¬(Β¬Q)∨¬P≑Q∨¬P\neg (\neg Q \land P) \equiv \neg(\neg Q) \lor \neg P \equiv Q \lor \neg P.
    This is exactly ¬P∨Q\neg P \lor Q.
    This interpretation makes option D equivalent to the original expression. So, D is correct.

    Therefore, B, C, D are all correct.
    Answer: B,Β C,Β D\boxed{\text{B, C, D}}"
    :::

    ---

    Summary

    ❗ Key Takeaways for CMI

    • Master Truth Tables: Be able to construct truth tables for any compound proposition and use them to define connectives, determine tautologies/contradictions, and prove logical equivalence.

    • Understand and Apply Key Logical Equivalences: Memorize and skillfully apply laws like De Morgan's, Distributive, and especially the Implication Equivalence (Pβ€…β€ŠβŸΉβ€…β€ŠQ≑¬P∨QP \implies Q \equiv \neg P \lor Q) and Negation of Implication (Β¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)≑P∧¬Q\neg(P \implies Q) \equiv P \land \neg Q). These are critical for simplification and proofs.

    • Proficiently Translate Natural Language into Propositional Logic: Pay meticulous attention to keywords like "if...then", "only if", "necessary", "sufficient", "unless", and "not...and...". Ambiguities must be handled by systematic logical conversion.

    • Develop Systematic Approach for Consistency Puzzles: For Knights & Knaves or similar problems, consistently use the biconditional rule (TXβ€…β€ŠβŸΊβ€…β€ŠSXT_X \iff S_X), and systematically test scenarios, looking for contradictions.

    ---

    What's Next?

    πŸ’‘ Continue Learning

    This topic connects to:

      • Predicate Logic: Extends propositional logic by introducing variables, predicates, and quantifiers (universal and existential), allowing for more detailed statements about objects and their properties.

      • Proof Techniques: Direct proof, proof by contradiction, mathematical induction, and other formal proof methods heavily rely on the principles of propositional logic to construct valid arguments.

      • Set Theory: Logical operators are fundamental for defining set operations (union, intersection, complement), set relationships (subset, equality), and for proving theorems in set theory.

      • Boolean Algebra: A mathematical system that formalizes the rules of logical operations, directly applicable in digital circuit design and computer science.


    Master these connections for comprehensive CMI preparation!

    ---

    ---

    πŸ’‘ Moving Forward

    Now that you understand Propositions and Logical Operators, let's explore Truth Tables which builds on these concepts.

    ---

    Part 2: Truth Tables

    Introduction

    Truth tables are fundamental tools in discrete mathematics, serving as a systematic way to determine the truth value of a compound proposition for all possible truth values of its constituent simple propositions. In the context of a Masters in Data Science, a solid understanding of truth tables is crucial for comprehending the underlying logic of algorithms, database queries, artificial intelligence systems, and formal verification methods. They provide a precise and unambiguous method for analyzing logical statements, proving equivalences, and understanding the behavior of boolean functions, which are ubiquitous in computer science. This section will cover the core concepts of boolean values, logical connectives, and the construction and interpretation of truth tables.
    πŸ“– Boolean Value

    A Boolean value is a value that can only be one of two states: True\texttt{True} (often denoted by TT or 11) or False\texttt{False} (often denoted by FF or 00). These values form the basis of all logical operations.

    ---

    Key Concepts

    1. Propositions and Boolean Variables

    A proposition is a declarative sentence that is either true or false, but not both. Simple propositions can be combined using logical connectives to form compound propositions. In formal logic, we assign Boolean variables to represent these simple propositions.

    πŸ“– Proposition

    A proposition is a declarative statement that is either definitively true or definitively false. It cannot be both true and false simultaneously.

    For example, "The sky is blue" is a proposition, and its truth value can be assigned as True\texttt{True}. "Is it raining?" is not a proposition, as it is a question and does not have a truth value.

    2. Logical Connectives and Their Truth Tables

    Logical connectives are symbols or words used to combine simple propositions into more complex compound propositions. Each connective has a specific truth table that defines the truth value of the compound proposition based on the truth values of its constituent simple propositions.

    #### a. Negation (Β¬\neg)
    The negation of a proposition PP, denoted Β¬P\neg P (read as "not PP"), reverses the truth value of PP.

    πŸ“ Truth Table for Negation
    P¬PTFFT\begin{array}{|c|c|} \hline P & \neg P \\ \hline T & F \\ F & T \\ \hline\end{array}

    Variables:

      • PP = A simple proposition


    When to use: To express the opposite truth value of a statement.

    #### b. Conjunction (∧\land)
    The conjunction of two propositions PP and QQ, denoted P∧QP \land Q (read as "PP and QQ"), is true only when both PP and QQ are true.

    πŸ“ Truth Table for Conjunction
    PQP∧QTTTTFFFTFFFF\begin{array}{|c|c|c|} \hline P & Q & P \land Q \\ \hline T & T & T \\ T & F & F \\ F & T & F \\ F & F & F \\ \hline\end{array}

    Variables:

      • PP = First proposition

      • QQ = Second proposition


    When to use: To express that two conditions must both be met.

    #### c. Disjunction (∨\lor)
    The disjunction of two propositions PP and QQ, denoted P∨QP \lor Q (read as "PP or QQ"), is true if at least one of PP or QQ is true (inclusive OR).

    πŸ“ Truth Table for Disjunction
    PQP∨QTTTTFTFTTFFF\begin{array}{|c|c|c|} \hline P & Q & P \lor Q \\ \hline T & T & T \\ T & F & T \\ F & T & T \\ F & F & F \\ \hline\end{array}

    Variables:

      • PP = First proposition

      • QQ = Second proposition


    When to use: To express that at least one of two conditions must be met.

    #### d. Implication (β†’\rightarrow)
    The implication (or conditional statement) of two propositions PP and QQ, denoted P→QP \rightarrow Q (read as "if PP then QQ"), is false only when PP is true and QQ is false. PP is the hypothesis (antecedent) and QQ is the conclusion (consequent).

    πŸ“ Truth Table for Implication
    PQP→QTTTTFFFTTFFT\begin{array}{|c|c|c|} \hline P & Q & P \rightarrow Q \\ \hline T & T & T \\ T & F & F \\ F & T & T \\ F & F & T \\ \hline\end{array}

    Variables:

      • PP = Hypothesis

      • QQ = Conclusion


    When to use: To express a cause-and-effect or conditional relationship. It's often counter-intuitive that F→TF \rightarrow T and F→FF \rightarrow F are true; this is because a false hypothesis implies anything.

    #### e. Biconditional (↔\leftrightarrow)
    The biconditional of two propositions PP and QQ, denoted P↔QP \leftrightarrow Q (read as "PP if and only if QQ"), is true when PP and QQ have the same truth value. It is logically equivalent to (Pβ†’Q)∧(Qβ†’P)(P \rightarrow Q) \land (Q \rightarrow P).

    πŸ“ Truth Table for Biconditional
    PQP↔QTTTTFFFTFFFT\begin{array}{|c|c|c|} \hline P & Q & P \leftrightarrow Q \\ \hline T & T & T \\ T & F & F \\ F & T & F \\ F & F & T \\ \hline\end{array}

    Variables:

      • PP = First proposition

      • QQ = Second proposition


    When to use: To express that two conditions are logically equivalent or imply each other.

    #### f. Exclusive OR (βŠ•\oplus)
    The exclusive OR of two propositions PP and QQ, denoted PβŠ•QP \oplus Q (read as "PP XOR QQ"), is true when exactly one of PP or QQ is true, but not both.

    πŸ“ Truth Table for Exclusive OR
    PQPβŠ•QTTFTFTFTTFFF\begin{array}{|c|c|c|} \hline P & Q & P \oplus Q \\ \hline T & T & F \\ T & F & T \\ F & T & T \\ F & F & F \\ \hline\end{array}

    Variables:

      • PP = First proposition

      • QQ = Second proposition


    When to use: To express that exactly one of two conditions must be met.

    Worked Example: Constructing a Truth Table for a Simple Compound Proposition

    Problem: Construct the truth table for the compound proposition ¬P∨Q\neg P \lor Q.

    Solution:

    Step 1: List all possible truth value combinations for the simple propositions.
    Since there are two propositions (PP and QQ), there will be 22=42^2 = 4 rows in the truth table.

    PQTTTFFTFF\begin{array}{|c|c|} \hline P & Q \\ \hline T & T \\ T & F \\ F & T \\ F & F \\ \hline\end{array}

    Step 2: Evaluate the negation of PP, Β¬P\neg P.

    PQ¬PTTFTFFFTTFF\begin{array}{|c|c|c|} \hline P & Q & \neg P \\ \hline T & T & F \\ T & F & F \\ F & T & T \\ F & F \\ \hline\end{array}

    Step 3: Evaluate the disjunction of ¬P\neg P and QQ, which is ¬P∨Q\neg P \lor Q.

    PQ¬P¬P∨QTTFTTFFFFTTTFFTT\begin{array}{|c|c|c|c|} \hline P & Q & \neg P & \neg P \lor Q \\ \hline T & T & F & T \\ T & F & F & F \\ F & T & T & T \\ F & F & T & T \\ \hline\end{array}

    Answer: The final column of the table above represents the truth table for ¬P∨Q\neg P \lor Q.

    ---

    ---

    3. Constructing Truth Tables for Compound Propositions

    To construct a truth table for any compound proposition:

  • Determine the number of rows: If there are nn distinct simple propositions, there will be 2n2^n rows in the truth table, representing all possible combinations of truth values for these propositions.

  • List all simple propositions: Create columns for each distinct simple proposition (e.g., P,Q,RP, Q, R).

  • Create columns for sub-expressions: Add columns for intermediate expressions, following the order of operations (negation first, then conjunction/disjunction, then implication/biconditional).

  • Evaluate truth values: Fill in the truth values for each column based on the definitions of the logical connectives.

  • Final column: The last column will represent the truth values of the entire compound proposition.
  • Worked Example: Constructing a Truth Table for a Complex Expression

    Problem: Construct the truth table for the compound proposition (P∧¬Q)β†’(R∨Q)(P \land \neg Q) \rightarrow (R \lor Q).

    Solution:

    Step 1: Identify simple propositions and number of rows.
    Simple propositions are P,Q,RP, Q, R. Number of rows = 23=82^3 = 8.

    PQRTTTTTFTFTTFFFTTFTFFFTFFF\begin{array}{|c|c|c|} \hline P & Q & R \\ \hline T & T & T \\ T & T & F \\ T & F & T \\ T & F & F \\ F & T & T \\ F & T & F \\ F & F & T \\ F & F & F \\ \hline\end{array}

    Step 2: Evaluate Β¬Q\neg Q.

    PQR¬QTTTFTTFFTFTTTFFTFTTFFTFFFFTTFFFT\begin{array}{|c|c|c|c|} \hline P & Q & R & \neg Q \\ \hline T & T & T & F \\ T & T & F & F \\ T & F & T & T \\ T & F & F & T \\ F & T & T & F \\ F & T & F & F \\ F & F & T & T \\ F & F & F & T \\ \hline\end{array}

    Step 3: Evaluate P∧¬QP \land \neg Q.

    PQR¬QP∧¬QTTTFFTTFFFTFTTTTFFTTFTTFFFTFFFFFTTFFFFTF\begin{array}{|c|c|c|c|c|} \hline P & Q & R & \neg Q & P \land \neg Q \\ \hline T & T & T & F & F \\ T & T & F & F & F \\ T & F & T & T & T \\ T & F & F & T & T \\ F & T & T & F & F \\ F & T & F & F & F \\ F & F & T & T & F \\ F & F & F & T & F \\ \hline\end{array}

    Step 4: Evaluate R∨QR \lor Q.

    PQR¬QP∧¬QR∨QTTTFFTTTFFFTTFTTTTTFFTTFFTTFFTFTFFFTFFTTFTFFFTFF\begin{array}{|c|c|c|c|c|c|} \hline P & Q & R & \neg Q & P \land \neg Q & R \lor Q \\ \hline T & T & T & F & F & T \\ T & T & F & F & F & T \\ T & F & T & T & T & T \\ T & F & F & T & T & F \\ F & T & T & F & F & T \\ F & T & F & F & F & T \\ F & F & T & T & F & T \\ F & F & F & T & F & F \\ \hline\end{array}

    Step 5: Evaluate the final implication (P∧¬Q)β†’(R∨Q)(P \land \neg Q) \rightarrow (R \lor Q).

    PQRΒ¬QP∧¬QR∨Q(P∧¬Q)β†’(R∨Q)TTTFFTTTTFFFTTTFTTTTTTFFTTFFFTTFFTTFTFFFTTFFTTFTTFFFTFFT\begin{array}{|c|c|c|c|c|c|c|} \hline P & Q & R & \neg Q & P \land \neg Q & R \lor Q & (P \land \neg Q) \rightarrow (R \lor Q) \\ \hline T & T & T & F & F & T & T \\ T & T & F & F & F & T & T \\ T & F & T & T & T & T & T \\ T & F & F & T & T & F & F \\ F & T & T & F & F & T & T \\ F & T & F & F & F & T & T \\ F & F & T & T & F & T & T \\ F & F & F & T & F & F & T \\ \hline\end{array}

    Answer: The final column of the table above represents the truth table for (P∧¬Q)β†’(R∨Q)(P \land \neg Q) \rightarrow (R \lor Q).

    ---

    4. Tautologies, Contradictions, and Contingencies

    Based on the final column of a truth table, a compound proposition can be classified into one of three types:

    πŸ“– Tautology

    A tautology is a compound proposition that is always true, regardless of the truth values of its simple propositions. All entries in its truth table's final column are True\texttt{True}.

    πŸ“– Contradiction

    A contradiction is a compound proposition that is always false, regardless of the truth values of its simple propositions. All entries in its truth table's final column are False\texttt{False}.

    πŸ“– Contingency

    A contingency is a compound proposition that is neither a tautology nor a contradiction. Its truth value depends on the truth values of its simple propositions, meaning its truth table's final column contains both True\texttt{True} and False\texttt{False} entries.

    Example:

    • P∨¬PP \lor \neg P is a tautology.

    • P∧¬PP \land \neg P is a contradiction.

    • Pβ†’QP \rightarrow Q is a contingency.


    ---

    5. Logical Equivalence

    Two propositions are logically equivalent if they always have the same truth value for all possible truth assignments of their simple propositions. This means their truth tables are identical.

    πŸ“– Logical Equivalence

    Two compound propositions AA and BB are logically equivalent, denoted A≑BA \equiv B, if and only if their biconditional A↔BA \leftrightarrow B is a tautology. Alternatively, they are equivalent if their truth tables are identical.

    Worked Example: Proving De Morgan's Law using a Truth Table

    Problem: Prove De Morgan's Law: Β¬(P∧Q)≑¬P∨¬Q\neg (P \land Q) \equiv \neg P \lor \neg Q.

    Solution:

    Step 1: Construct truth tables for both sides of the equivalence.
    We need columns for P,Q,P∧Q,¬(P∧Q)P, Q, P \land Q, \neg (P \land Q) and ¬P,¬Q,¬P∨¬Q\neg P, \neg Q, \neg P \lor \neg Q.

    PQP∧Q¬(P∧Q)¬P¬Q¬P∨¬QTTTFFFFTFFTFTTFTFTTFTFFFTTTT\begin{array}{|c|c|c|c|c|c|c|} \hline P & Q & P \land Q & \neg (P \land Q) & \neg P & \neg Q & \neg P \lor \neg Q \\ \hline T & T & T & F & F & F & F \\ T & F & F & T & F & T & T \\ F & T & F & T & T & F & T \\ F & F & F & T & T & T & T \\ \hline\end{array}

    Step 2: Compare the final columns.
    The column for ¬(P∧Q)\neg (P \land Q) is: F,T,T,TF, T, T, T.
    The column for ¬P∨¬Q\neg P \lor \neg Q is: F,T,T,TF, T, T, T.

    Since both columns are identical for all possible truth assignments of PP and QQ, the two propositions are logically equivalent.

    Answer: The truth tables confirm that Β¬(P∧Q)≑¬P∨¬Q\neg (P \land Q) \equiv \neg P \lor \neg Q.

    ---

    ---

    6. Boolean Functions

    A boolean function is a function that maps inputs from a set of boolean values to a single boolean output value. Truth tables are the primary way to represent and define boolean functions.

    πŸ“– Boolean Function

    An nn-ary Boolean function is a function f:{T,F}n→{T,F}f: \{T, F\}^n \rightarrow \{T, F\} that takes nn Boolean input values and produces a single Boolean output value.

    For an nn-ary boolean function, there are 2n2^n possible input combinations (rows in the truth table). For each input combination, the function can output either TT or FF. Therefore, there are 22n2^{2^n} distinct nn-ary boolean functions.

    Example:

    • For n=1n=1 (unary function), there are 221=22=42^{2^1} = 2^2 = 4 possible functions:

    1. f(P)=Tf(P) = T (always true)
    2. f(P)=Ff(P) = F (always false)
    3. f(P)=Pf(P) = P (identity)
    4. f(P)=Β¬Pf(P) = \neg P (negation)
    • For n=2n=2 (binary function), there are 222=24=162^{2^2} = 2^4 = 16 possible functions (e.g., AND, OR, XOR, NOR, NAND, etc.).

    • For n=3n=3 (3-ary function), there are 223=28=2562^{2^3} = 2^8 = 256 possible functions.


    When comparing two boolean functions, ff and gg, they "agree" on an input combination (x1,…,xn)(x_1, \dots, x_n) if f(x1,…,xn)=g(x1,…,xn)f(x_1, \dots, x_n) = g(x_1, \dots, x_n). They "disagree" if f(x1,…,xn)β‰ g(x1,…,xn)f(x_1, \dots, x_n) \ne g(x_1, \dots, x_n). This comparison is done row by row in their respective truth tables.

    ---

    Problem-Solving Strategies

    πŸ’‘ Translating Natural Language to Logic

    For problems involving verbal statements, the first crucial step is to translate them into formal logical propositions and connectives.

    • Identify simple propositions: Assign a unique Boolean variable (e.g., P,Q,RP, Q, R) to each distinct simple statement that can be true or false.

    • Identify logical connectives: Recognize keywords like "and" (∧\land), "or" (∨\lor), "not" (Β¬\neg), "if...then..." (β†’\rightarrow), "if and only if" (↔\leftrightarrow), "either...or..." (βŠ•\oplus).

    • Formulate compound propositions: Combine the variables using the identified connectives, paying close attention to parentheses for correct grouping and order of operations.

    πŸ’‘ Systematic Case Analysis with Truth Tables

    When faced with a complex logical puzzle or a set of conditions that must be simultaneously satisfied, a truth table provides a systematic way to explore all possibilities:

    • Define all relevant simple propositions: List every independent statement that can be true or false.

    • Construct a full truth table: Include columns for all simple propositions and intermediate compound conditions.

    • Evaluate each condition: For each row (each possible scenario), determine if the given conditions are true or false.

    • Identify valid scenarios: Filter the rows to find those where all specified conditions are met. This often involves identifying rows where a final compound proposition (representing the conjunction of all conditions) is true.

    • Analyze valid scenarios: Once the valid scenarios are identified, examine the truth values of the simple propositions within those rows to answer the problem's specific question.

    ---

    Common Mistakes

    ⚠️ Implication Direction and Meaning

    ❌ Mistake: Assuming Pβ†’QP \rightarrow Q means PP causes QQ in a temporal or causal sense, or that Qβ†’PQ \rightarrow P is equivalent. Also, misinterpreting cases where PP is false.
    βœ… Correct: Pβ†’QP \rightarrow Q is a logical implication, not necessarily causal. It is false only when PP is true and QQ is false. If PP is false, the implication Pβ†’QP \rightarrow Q is always true, regardless of QQ's truth value. Remember, Pβ†’QP \rightarrow Q is NOT equivalent to Qβ†’PQ \rightarrow P (the converse), nor to Β¬Pβ†’Β¬Q\neg P \rightarrow \neg Q (the inverse). It is equivalent to Β¬Qβ†’Β¬P\neg Q \rightarrow \neg P (the contrapositive) and Β¬P∨Q\neg P \lor Q.

    ⚠️ Exclusive vs. Inclusive OR

    ❌ Mistake: Confusing "or" in natural language with the logical inclusive OR (∨\lor). Natural language "or" can sometimes imply exclusivity.
    βœ… Correct: In formal logic, ∨\lor (disjunction) is always the inclusive OR, meaning "PP or QQ or both." If the problem specifically requires "one or the other, but not both," you must use the exclusive OR (βŠ•\oplus). Always clarify the intended meaning of "or" in context.

    ⚠️ Order of Operations

    ❌ Mistake: Incorrectly evaluating compound propositions by ignoring the standard order of operations for logical connectives.
    βœ… Correct: The standard order of precedence is:

    • Negation (Β¬\neg)

    • Conjunction (∧\land)

    • Disjunction (∨\lor)

    • Implication (β†’\rightarrow)

    • Biconditional (↔\leftrightarrow)

    Use parentheses to explicitly define the order when ambiguity exists or a different order is intended.

    ---

    ---

    Practice Questions

    :::question type="MCQ" question="How many distinct 4-ary boolean functions exist that output True\texttt{True} for exactly two input combinations?" options=["242^4","424^2","(162)\binom{16}{2}","2162^{16}"] answer="(162)\binom{16}{2}" hint="Consider the total number of input combinations and how many of them must result in a True output. Then think about the total number of distinct boolean functions." solution="A 4-ary boolean function has 24=162^4 = 16 possible input combinations (rows in its truth table). For each of these 16 combinations, the function can output either True\texttt{True} or False\texttt{False}.
    The problem states that the function must output True\texttt{True} for exactly two input combinations. This means we need to choose 2 of the 16 possible output positions to be True\texttt{True}, and the remaining 16βˆ’2=1416-2=14 positions will be False\texttt{False}.
    The number of ways to choose 2 positions out of 16 is given by the binomial coefficient (162)\binom{16}{2}.

    (162)=16!2!(16βˆ’2)!=16!2!14!=16Γ—152Γ—1=8Γ—15=120\binom{16}{2} = \frac{16!}{2!(16-2)!} = \frac{16!}{2!14!} = \frac{16 \times 15}{2 \times 1} = 8 \times 15 = 120

    Therefore, there are (162)\binom{16}{2} such functions.
    Answer: (162)\boxed{\binom{16}{2}}"
    :::

    :::question type="NAT" question="Consider the following logical statement: (P∧¬Q)∨(Β¬Pβ†’Q)(P \land \neg Q) \lor (\neg P \rightarrow Q). How many rows in its truth table will result in a True\texttt{True} value?" answer="3" hint="Construct the full truth table step-by-step and count the True outcomes in the final column." solution="Let's construct the truth table for (P∧¬Q)∨(Β¬Pβ†’Q)(P \land \neg Q) \lor (\neg P \rightarrow Q).
    First, identify the simple propositions: P,QP, Q. Number of rows: 22=42^2 = 4.

    Step 1: Write down all combinations for PP and QQ.
    Step 2: Evaluate Β¬P\neg P and Β¬Q\neg Q.
    Step 3: Evaluate P∧¬QP \land \neg Q.
    Step 4: Evaluate ¬P→Q\neg P \rightarrow Q.
    Step 5: Evaluate the final disjunction (P∧¬Q)∨(Β¬Pβ†’Q)(P \land \neg Q) \lor (\neg P \rightarrow Q).

    PQΒ¬PΒ¬QP∧¬QΒ¬Pβ†’Q(P∧¬Q)∨(Β¬Pβ†’Q)TTFFFTTTFFTTTTFTTFFTTFFTTFFF\begin{array}{|c|c|c|c|c|c|c|} \hline P & Q & \neg P & \neg Q & P \land \neg Q & \neg P \rightarrow Q & (P \land \neg Q) \lor (\neg P \rightarrow Q) \\ \hline T & T & F & F & F & T & T \\ T & F & F & T & T & T & T \\ F & T & T & F & F & T & T \\ F & F & T & T & F & F & F \\ \hline\end{array}

    The final column shows True\texttt{True} for the first three rows.

    Therefore, there are 3 rows that result in a True\texttt{True} value.
    Answer: 3\boxed{3}"
    :::

    :::question type="MSQ" question="Which of the following propositions are logically equivalent to Pβ†’QP \rightarrow Q? Select ALL correct options." options=["Β¬P∨Q\neg P \lor Q","Β¬Qβ†’Β¬P\neg Q \rightarrow \neg P","Qβ†’PQ \rightarrow P","Β¬P∧¬Q\neg P \land \neg Q"] answer="Β¬P∨Q\neg P \lor Q, Β¬Qβ†’Β¬P\neg Q \rightarrow \neg P" hint="Construct truth tables for Pβ†’QP \rightarrow Q and each option, then compare the final columns. Remember the definition of contrapositive." solution="Let's first establish the truth table for Pβ†’QP \rightarrow Q:

    PQP→QTTTTFFFTTFFT\begin{array}{|c|c|c|} \hline P & Q & P \rightarrow Q \\ \hline T & T & T \\ T & F & F \\ F & T & T \\ F & F & T \\ \hline\end{array}

    Now, let's evaluate each option:

    Option 1: ¬P∨Q\neg P \lor Q

    PQ¬P¬P∨QTTFTTFFFFTTTFFTT\begin{array}{|c|c|c|c|}
    \hline
    P & Q & \neg P & \neg P \lor Q \\
    \hline
    T & T & F & T \\
    T & F & F & F \\
    F & T & T & T \\
    F & F & T & T \\
    \hline\end{array}

    Comparing the last column with Pβ†’QP \rightarrow Q's column, they are identical. So, Β¬P∨Q\neg P \lor Q is equivalent to Pβ†’QP \rightarrow Q.

    Option 2: ¬Q→¬P\neg Q \rightarrow \neg P (Contrapositive)

    PQ¬Q¬P¬Q→¬PTTFFTTFTFFFTFTTFFTTT\begin{array}{|c|c|c|c|c|}
    \hline
    P & Q & \neg Q & \neg P & \neg Q \rightarrow \neg P \\
    \hline
    T & T & F & F & T \\
    T & F & T & F & F \\
    F & T & F & T & T \\
    F & F & T & T & T \\
    \hline\end{array}

    Comparing the last column with P→QP \rightarrow Q's column, they are identical. So, ¬Q→¬P\neg Q \rightarrow \neg P is equivalent to P→QP \rightarrow Q.

    Option 3: Q→PQ \rightarrow P (Converse)

    PQQ→PTTTTFTFTFFFT\begin{array}{|c|c|c|}
    \hline
    P & Q & Q \rightarrow P \\
    \hline
    T & T & T \\
    T & F & T \\
    F & T & F \\
    F & F & T \\
    \hline\end{array}

    The column for Q→PQ \rightarrow P is T,T,F,TT, T, F, T, which is different from P→QP \rightarrow Q's column (T,F,T,TT, F, T, T). So, Q→PQ \rightarrow P is not equivalent to P→QP \rightarrow Q.

    Option 4: ¬P∧¬Q\neg P \land \neg Q

    PQ¬P¬Q¬P∧¬QTTFFFTFFTFFTTFFFFTTT\begin{array}{|c|c|c|c|c|}
    \hline
    P & Q & \neg P & \neg Q & \neg P \land \neg Q \\
    \hline
    T & T & F & F & F \\
    T & F & F & T & F \\
    F & T & T & F & F \\
    F & F & T & T & T \\
    \hline\end{array}

    The column for Β¬P∧¬Q\neg P \land \neg Q is F,F,F,TF, F, F, T, which is different from Pβ†’QP \rightarrow Q's column (T,F,T,TT, F, T, T). So, Β¬P∧¬Q\neg P \land \neg Q is not equivalent to Pβ†’QP \rightarrow Q.

    The correct options are Β¬P∨Q\neg P \lor Q and Β¬Qβ†’Β¬P\neg Q \rightarrow \neg P.
    Answer: Β¬P∨Q,Β¬Qβ†’Β¬P\boxed{\neg P \lor Q, \neg Q \rightarrow \neg P}"
    :::

    :::question type="SUB" question="Prove using a truth table that the proposition (P∧Q)β†’(P∨Q)(P \land Q) \rightarrow (P \lor Q) is a tautology." answer="The final column of the truth table for (P∧Q)β†’(P∨Q)(P \land Q) \rightarrow (P \lor Q) consists entirely of True\texttt{True} values, thus proving it is a tautology." hint="Construct the truth table for the given compound proposition step-by-step. If all entries in the final column are 'True', it is a tautology." solution="To prove that (P∧Q)β†’(P∨Q)(P \land Q) \rightarrow (P \lor Q) is a tautology, we must show that its truth value is always True\texttt{True}, regardless of the truth values of PP and QQ. We do this by constructing a truth table.

    Step 1: List all possible truth value combinations for PP and QQ.

    PQTTTFFTFF\begin{array}{|c|c|} \hline P & Q \\ \hline T & T \\ T & F \\ F & T \\ F & F \\ \hline\end{array}

    Step 2: Evaluate the conjunction P∧QP \land Q.

    PQP∧QTTTTFFFTFFFF\begin{array}{|c|c|c|} \hline P & Q & P \land Q \\ \hline T & T & T \\ T & F & F \\ F & T & F \\ F & F & F \\ \hline\end{array}

    Step 3: Evaluate the disjunction P∨QP \lor Q.

    PQP∧QP∨QTTTTTFFTFTFTFFFF\begin{array}{|c|c|c|c|} \hline P & Q & P \land Q & P \lor Q \\ \hline T & T & T & T \\ T & F & F & T \\ F & T & F & T \\ F & F & F & F \\ \hline\end{array}

    Step 4: Evaluate the implication (P∧Q)β†’(P∨Q)(P \land Q) \rightarrow (P \lor Q). An implication Aβ†’BA \rightarrow B is false only if AA is true and BB is false.

    PQP∧QP∨Q(P∧Q)β†’(P∨Q)TTTTTTFFTTFTFTTFFFFT\begin{array}{|c|c|c|c|c|} \hline P & Q & P \land Q & P \lor Q & (P \land Q) \rightarrow (P \lor Q) \\ \hline T & T & T & T & T \\ T & F & F & T & T \\ F & T & F & T & T \\ F & F & F & F & T \\ \hline\end{array}

    The final column of the truth table shows that the proposition (P∧Q)β†’(P∨Q)(P \land Q) \rightarrow (P \lor Q) is True\texttt{True} for all possible truth assignments of PP and QQ. By definition, a proposition that is always true is a tautology. Therefore, (P∧Q)β†’(P∨Q)(P \land Q) \rightarrow (P \lor Q) is a tautology.
    Answer: (P∧Q)β†’(P∨Q)Β isΒ aΒ tautology.\boxed{(P \land Q) \rightarrow (P \lor Q) \text{ is a tautology.}}"
    :::

    :::question type="MCQ" question="A 22-ary boolean function f(P,Q)f(P, Q) is defined such that f(P,Q)=Truef(P, Q) = \texttt{True} if and only if PP is True\texttt{True} and QQ is False\texttt{False}. Which of the following logical expressions represents this function?" options=["P∨¬QP \lor \neg Q","P∧¬QP \land \neg Q","¬P∨Q\neg P \lor Q","¬(P∧Q)\neg (P \land Q)"] answer="P∧¬QP \land \neg Q" hint="Construct the truth table based on the given definition and compare it to the truth tables of the options." solution="The function f(P,Q)f(P, Q) outputs True\texttt{True} if and only if PP is True\texttt{True} and QQ is False\texttt{False}. Let's construct its truth table:

    PQf(P,Q)TTFTFTFTFFFF\begin{array}{|c|c|c|} \hline P & Q & f(P, Q) \\ \hline T & T & F \\ T & F & T \\ F & T & F \\ F & F & F \\ \hline\end{array}

    Now, let's evaluate each option:

  • P∨¬QP \lor \neg Q

  • PQΒ¬QP∨¬QTTFTTFTTFTFFFFTT\begin{array}{|c|c|c|c|}
    \hline
    P & Q & \neg Q & P \lor \neg Q \\
    \hline
    T & T & F & T \\
    T & F & T & T \\
    F & T & F & F \\
    F & F & T & T \\
    \hline\end{array}

    This does not match f(P,Q)f(P, Q).

  • P∧¬QP \land \neg Q

  • PQΒ¬QP∧¬QTTFFTFTTFTFFFFTF\begin{array}{|c|c|c|c|}
    \hline
    P & Q & \neg Q & P \land \neg Q \\
    \hline
    T & T & F & F \\
    T & F & T & T \\
    F & T & F & F \\
    F & F & T & F \\
    \hline\end{array}

    This matches f(P,Q)f(P, Q) exactly.

  • Β¬P∨Q\neg P \lor Q

  • PQΒ¬PΒ¬P∨QTTFTTFFFFTTTFFTT\begin{array}{|c|c|c|c|}
    \hline
    P & Q & \neg P & \neg P \lor Q \\
    \hline
    T & T & F & T \\
    T & F & F & F \\
    F & T & T & T \\
    F & F & T & T \\
    \hline\end{array}

    This does not match f(P,Q)f(P, Q).

  • Β¬(P∧Q)\neg (P \land Q) (This is NAND)

  • PQP∧QΒ¬(P∧Q)TTTFTFFTFTFTFFFT\begin{array}{|c|c|c|c|}
    \hline
    P & Q & P \land Q & \neg (P \land Q) \\
    \hline
    T & T & T & F \\
    T & F & F & T \\
    F & T & F & T \\
    F & F & F & T \\
    \hline\end{array}

    This does not match f(P,Q)f(P, Q).

    The only expression that matches the defined function is P∧¬QP \land \neg Q.
    Answer: P∧¬Q\boxed{P \land \neg Q}"
    :::

    ---

    Summary

    ❗ Key Takeaways for CMI

    • Core Concepts: Understand Boolean values (True/False), propositions, and the definitions of all standard logical connectives (Β¬,∧,∨,β†’,↔,βŠ•\neg, \land, \lor, \rightarrow, \leftrightarrow, \oplus).

    • Truth Table Construction: Be proficient in systematically building truth tables for any compound proposition, correctly accounting for 2n2^n rows and the order of operations for connectives.

    • Classification: Distinguish between tautologies (always true), contradictions (always false), and contingencies (mixed truth values) based on the final column of a truth table.

    • Logical Equivalence: Use truth tables to prove or disprove logical equivalence between two propositions by comparing their final columns or by checking if their biconditional is a tautology.

    • Boolean Functions: Recognize that truth tables define boolean functions. Understand that for nn variables, there are 2n2^n input combinations and 22n2^{2^n} distinct boolean functions.

    • Problem-Solving: Apply truth tables for systematic case analysis in logical puzzles and for translating natural language statements into formal logic.

    ---

    What's Next?

    πŸ’‘ Continue Learning

    This topic connects to:

      • Propositional Logic: Truth tables are the foundational tool for analyzing and simplifying propositional logic expressions. Mastery here is crucial for understanding logical inference and proofs.

      • Boolean Algebra: The concepts introduced in truth tables form the basis of Boolean algebra, which provides algebraic rules and identities for manipulating logical expressions, essential for circuit design and optimization.

      • Predicate Logic: While truth tables deal with propositions, predicate logic extends this by introducing predicates, quantifiers, and variables, allowing for more complex statements about objects and their properties.

      • Set Theory: There's a strong analogy between logical connectives and set operations (e.g., ∧\land with intersection, ∨\lor with union, Β¬\neg with complement), which helps in understanding both domains.


    Master these connections for comprehensive CMI preparation!

    ---

    ---

    Chapter Summary

    πŸ“– Boolean Logic - Key Takeaways

    • Propositions: A proposition is a declarative sentence that is definitively either true or false, but not both. It serves as the fundamental unit of logical reasoning.

    • Logical Operators: Master the definitions and truth conditions for the five primary logical operators: negation (Β¬\neg), conjunction (∧\land), disjunction (∨\lor), implication (β†’\to), and biconditional (↔\leftrightarrow). Each operator combines propositions to form more complex compound propositions.

    • Truth Tables: This is an indispensable tool for systematically determining the truth value of any compound proposition for all possible truth assignments of its constituent simple propositions. Truth tables rigorously define the behavior of logical operators.

    • Logical Equivalence: Two propositions are logically equivalent, denoted P≑QP \equiv Q, if they possess identical truth values in every possible scenario. This can be rigorously established by comparing their truth tables. Crucial equivalences include De Morgan's Laws and the fundamental equivalence Pβ†’Q≑¬P∨QP \to Q \equiv \neg P \lor Q.

    • Tautology, Contradiction, Contingency: A proposition is classified as a tautology if it is always true, a contradiction if it is always false, and a contingency if its truth value varies depending on the truth values of its simple propositions. Identifying these categories is vital for logical analysis.

    • Understanding Implication: The implication Pβ†’QP \to Q ("If PP, then QQ") is only false in one specific case: when the premise PP is true and the conclusion QQ is false. In all other scenarios, including when PP is false, the implication is considered true.

    ---

    Chapter Review Questions

    :::question type="MCQ" question="Which of the following propositions is logically equivalent to Β¬(Pβ†’(Β¬Q∧R))\neg(P \to (\neg Q \land R))?" options=["P∧(Q∨¬R)P \land (Q \lor \neg R)","P∧(Β¬Q∧R)P \land (\neg Q \land R)","Β¬P∨(Q∧¬R)\neg P \lor (Q \land \neg R)","Β¬P∨(Β¬Q∧R)\neg P \lor (\neg Q \land R)"] answer="A" hint="Recall the equivalence Β¬(Aβ†’B)≑A∧¬B\neg(A \to B) \equiv A \land \neg B and De Morgan's Laws for negating conjunctions." solution="We want to find a proposition logically equivalent to Β¬(Pβ†’(Β¬Q∧R))\neg(P \to (\neg Q \land R)).

    First, recall the logical equivalence for the negation of an implication:

    Β¬(Aβ†’B)≑A∧¬B\neg(A \to B) \equiv A \land \neg B

    Let A=PA = P and B=(¬Q∧R)B = (\neg Q \land R). Applying this equivalence, we get:
    Β¬(Pβ†’(Β¬Q∧R))≑P∧¬(Β¬Q∧R)\neg(P \to (\neg Q \land R)) \equiv P \land \neg(\neg Q \land R)

    Next, apply De Morgan's Law to negate the conjunction ¬(¬Q∧R)\neg(\neg Q \land R):
    Β¬(Β¬Q∧R)≑¬(Β¬Q)∨¬R\neg(\neg Q \land R) \equiv \neg(\neg Q) \lor \neg R

    ≑Q∨¬R\equiv Q \lor \neg R

    Substitute this result back into our expression:
    P∧(Q∨¬R)P \land (Q \lor \neg R)

    Therefore, the correct option is A.

    The final answer is A\boxed{A}"
    :::

    :::question type="NAT" question="Consider the compound proposition (P∨¬Q)∧(¬P∨R)(P \lor \neg Q) \land (\neg P \lor R). How many rows in its truth table result in a 'True' value?" answer="5" hint="Construct a full truth table for the proposition involving P,Q,RP, Q, R. There are 23=82^3 = 8 possible truth assignments. Evaluate the compound proposition for each row and count the number of 'True' outcomes." solution="To determine the number of 'True' rows, we construct a truth table for (P∨¬Q)∧(¬P∨R)(P \lor \neg Q) \land (\neg P \lor R). Since there are 3 distinct propositional variables (P,Q,RP, Q, R), the truth table will have 23=82^3 = 8 rows.

    | PP | QQ | RR | ¬Q\neg Q | P∨¬QP \lor \neg Q | ¬P\neg P | ¬P∨R\neg P \lor R | (P∨¬Q)∧(¬P∨R)(P \lor \neg Q) \land (\neg P \lor R) |
    |:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
    | T | T | T | F | T | F | T | T |
    | T | T | F | F | T | F | F | F |
    | T | F | T | T | T | F | T | T |
    | T | F | F | T | T | F | F | F |
    | F | T | T | F | F | T | T | F |
    | F | T | F | F | F | T | T | F |
    | F | F | T | T | T | T | T | T |
    | F | F | F | T | T | T | T | T |

    By counting the rows where the final expression (P∨¬Q)∧(¬P∨R)(P \lor \neg Q) \land (\neg P \lor R) evaluates to 'True' (highlighted in the last column), we find there are 5 such rows.

    The final answer is 5\boxed{5}"
    :::

    :::question type="MCQ" question="Which of the following propositions is a tautology?" options=["(P∧Q)∧¬P(P \land Q) \land \neg P","(P∨Q)↔(Β¬P∧¬Q)(P \lor Q) \leftrightarrow (\neg P \land \neg Q)","(P∧(Pβ†’Q))β†’Q(P \land (P \to Q)) \to Q","(P∨Q)∧(Β¬P∨¬Q)(P \lor Q) \land (\neg P \lor \neg Q)"] answer="C" hint="A tautology is a proposition that is always true, regardless of the truth values of its constituent simple propositions. You can use truth tables or apply logical equivalences to simplify and test each option." solution="Let's analyze each option using logical equivalences:

    A. (P∧Q)∧¬P(P \land Q) \land \neg P
    Using the commutative and associative laws for conjunction, and the contradiction law (P∧¬P≑FP \land \neg P \equiv F):

    (P∧Q)∧¬P≑(P∧¬P)∧Q≑F∧Q≑F(P \land Q) \land \neg P \equiv (P \land \neg P) \land Q \equiv F \land Q \equiv F

    This proposition is a contradiction, as it is always false.

    B. (P∨Q)↔(Β¬P∧¬Q)(P \lor Q) \leftrightarrow (\neg P \land \neg Q)
    Recall De Morgan's Law: Β¬P∧¬Q≑¬(P∨Q)\neg P \land \neg Q \equiv \neg(P \lor Q).
    Substituting this into the proposition:

    (P∨Q)↔¬(P∨Q)(P \lor Q) \leftrightarrow \neg(P \lor Q)

    Let X=P∨QX = P \lor Q. Then the proposition becomes X↔¬XX \leftrightarrow \neg X.
    A biconditional A↔BA \leftrightarrow B is true if and only if AA and BB have the same truth value. Since XX and Β¬X\neg X always have opposite truth values, X↔¬XX \leftrightarrow \neg X is always false.
    This proposition is a contradiction.

    C. (P∧(Pβ†’Q))β†’Q(P \land (P \to Q)) \to Q
    This is a classic logical argument form known as Modus Ponens, which is a tautology. Let's prove it using logical equivalences:
    Recall the equivalence for implication: Pβ†’Q≑¬P∨QP \to Q \equiv \neg P \lor Q.
    Substitute this into the proposition:

    (P∧(Β¬P∨Q))β†’Q(P \land (\neg P \lor Q)) \to Q

    Apply the distributive law A∧(B∨C)≑(A∧B)∨(A∧C)A \land (B \lor C) \equiv (A \land B) \lor (A \land C):
    ((P∧¬P)∨(P∧Q))β†’Q((P \land \neg P) \lor (P \land Q)) \to Q

    Since P∧¬P≑FP \land \neg P \equiv F:
    (F∨(P∧Q))β†’Q(F \lor (P \land Q)) \to Q

    The identity law for disjunction states F∨X≑XF \lor X \equiv X:
    (P∧Q)β†’Q(P \land Q) \to Q

    Now, apply the implication equivalence again:
    ¬(P∧Q)∨Q\neg(P \land Q) \lor Q

    By De Morgan's Law:
    (¬P∨¬Q)∨Q(\neg P \lor \neg Q) \lor Q

    By associativity and commutativity of disjunction:
    ¬P∨(¬Q∨Q)\neg P \lor (\neg Q \lor Q)

    Since Β¬Q∨Q≑T\neg Q \lor Q \equiv T:
    ¬P∨T\neg P \lor T

    The domination law for disjunction states X∨T≑TX \lor T \equiv T:
    TT

    This proposition is a tautology, as it is always true.

    D. (P∨Q)∧(¬P∨¬Q)(P \lor Q) \land (\neg P \lor \neg Q)
    This proposition is equivalent to the exclusive OR operation, PβŠ•QP \oplus Q.
    Let's test with a truth assignment:
    If P=T,Q=TP=T, Q=T: (T∨T)∧(¬T∨¬T)=T∧(F∨F)=T∧F=F(T \lor T) \land (\neg T \lor \neg T) = T \land (F \lor F) = T \land F = F.
    Since it's false for at least one assignment, it is not a tautology.
    This proposition is a contingency.

    Therefore, option C is the only tautology.

    The final answer is C\boxed{C}"
    :::

    :::question type="Proof" question="Prove the logical equivalence (P∧Q)β†’R≑Pβ†’(Qβ†’R)(P \land Q) \to R \equiv P \to (Q \to R) using a truth table." solution="To prove the logical equivalence (P∧Q)β†’R≑Pβ†’(Qβ†’R)(P \land Q) \to R \equiv P \to (Q \to R) using a truth table, we must demonstrate that the columns representing the truth values of both compound propositions are identical for all possible truth assignments of P,Q,RP, Q, R. With 3 distinct propositional variables, the truth table will have 23=82^3 = 8 rows.

    We will construct the truth table step-by-step:

    | PP | QQ | RR | P∧QP \land Q | (P∧Q)β†’R(P \land Q) \to R | Qβ†’RQ \to R | Pβ†’(Qβ†’R)P \to (Q \to R) |
    |:---:|:---:|:---:|:---:|:---:|:---:|:---:|
    | T | T | T | T | T | T | T |
    | T | T | F | T | F | F | F |
    | T | F | T | F | T | T | T |
    | T | F | F | F | T | T | T |
    | F | T | T | F | T | T | T |
    | F | T | F | F | T | F | T |
    | F | F | T | F | T | T | T |
    | F | F | F | F | T | T | T |

    Upon comparing the column for (P∧Q)β†’R(P \land Q) \to R (column 5) with the column for Pβ†’(Qβ†’R)P \to (Q \to R) (column 7), we observe that their truth values are identical for every single row.

    Therefore, the propositions (P∧Q)β†’R(P \land Q) \to R and Pβ†’(Qβ†’R)P \to (Q \to R) are logically equivalent. This specific equivalence is often referred to as the Exportation Law."
    :::

    ---

    What's Next?

    πŸ’‘ Continue Your CMI Journey

    You've mastered the fundamentals of Boolean Logic! This chapter is a cornerstone in Discrete Mathematics, providing the essential language and tools for rigorous logical reasoning crucial for various advanced topics in CMI preparation and Computer Science.

    Key connections and next steps:
    Foundation for Formal Reasoning: The concepts of propositions, logical operators, and logical equivalence are fundamental to constructing, analyzing, and validating mathematical arguments and proofs. This chapter lays the groundwork for any formal reasoning you'll encounter.
    Predicate Logic: Boolean Logic forms the direct basis for Predicate Logic, which extends these ideas to statements involving variables, predicates, and quantifiers (βˆ€\forall - "for all", βˆƒ\exists - "there exists"). Predicate Logic allows for much more expressive and complex logical statements.
    Set Theory: There's a profound analogy between Boolean operators and set operations (e.g., conjunction ∧\land corresponds to set intersection ∩\cap, disjunction ∨\lor to set union βˆͺ\cup, and negation Β¬\neg to set complement ∁\complement). Understanding one concept deeply aids in grasping the other.
    Proof Techniques: The principles of logical equivalence, tautologies, and contradictions are directly applied in various formal proof methods, such as direct proof, proof by contradiction, and proof by contrapositive, which are central to CMI.
    * Digital Logic and Computer Architecture: Boolean Algebra is the mathematical foundation for digital circuits. A solid understanding of logical operators is directly applicable to designing and analyzing logic gates (AND, OR, NOT, XOR, etc.), which are the fundamental building blocks of all modern computers.

    Boolean Logic

    Overview

    Welcome to the foundational chapter on Boolean Logic, a cornerstone of Discrete Mathematics and an indispensable tool in your Masters in Data Science journey. This chapter introduces the fundamental principles that govern how computers process information, how databases are queried, and how algorithms make decisions. ---

    Learning Objectives

    ❗ By the End of This Topic

    After studying this topic, you will be able to:

    • Define propositions and assign appropriate truth values.

    • Identify and correctly apply fundamental logical operators (∧\land, ∨\lor, Β¬\neg, β€…β€ŠβŸΉβ€…β€Š\implies, β€…β€ŠβŸΊβ€…β€Š\iff, βŠ•\oplus).

    • Construct comprehensive truth tables for compound logical expressions.

    • Analyze and interpret the truth values of complex logical statements.

    ---

    Part 1: Propositions and Logical Operators

    πŸ“– Proposition

    A proposition (or statement) is a declarative sentence that is either true or false, but not both. It must have a definite truth value.

    Examples:
    * "The sky is blue." (True)
    * "2+2=52 + 2 = 5" (False)
    * "Every prime number greater than 22 is odd." (True)

    ---

    Logical Connectives

    Negation (Β¬\neg)

    The negation of a proposition PP, denoted by Β¬P\neg P, is true when PP is false, and false when PP is true.
    πŸ“ Negation

    <br><br>P¬P<br>TF<br>FT<br><br><br>\begin{array}{cc} <br>P & \neg P \\ <br>\text{T} & \text{F} \\ <br>\text{F} & \text{T} <br>\end{array} <br>

    Conjunction (∧\land)

    True if and only if both PP and QQ are true.
    πŸ“ Conjunction

    <br><br>PQP∧Q<br>TTT<br>TFF<br>FTF<br>FFF<br><br><br>\begin{array}{ccc} <br>P & Q & P \land Q \\ <br>\text{T} & \text{T} & \text{T} \\ <br>\text{T} & \text{F} & \text{F} \\ <br>\text{F} & \text{T} & \text{F} \\ <br>\text{F} & \text{F} & \text{F} <br>\end{array} <br>

    Disjunction (∨\lor)

    True if at least one of PP or QQ is true. This is the inclusive or.
    πŸ“ Disjunction

    <br><br>PQP∨Q<br>TTT<br>TFT<br>FTT<br>FFF<br><br><br>\begin{array}{ccc} <br>P & Q & P \lor Q \\ <br>\text{T} & \text{T} & \text{T} \\ <br>\text{T} & \text{F} & \text{T} \\ <br>\text{F} & \text{T} & \text{T} \\ <br>\text{F} & \text{F} & \text{F} <br>\end{array} <br>

    Implication (β€…β€ŠβŸΉβ€…β€Š\implies)

    False if and only if PP is true and QQ is false. Otherwise, it is true.
    πŸ“ Implication

    <br><br>PQPβ€…β€ŠβŸΉβ€…β€ŠQ<br>TTT<br>TFF<br>FTT<br>FFT<br><br><br>\begin{array}{ccc} <br>P & Q & P \implies Q \\ <br>\text{T} & \text{T} & \text{T} \\ <br>\text{T} & \text{F} & \text{F} \\ <br>\text{F} & \text{T} & \text{T} \\ <br>\text{F} & \text{F} & \text{T} <br>\end{array} <br>

    Interpretations of Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q: * "If PP, then QQ." * "PP is sufficient for QQ." * "QQ is necessary for PP." * "PP only if QQ."

    Biconditional (β€…β€ŠβŸΊβ€…β€Š\iff)

    True when PP and QQ have the same truth value.
    πŸ“ Biconditional

    <br><br>PQPβ€…β€ŠβŸΊβ€…β€ŠQ<br>TTT<br>TFF<br>FTF<br>FFT<br><br><br>\begin{array}{ccc} <br>P & Q & P \iff Q \\ <br>\text{T} & \text{T} & \text{T} \\ <br>\text{T} & \text{F} & \text{F} \\ <br>\text{F} & \text{T} & \text{F} \\ <br>\text{F} & \text{F} & \text{T} <br>\end{array} <br>

    Exclusive OR (βŠ•\oplus)

    True when exactly one of PP or QQ is true.
    πŸ“ Exclusive OR

    <br><br>PQPβŠ•Q<br>TTF<br>TFT<br>FTT<br>FFF<br><br><br>\begin{array}{ccc} <br>P & Q & P \oplus Q \\ <br>\text{T} & \text{T} & \text{F} \\ <br>\text{T} & \text{F} & \text{T} \\ <br>\text{F} & \text{T} & \text{T} \\ <br>\text{F} & \text{F} & \text{F} <br>\end{array} <br>

    Core Concepts: Propositions & Truth Values

    πŸ“– Propositions (Merged)

    A proposition is a declarative sentence that is either true (T) or false (F), but not both.
    * Atomic Propositions: Simple statements that cannot be further divided (e.g., "It is raining").
    * Compound Propositions: Formed by joining atomic propositions using logical connectives.
    * Truth Value: The attribute of being True (1) or False (0).

    ---

    Master Reference: Logical Connectives

    Instead of evaluating operators in isolation, use this master truth table to compare how connectives respond to the same input values of PP and QQ.
    πŸ“ Master Truth Table

    <br>\begin{array}{|c|c||c|c|c|c|c|c|} <br>\hline <br>P & Q & \neg P & P \land Q & P \lor Q & P \oplus Q & P \implies Q & P \iff Q \\ <br>\hline <br>\text{T} & \text{T} & \text{F} & \text{T} & \text{T} & \text{F} & \text{T} & \text{T} \\ <br>\text{T} & \text{F} & \text{F} & \text{F} & \text{T} & \text{T} & \text{F} & \text{F} \\ <br>\text{F} & \text{T} & \text{T} & \text{F} & \text{T} & \text{T} & \text{T} & \text{F} \\ <br>\text{F} & \text{F} & \text{T} & \text{F} & \text{F} & \text{F} & \text{T} & \text{T} \\ <br>\hline <br>\end{array} <br>

    ---

    The Conditional Operator (Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q)

    The implication is the most frequently misunderstood connective. It is False only when a true hypothesis leads to a false conclusion.

    Unified Interpretations

    • Standard: "If PP, then QQ."
    • Sufficiency: "PP is sufficient for QQ."
    • Necessity: "QQ is necessary for PP."
    • Requirement: "PP only if QQ."
    ---

    Classifying Compound Propositions

    • Tautology: A proposition that is always True regardless of the truth values of its components.
    • Contradiction: A proposition that is always False.
    • Contingency: A proposition that is neither a tautology nor a contradiction.

    Logic Refinement & Problem Solving

    1. Complexity in Translation

    In Data Science, "If-Then" logic is rarely straightforward. Mastery involves distinguishing between the direction of the implication.

    Necessary vs. Sufficient Conditions

    > Definition: PP is sufficient for QQ means if PP is true, QQ must follow (Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q). > Definition: PP is necessary for QQ means QQ cannot be true without PP being true (Qβ€…β€ŠβŸΉβ€…β€ŠPQ \implies P). Example (SUB): Translate: "To get an A in the class, it is necessary for you to get an A on the final." Solution: Let CC: "Get an A in class" and FF: "Get an A on final". The requirement is that FF must happen for CC to happen. Therefore, Cβ€…β€ŠβŸΉβ€…β€ŠFC \implies F. ---

    2. Advanced Deductive Reasoning: Knights and Knaves

    These puzzles are used to test structural consistency in logic.
    • Knights: Statements are always True (S≑TS \equiv \text{T}).
    • Knaves: Statements are always False (S≑FS \equiv \text{F}).

    Strategy for Resolution

  • Assign Hypotheses: Assume a character's type (e.g., Alice is a Knight).
  • Evaluate Statements: If Alice is a Knight, her statement must be True.
  • Trace Contradictions: If the resulting logic leads to a character being both a Knight and a Knave, the initial hypothesis is False.
  • ---

    3. Advanced Problem Set

    :::question type="MSQ" question="Which of the following propositions are logically equivalent to the implication Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q?" options=["Β¬P∨Q\neg P \lor Q","Β¬Qβ€…β€ŠβŸΉβ€…β€ŠΒ¬P\neg Q \implies \neg P","Β¬(P∧¬Q)\neg(P \land \neg Q)","Q∨¬PQ \lor \neg P","(P∧Q)β€…β€ŠβŸΊβ€…β€ŠP(P \land Q) \iff P"] answer="A,B,C,E" hint="Check truth tables or use the definition of implication and contrapositive." solution="
    • A: Standard definition (Β¬P∨Q\neg P \lor Q).
    • B: The contrapositive (Β¬Qβ€…β€ŠβŸΉβ€…β€ŠΒ¬P\neg Q \implies \neg P).
    • C: Negation of the failure case (Β¬(P∧¬Q)\neg(P \land \neg Q)).
    • E: If Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q, then P∧QP \land Q is True if and only if PP is True.
    Option D is just a reordering of A, but valid. Wait, Q∨¬PQ \lor \neg P is identical to Β¬P∨Q\neg P \lor Q. So D is also correct. Correct: A,B,C,D,E\boxed{A,B,C,D,E}." ::: :::question type="MSQ" question="Identify all statements that constitute a tautology." options=["(Pβ€…β€ŠβŸΉβ€…β€ŠQ)∨(Qβ€…β€ŠβŸΉβ€…β€ŠP)(P \implies Q) \lor (Q \implies P)","(P∧(Pβ€…β€ŠβŸΉβ€…β€ŠQ))β€…β€ŠβŸΉβ€…β€ŠQ(P \land (P \implies Q)) \implies Q","Β¬(P∨Q)β€…β€ŠβŸΊβ€…β€Š(Β¬P∧¬Q)\neg(P \lor Q) \iff (\neg P \land \neg Q)","(PβŠ•Q)βŠ•Qβ€…β€ŠβŸΊβ€…β€ŠP(P \oplus Q) \oplus Q \iff P"] answer="A,B,C,D" hint="A tautology is true for all possible truth assignments." solution="
    • A: At least one implication must be true in any pair (Property of Linear Order).
    • B: Modus Ponens structure. Always true.
    • C: De Morgan's Law expressed as a biconditional.
    • D: XOR is associative; PβŠ•(QβŠ•Q)≑PβŠ•F≑PP \oplus (Q \oplus Q) \equiv P \oplus \text{F} \equiv P."
    ::: :::question type="SUB" question="On the Island of Knights and Knaves, Alice says: 'Bob is a Knave.' Bob says: 'We are both Knights.' Using a formal case-by-case analysis, determine the types of Alice and Bob." answer="Alice is a Knight; Bob is a Knave." hint="Start by assuming Alice is a Knight. If that leads to a contradiction, she must be a Knave." solution=" Case 1: Assume Alice is a Knight (A=TA = \text{T})
  • Alice's statement must be True β€…β€ŠβŸΉβ€…β€Š\implies Bob is a Knave (B=FB = \text{F}).
  • If Bob is a Knave, his statement 'Alice and Bob are both Knights' must be False.
  • Check: Is 'Alice (T) and Bob (F) are both Knights' False? Yes.
  • Consistency: This case works.
  • Case 2: Assume Alice is a Knave (A=FA = \text{F})
  • Alice's statement must be False β€…β€ŠβŸΉβ€…β€Š\implies Bob is NOT a Knave (so Bob is a Knight, B=TB = \text{T}).
  • If Bob is a Knight, his statement 'Alice and Bob are both Knights' must be True.
  • Check: Is 'Alice (F) and Bob (T) are both Knights' True? No, it is False.
  • Contradiction: Bob cannot be a Knight while making a False statement.
  • Conclusion: Alice is a Knight\boxed{\text{Knight}} and Bob is a Knave\boxed{\text{Knave}}." :::

    Boolean Logic

    Overview

    Boolean Logic is the formal language of computational reasoning. In Data Science, it governs everything from query optimization and conditional data filtering to the branching logic of complex machine learning algorithms. This chapter moves beyond simple "True/False" to the structural evaluation of complex logical systems. ---

    Learning Objectives

    ❗ By the End of This Chapter

    After studying this chapter, you will be able to:

    • Define and manipulate propositions with absolute precision.

    • Apply logical operators (∧,∨,Β¬,β€…β€ŠβŸΉβ€…β€Š,β€…β€ŠβŸΊβ€…β€Š,βŠ•\land, \lor, \neg, \implies, \iff, \oplus) to model real-world constraints.

    • Construct truth tables to verify the validity of complex arguments.

    • Resolve deductive puzzles (Knights and Knaves) through systematic case analysis.

    ---

    Part 1: Foundations of Logic

    Propositions and Connectives

    A proposition is a declarative statement that holds exactly one truth value: True (T) or False (F). Compound propositions are built using connectives, which are defined by their operational behavior.
    πŸ“ Master Truth Table

    <br>\begin{array}{|c|c||c|c|c|c|c|} <br>\hline <br>P & Q & P \land Q & P \lor Q & P \oplus Q & P \implies Q & P \iff Q \\ <br>\hline <br>\text{T} & \text{T} & \text{T} & \text{T} & \text{F} & \text{T} & \text{T} \\ <br>\text{T} & \text{F} & \text{F} & \text{T} & \text{T} & \text{F} & \text{F} \\ <br>\text{F} & \text{T} & \text{F} & \text{T} & \text{T} & \text{T} & \text{F} \\ <br>\text{F} & \text{F} & \text{F} & \text{F} & \text{F} & \text{T} & \text{T} \\ <br>\hline <br>\end{array} <br>

    The Nuance of Implication (Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q)

    In formal logic, "If PP, then QQ" is often the most conceptually difficult.
    • PP is Sufficient for QQ: Knowing PP is true is enough to conclude QQ (Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q).
    • PP is Necessary for QQ: QQ cannot be true unless PP is also true (Qβ€…β€ŠβŸΉβ€…β€ŠPQ \implies P).
    ---

    Part 2: Structural Evaluation

    Tautologies and Contradictions

    • Tautology: A statement that is True under every possible assignment (e.g., P∨¬PP \lor \neg P).
    • Contradiction: A statement that is False under every possible assignment (e.g., P∧¬PP \land \neg P).
    • Contingency: A statement that depends on the truth values of its components.

    Knights and Knaves Strategy

    To solve logical deduction puzzles:
  • Hypothesize: Assume a character's type (e.g., "Alice is a Knight").
  • Derive: Determine the truth values of all statements based on that assumption.
  • Validate: If a character's statement contradicts their assumed type (e.g., a Knight's statement is False), discard the hypothesis.
  • ---

    Practice Questions (Concept Focus)

    :::question type="MSQ" question="Which of the following compound propositions are Tautologies?" options=["(P∧(Pβ€…β€ŠβŸΉβ€…β€ŠQ))β€…β€ŠβŸΉβ€…β€ŠQ(P \land (P \implies Q)) \implies Q","(Pβ€…β€ŠβŸΉβ€…β€ŠQ)∨(Qβ€…β€ŠβŸΉβ€…β€ŠP)(P \implies Q) \lor (Q \implies P)","Β¬(Pβ€…β€ŠβŸΊβ€…β€ŠQ)β€…β€ŠβŸΊβ€…β€Š(PβŠ•Q)\neg(P \iff Q) \iff (P \oplus Q)","(Pβ€…β€ŠβŸΉβ€…β€ŠQ)β€…β€ŠβŸΊβ€…β€Š(Β¬Qβ€…β€ŠβŸΉβ€…β€ŠΒ¬P)(P \implies Q) \iff (\neg Q \implies \neg P)"] answer="A,B,C,D" hint="Apply truth table testing or recognize standard logical laws like Modus Ponens and Contraposition." solution="
    • A: This is Modus Ponens. If PP and 'If PP then QQ' are true, QQ must be true.
    • B: In any pair of propositions, at least one implication (Pβ€…β€ŠβŸΉβ€…β€ŠQP \implies Q or Qβ€…β€ŠβŸΉβ€…β€ŠPQ \implies P) must be true.
    • C: The negation of 'if and only if' is exactly the same as 'exclusive or'.
    • D: This states that an implication is equivalent to its contrapositive, a fundamental law of logic.
    All options are A,B,C,D\boxed{A,B,C,D}." ::: :::question type="SUB" question="On an island of Knights (truth-tellers) and Knaves (liars), you meet Alice and Bob. Alice says: 'At least one of us is a Knave.' Bob says nothing. Determine the types of Alice and Bob using formal logic." answer="Alice is a Knight; Bob is a Knave." hint="What happens if Alice is a Knave? If she is, is her statement true or false?" solution=" Assume Alice is a Knave.
    • If Alice is a Knave, her statement ('At least one of us is a Knave') would be False.
    • However, if the statement is False, it means Neither of them is a Knave (i.e., both are Knights).
    • This creates a contradiction: Alice cannot be a Knave and a Knight simultaneously.
    Therefore, Alice must be a Knight.
    • If Alice is a Knight, her statement must be True.
    • For 'At least one of us is a Knave' to be True while Alice is a Knight, it follows that Bob must be a Knave.
    Consistency Check: Alice (Knight) says a True statement; Bob is the Knave that makes her statement true. Alice:Β Knight,Β Bob:Β Knave\boxed{\text{Alice: Knight, Bob: Knave}}." ::: :::question type="SUB" question="Prove using logical identities that Β¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)≑P∧¬Q\neg(P \implies Q) \equiv P \land \neg Q." answer="Proof through identity substitution." hint="Start with the definition of implication: Pβ€…β€ŠβŸΉβ€…β€ŠQ≑¬P∨QP \implies Q \equiv \neg P \lor Q." solution="
  • Start with the left side: Β¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)\neg(P \implies Q)
  • Substitute the definition of implication: Β¬(Β¬P∨Q)\neg(\neg P \lor Q)
  • Apply De Morgan's Law: Β¬(Β¬P)∧¬Q\neg(\neg P) \land \neg Q
  • Apply Double Negation Law: P∧¬QP \land \neg Q
  • Thus, Β¬(Pβ€…β€ŠβŸΉβ€…β€ŠQ)≑P∧¬Q\neg(P \implies Q) \equiv P \land \neg Q." :::

    ---

    Final Synthesis: Logic in Data Computation



    In the transition from discrete logic to applied data science, the structural integrity of Boolean expressions determines the efficiency and accuracy of data pipelines.

    1. Short-Circuit Evaluation


    In programming (Python, SQL), logical operators often exhibit "short-circuit" behavior:
    • For P∧QP \land Q: If PP is False, QQ is never evaluated (the expression is already False).

    • For P∨QP \lor Q: If PP is True, QQ is never evaluated (the expression is already True).

    This is a direct application of the identity F∧Q≑F\text{F} \land Q \equiv \text{F} and T∨Q≑T\text{T} \lor Q \equiv \text{T}.

    2. Connection to Set Theory


    The operations of Boolean Logic map directly onto Set Theory, which is the basis for database Joins and Filters:
    • Conjunction (∧\land) β†’\to Intersection (∩\cap)

    • Disjunction (∨\lor) β†’\to Union (βˆͺ\cup)

    • Negation (Β¬\neg) β†’\to Complement (AcA^c)




    [Image of Venn diagram showing intersection, union, and complement]


    3. Proof by Contradiction (Concept)


    A powerful SUB-type reasoning tool is the Proof by Contradiction:
    To prove PP is true, assume ¬P\neg P is true and show it leads to a Contradiction (S∧¬SS \land \neg S). Since logic systems must be consistent, the initial assumption ¬P\neg P must be False, making PP True.

    🎯 Key Points to Remember

    • βœ“ Master the core concepts in Boolean Logic before moving to advanced topics
    • βœ“ Practice with previous year questions to understand exam patterns
    • βœ“ Review short notes regularly for quick revision before exams

    Related Topics in Discrete Mathematics

    More Resources

    Why Choose MastersUp?

    🎯

    AI-Powered Plans

    Personalized study schedules based on your exam date and learning pace

    πŸ“š

    15,000+ Questions

    Verified questions with detailed solutions from past papers

    πŸ“Š

    Smart Analytics

    Track your progress with subject-wise performance insights

    πŸ”–

    Bookmark & Revise

    Save important questions for quick revision before exams

    Start Your Free Preparation β†’

    No credit card required β€’ Free forever for basic features