0% found this document useful (0 votes)
4 views44 pages

AMC Topic 4 Boolean Algebra and Propositional Logic 2

This document covers Boolean Algebra and Propositional Logic, focusing on propositions, truth tables, tautologies, contradictions, and syllogisms. It includes quizzes to reinforce understanding of logical operators and concepts. Additionally, it discusses the limitations of propositional logic in representing complex relationships and reasoning.

Uploaded by

mule
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views44 pages

AMC Topic 4 Boolean Algebra and Propositional Logic 2

This document covers Boolean Algebra and Propositional Logic, focusing on propositions, truth tables, tautologies, contradictions, and syllogisms. It includes quizzes to reinforce understanding of logical operators and concepts. Additionally, it discusses the limitations of propositional logic in representing complex relationships and reasoning.

Uploaded by

mule
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Algorithms and Mathematical

Concepts in Computing
Topic 4:
Boolean Algebra and Propositional Logic 2

© NCC Education Limited


Boolean Algebra and Propositional Logic 2 Topic 4 - 4.2

Unit Syllabus

1. Computational Thinking
2. Number Systems
3. Boolean Algebra and Propositional Logic 1
4. Boolean Algebra and Propositional Logic 2
5. Predicate Logic and Set Theory
6. Statistics
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.3

Unit Syllabus – continued ….

7. Introduction to Data Structure 1


8. Introduction to Data Structure 2
9. Searching and Sorting 1
10.Searching and Sorting 2
11.Tree Data Structure and Searching Algorithms
12.Unit Summary
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.4

Recap
What we covered in the Last Topic:
• Logic and Boolean algebra, use in computer science and
AI.
• Statements
• Truth Tables
• Boolean expressions, Logic
• Boolean operators, their precedence: conjunction,
disjunction, negation, conditional, and biconditional
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.5

Quiz 1

What are the two possible truth values in propositional


logic?
a) Positive and Negative
b) True and False
c) Yes and No
d) On and Off
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.6

Quiz 2

Which logical operator represents "not" in Boolean algebra?


a) AND
b) OR
c) NOT
d) XOR
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.7

Quiz 3

What is the symbol for the logical operator "AND" in


Boolean algebra?
a) ∧
b) ∨
c) ¬
d) →
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.8

Quiz 4

What does the conditional operator represent in Boolean


algebra?
a) OR
b) NOT
c) IMPLIES
d) XOR
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.9

Quiz 5

Which Boolean operator returns true if both operands are


true, otherwise false?
a) AND
b) OR
c) NOT
d) XOR
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.10

Quiz 6

What is the result of the expression


¬(A∧B) when A=True and B=False?
a) True
b) False
c) Undefined
d) Error
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.11

Quiz 7

Which Boolean algebra law states that


A∧B=B∧A?
a) Associative Law
b) Commutative Law
c) Distributive Law
d) Absorption Law
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.12

Quiz 8

What is the simplified form of the Boolean expression


(A∨B)∧(¬A∨B)?
a) A∧B
b) A∨B
c)B∧(¬A∨B)
d)B
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.13

Quiz 9

What is the symbol used for the logical operator "OR" in


Boolean algebra?
a) ∧
b) ∨
c) ¬
d) →
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.14

Quiz 10

Which Boolean algebra law states that

A∨(A∧B)=A?
a) Identity Law
b) Absorption Law
c) Distributive Law
d) Associative Law
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.15

Topic 4 – Lecture 1
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.16

Scope and Coverage


This topic will cover:
• Propositions and Truth Tables
• Tautology, Contradiction, Principle of
substitution
• Syllogism, logical equivalence
• Limitations of propositional logic
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.17

Learning Outcomes
By the end of this topic students will be able to:
• Understand the concept of propositions and their
role in logical reasoning.
• Define tautology and contradiction as special types
of logical expressions.
• Learn about syllogistic reasoning and its use in
formal logic.
• Recognise the limitations of propositional logic in
representing complex relationships and reasoning.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.18

Propositions and Truth Tables


Boolean Algebra and Propositional Logic 2 Topic 4 - 4.19

Propositions and Truth Tables

Propositions and truth tables are concepts used in logic


to analyse and represent the truth values of logical
statements.
Let's break down these concepts:

