Chapter 2 · Computational Thinking & Algorithms
2.11Logic-Based Reasoning and Inference
How logic turns known facts into new, guaranteed conclusions: logical inference and deduction.
Written and checked by Muhammad Raheel(opens in a new tab)
Full Stack Developer · AI Engineer · Reviewed 21 Oct 2026 · 3 min read
On this page
This is the last topic of the chapter, and it ties the logic together. You start with facts you already know. You apply the rules of logic, one step at a time. You end with a new fact you did not have before.
Why does this matter? Reasoning helps us solve problems, make decisions and check whether information is right. When we use logical inference, our conclusions can be trusted. Practising it also sharpens critical thinking, which we need for complex real-world problems.
Logical Inference
The facts we start from are called premises. The book's example is a famous one:
- Premise: "All humans are mortal."
- Premise: "Socrates is a human."
- Inference: "Socrates is mortal."
Neither premise says "Socrates is mortal" on its own. Together, they force it. This is the key promise of logical inference: if the premises are true, the conclusion is true.
The book says inference is used in mathematics, computer science and artificial intelligence. It helps us make decisions based on evidence, not on guesses.
Deduction Using Logical Rules
Deduction moves from the general to the specific. Its tools are logical rules, especially "if-then" statements. The book's example:
- Rule: "If it rains, the ground gets wet."
- Fact: "It is raining."
- Conclusion: "The ground is wet."
Deduction is reliable because the conclusion is guaranteed to be true whenever the premises are true. We can check this with a truth table from topic 2.5. Let P be "it rains" and Q be "the ground gets wet".
| P | Q | If P then Q | Both premises true? |
|---|---|---|---|
| T | T | T | yes, and Q is T |
| T | F | F | no |
| F | T | T | no |
| F | F | T | no |
Only the first row has both premises true, and in that row Q is true. So the conclusion can never be false when the premises are true.
Computers use deduction to solve problems and answer questions. Every "if" in a program is an if-then rule waiting for a fact.
Practice this topic
Short questions
1.What is logic-based reasoning and inference?2 marks
Answer
From the book: "Logic-based reasoning and inference are ways of thinking that help us draw conclusions from known facts. This method uses rules of logic to reach conclusions step by step."
2.Define logical inference and give the book's example.3 marks
Answer
From the book: "Logical inference is the process of deriving new facts from known information. It is a way of reasoning that follows logical rules. For example, if we know "All humans are mortal" and "Socrates is a human," we can infer that "Socrates is mortal.""
3.What is deduction? Give the book's example.3 marks
Answer
From the book: "Deduction is a type of reasoning that starts from general facts to reach a specific conclusion. Logical rules like "if-then" statements are used in deduction. For example, "If it rains, the ground gets wet" and "It is raining" lead to the conclusion "The ground is wet.""
4.Why is deduction reliable?2 marks
Answer
From the book: "Deduction is reliable because the conclusion is guaranteed to be true if the premises are true."
5.Where is logical inference used, and how does it help?2 marks
Answer
From the book: "It is used in mathematics, computer science, and artificial intelligence. Inference helps in making decisions based on evidence. It is a fundamental concept in logic and reasoning."
6.Why is logic-based reasoning important?3 marks
Answer
From the book: "Reasoning helps us solve problems, make decisions, and verify information. Logical inference ensures that conclusions are correct and reliable. Understanding this concept improves critical thinking skills. Logic-based reasoning is essential for solving complex real-world problems."
Long questions
1.Explain logical inference and deduction using logical rules. Give the book's example for each.8 marks
Answer
Cover both sub-headings, using the book's text:
- Logical Inference (verbatim): "Logical inference is the process of deriving new facts from known information. It is a way of reasoning that follows logical rules." Example: "if we know "All humans are mortal" and "Socrates is a human," we can infer that "Socrates is mortal."" "Logical inference ensures conclusions are true if the premises are true. It is used in mathematics, computer science, and artificial intelligence. Inference helps in making decisions based on evidence."
- Deduction Using Logical Rules (verbatim): "Deduction is a type of reasoning that starts from general facts to reach a specific conclusion. Logical rules like "if-then" statements are used in deduction." Example: ""If it rains, the ground gets wet" and "It is raining" lead to the conclusion "The ground is wet.""
- Why deduction is reliable: "Deduction is reliable because the conclusion is guaranteed to be true if the premises are true. Computers use deduction to solve problems and answer questions."
- The chapter Summary may be quoted for the definitions: "Logical inference is the process of drawing a correct conclusion from given facts or statements." "Deduction is a reasoning method in which a specific conclusion is derived from general rules or known facts."
Aim for 200-300 words.
2.What is logic-based reasoning and inference? Explain why it is important and where it is used.6 marks
Answer
Use the 2.11 opening paragraph and the uses named in "Logical Inference" and "Deduction Using Logical Rules":
- Meaning (verbatim): "Logic-based reasoning and inference are ways of thinking that help us draw conclusions from known facts. This method uses rules of logic to reach conclusions step by step."
- Importance: "Reasoning helps us solve problems, make decisions, and verify information. Logical inference ensures that conclusions are correct and reliable. Understanding this concept improves critical thinking skills. Logic-based reasoning is essential for solving complex real-world problems."
- Where it is used: logical inference "is used in mathematics, computer science, and artificial intelligence"; "Inference helps in making decisions based on evidence"; "Computers use deduction to solve problems and answer questions. Deduction helps in formal reasoning and problem-solving tasks."
- One example from the book to support the answer (Socrates, or the rain example).
Aim for 150-250 words.
In this chapter
- 2.1Introduction to Computational Thinking
- 2.2Problem Solving Using Computational Thinking
- 2.3Logic as a Knowledge Representation Framework
- 2.4Propositional Logic
- 2.5Truth Tables
- 2.6Propositional Equivalence
- 2.7Propositional Satisfiability
- 2.8Predicate Logic
- 2.9Quantifiers in Predicate Logic
- 2.10Applying Predicate Logic to Real-World Problems
- 2.11Logic-Based Reasoning and InferenceYou are here