Propositions:
A proposition is a statement that is either true (1) or
false (0) but not both. It is a declarative sentence that
can be assigned a truth value.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.20

Propositions and Truth Tables Cont…

For example:
• "The sky is blue." (can be either true or false)
• "2 + 2 = 5." (false)
• "It is raining outside." (true or false)
In logic, propositions are typically represented by
letters such as p, q, or r.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.21

Truth Tables

A truth table is a systematic way of representing all


possible truth values of a logical expression. It shows
the relationship between the truth values of the input
propositions and the resulting truth value of the
compound proposition.

Let's take a simple example using two propositions p


and q. We can represent the truth values of p, q, and
different logical operations using a truth table:
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.22

Truth Tables
P Q ¬p p∧q p∨q p⇒q

T T F T T T
T F F F T F
F T T F T T
F F T F F T

In this truth table:


• p and q represent the truth values of propositions.
• ¬p represents the negation (NOT) of p.
• ∧p∧q represents the conjunction (AND) of p and q.
• ∨p∨q represents the disjunction (OR) of p and q.
• ⇒p⇒q represents the implication (IF...THEN) from p to q.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.23

Truth Tables
Each row in the truth table corresponds to a specific combination of
truth values for p and q, and the columns show the resulting truth
values for the different logical operations.

Truth tables are valuable tools in logic for analysing the validity of
logical arguments and for constructing and evaluating complex logical
expressions. They help to systematically explore all possible
combinations of truth values for propositions and their
combinations.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.24

Tautology, Contradiction, Principle


of substitution
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.25

Tautology

• A tautology is a logical statement that is always true, regardless of


the truth values of its individual propositions.
• In other words, a tautology is a statement that is true under every
possible interpretation.
• Tautologies are often denoted by the symbol ⊤ ⊤ (top).
• Examples of tautologies include:
• p∨¬p (the logical OR of a proposition and its negation)
• p⇒p (the logical implication of a proposition to itself)
• (p∧q)∨(¬p∧q) (a more complex tautology)
• In a truth table, the column for a tautology will have all "T" (true)
values.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.26

Example of Tautology

Example: p∨¬p
In this example:
• p is a proposition.
• ¬p is the negation (NOT) of p.
• ∨ represents the logical OR.

The statement p∨¬p essentially says "either p is true or its negation


¬p is true." In other words, it covers all possible cases either p is
true, or if not, its negation ¬p is true.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.27

Example of Tautology
p​ p∨¬p
¬p
T T
F
F T
T
In the truth table:
When p is true (T), ¬p is false (F), and p∨¬p is true (T).
When p is false (F), ¬p is true (T), and p∨¬p is true (T).

In both cases, p∨¬p evaluates to true. Therefore, p∨¬p is a


tautology. This means that regardless of the truth value of p, the
entire statement is always true, making it a fundamental tautological
expression.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.28

Contradiction
• A contradiction is a logical statement that is always false, regardless of
the truth values of its individual propositions.
• In other words, a contradiction is a statement that cannot be true
under any interpretation.
• Contradictions are often denoted by the symbol ⊥.
Example: p∧¬p
• In this example:
• p is a proposition.
• ¬p is the negation (NOT) of p.
• ∧ represents the logical AND.

• The statement p∧¬p essentially says "both p is true and its negation ¬p
is true at the same time." This is inherently contradictory because a
proposition cannot be both true and false simultaneously.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.29

Contradiction
Let’s Build a truth table for p∧¬p:
p​ p∧¬p
¬p
T F
F
F F
T
In the truth table:

• When p is true (T), ¬p is false (F), and p∧¬p is false (F).


• When p is false (F), ¬p is true (T), and p∧¬p is false (F).

In both cases, p∧¬p evaluates to false. Therefore, p∧¬p is a contradiction.


This means that regardless of the truth value of p, the entire statement is always
false, making it a fundamental contradictory expression.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.30

Principle of substitution
• The Principle of Substitution is a fundamental concept in logic that
states that if two logical expressions are logically equivalent, one
can be substituted for the other without changing the truth value
of the entire expression.
• This principle is crucial for simplifying logical expressions, proving
the equivalence of statements, and understanding the relationships
between different propositions in logic.
• In other words, if p≡q (where ≡ denotes logical equivalence), then
p and q can be used interchangeably in any logical expression
without affecting the overall truth value of that expression.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.31

Principle of substitution
Example:
Let's consider an example to illustrate the Principle of Substitution:
Suppose we have the logical equivalence p∨¬p≡ True. This means
that the logical OR of a proposition p and its negation ¬p is always
true, making it a tautology.

Now, we can apply the Principle of Substitution to replace p∨¬p


with True in any logical expression.
For instance:
• q∧(p∨¬p) can be substituted with q∧True.
• p⇒(p∨¬p) can be substituted with p⇒True.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.32

Topic 4 – Lecture 2

Syllogism, logical equivalence


Boolean Algebra and Propositional Logic 2 Topic 4 - 4.33

Syllogism
• A syllogism is a form of deductive reasoning consisting of two
premises and a conclusion.
• It typically involves three categorical propositions or statements,
where the conclusion is derived from the combination of the two
premises.
• The structure of a syllogism follows a specific pattern:
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.34

Components And Function Of A Syllogism

• Major Premise: This is a general statement or


proposition about a broad category.
• Minor Premise: This is a specific statement or
proposition about a particular case within the category
mentioned in the major premise.
• Conclusion: This is the logical inference drawn from
the combination of the major and minor premises.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.35

Syllogism with Example


The classic example of a syllogism is the following:

Major Premise: All men are mortal.


Minor Premise: Socrates is a man.
Conclusion: Therefore, Socrates is mortal.
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.36

Logical Equivalence
• Logical equivalence is the condition of equality that exists between
two statements or sentences in propositional logic or
Boolean algebra.
• The relationship between the two statements translates verbally
into "if and only if.“
• In mathematics, logical equivalence is typically symbolized by a
double arrow (⟺or ⟷) or triple lines (≡).
• The double arrow is sometimes referred to as an IIF function.
• This expression provides an example of logical equivalence
between two simple statements:
A ∨ B ⟺B ∨ A
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.37

Logical Equivalence
• The expression includes the statements A ∨ B and B ∨ A, which
are connected together by the IIF function.
• Each statement uses the OR Boolean function (∨) to indicate an
inclusive disjunction between variables A and B.
• This means that the statement returns a true value if either
variable is true or if both variables are true, but it returns a false
value if both variables are false.
• The expression in its entirety is effectively stating that the
statement "variable A or variable B" is logically equivalent to the
statement "variable B or variable A."
How is logical equivalence
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.38

determined?
• An expression's statements are considered logically equivalent if they return
identical truth values for every row in a truth table.
• The truth table shown in Figure 1 reveals the truth values for the statements in
the example expression given previously.

The table includes one column for each variable


(A and B) and one row for each possible combination
of true and false values for those variables. It also
includes a column for each statement's evaluation
based on the variable values. The statement columns
are highlighted in blue for easy comparison.
Figure 1. Truth table for expression A ∨ B to B ∨ A
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.39

Limitations of Propositional Logic


Boolean Algebra and Propositional Logic 2 Topic 4 - 4.40

Limitations of propositional logic

• Lack of Expressiveness
• Inability to Represent Quantifiers
• Limited to Boolean Values
• Difficulty in Handling Relationships
• No Representation of Time
• Combination Explosion
• No Negation of Quantifiers
• Limited for Natural Language Processing
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.41

Some other useful links


(documentation)
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.42

Documentation
Propositions and Truth Tables:
Tutorialspoint: https://www.tutorialspoint.com/discrete_mathematics/propositional_logic.htm

Tautology, Contradiction, Principle of Substitution:


Stanford Encyclopedia of Philosophy: https://plato.stanford.edu/entries/logical-constants/
Math is Fun: https://www.mathsisfun.com/definitions/tautology.html

Syllogism, Logical Equivalence:


Internet Encyclopedia of Philosophy: https://iep.utm.edu/syllogis/

Limitations of Propositional Logic:

ResearchGate:
https://www.researchgate.net/post/What_are_the_limitations_and_extensions_of_propositional_logic
Boolean Algebra and Propositional Logic 2 Topic 4 - 4.43

Summary
This topic covered:
• Propositions and Truth Tables
• Tautology, Contradiction, Principle of substitution
• Syllogism, logical equivalence
• Limitations of propositional logic
Topic 4: Boolean Algebra and
Propositional Logic 2

Any Questions?

You might also like