0% found this document useful (0 votes)
5 views

Propositional Logic 2

Uploaded by

Parampreet Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Propositional Logic 2

Uploaded by

Parampreet Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

SIT192: LR C.

1
Propositional Logic
1 Module Summary
1.1 Module learning objective
• Recognize and translate atomic and compound propositional.
• Construct truth tables.
• Apply the laws of Boolean algebra to show logical equivalence.

1.2 Summary of content


Sentence
• It is a sensible combination of words.

Proposition Or Statement
• A sentence conveying a situation which is neither imperative,
exclamatory, nor interrogative is a statement.
• A statement is a declaration sentence which is either true or false,but not
both.
• Denoted by p, q, r s.

Propositional logic
• A area of logic that deals with propositions that can eitherbe true or false.
Compound Statement
• When two or more logical statements are combined by logical connectorsthat
is And, Or, Not, If then, If and only, then that statement is called compound
statement.

Logical Operator
• Operations used to form new propositions from existing ones.The
main types include:
1. Conjunction(∧): “And”- true only if both propositions are true.
p q p∧q
T T T
T F F
F T F
F F F

2. Disjunction ( ∨ ): "Or" - true if at least one proposition is true.


p q p∨q
T T T
T F T
F T T
F F F
3. Negation ( ¬ ): "Not" - flips the truth value of a proposition.
p ~p
T F
F T
4. Exclusive Disjunction ( ⊕ ): "XOR" - true only if exactly one of the
propositions is true.
P q p⊕q
T T F
T F T
F T T
F F F

Conditional
If one proposition implies another one, the resulting compound proposition is called
a condition statement. It is denoted by ( →).
p q p→
q
T T T
T F F
F T T
F F T

Bi-Conditional:
The bi-conditional statement is when both propositions implies each other.
Denoted by (↔).
p q p↔q
T T T
T F F
F T F
F F T

Compound Propositional Logic


• A compound proposition is a tautology, if its truth values are always T.
• A compound proposition is a contradiction, if its truth values arealways .
• A compound proposition is a contingency, if its truth valuesare neither all T
nor all F.
Logical Equivalence
• The compound proposition p and q are called logical equivalence if p↔qis a
tautology.
• The notion p≡q denotes that p and q re logical equivalence.
Laws of Logics
1. Identity Law:
P∧T≡P & P∨F≡P
P T F P∧T P∨F
T T F T T
F T F F F

2. Idempotent law:
P∧P≡P /& P∨P≡P
P P P∧P P∨P
T T T T
F F F F

3. Double negation law:


~(~P)≡P
P ~P ~(~P)
T F T
F T F

4. Commutative Law:
P∧Q≡Q∧P & P∨Q≡Q∨P
P Q P∧Q Q∧P P∨Q Q∨P
T T T T T T
T F F F T T
F T F F T T
F F F F F F
5. Associative Law:
(P∧Q) ∧R≡P∧ (Q∧R) & (P∨Q)∨R≡P∨(Q∨R)
P Q R P∧Q Q∧R (P∧Q) ∧R P∧ (Q∧R)
T T T T T T T
T T F T F F F
T F T F F F F
T F F F F F F
F T T F T F F
F T F F F F F
F F T F F F F
F F F F F F F

P Q R PVQ QVR (PVQ)VR PV(QVR)


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

6. Distributive Law:
P∧ (Q∨R) ≡ (P∧Q) ∨ (P∧R) & P∨ (Q∧R) ≡ (P∨Q) ∧ (P∨R)

P Q R Q∨R P∧Q P∧R P∧ (QVR) (P∧Q) ∨ (P∧R)


T T T T T T T T
T T F T T F T T
T F T T F T T T
T F F F F F F F
F T T T F F F F
F T F T F F F F
F F T T F F F F
F F F F F F F F
P Q R Q∧R PVQ PVR PV (Q∧R) (PVQ) ∧ (PVR)
T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F T F F F
F F T F F T F F
F F F F F F F F

7. De-Morgan’s law:
¬(A∧B)≡¬A∨¬B & ¬(A∨B)≡¬A∧¬B
A B ~A ~B A∧B ¬(A∧B) ¬A∨¬B
T T F F T F F
T T F F T F F
T F F T F T T
T F F T F T T
F T T F F T T
F T T F F T T
F F T T F T T
F F T T F T T

A B ~A ~B A∨B ¬(A∨B) ¬A∧¬B


T T F F T F F
T T F F T F F
T F F T T F F
T F F T T F F
F T T F T F F
F T T F T F F
F F T T F T T
F F T T F T T
8. Dominated law:
P∨T≡T & P∧F≡F

P T F P∨T P∧F
T T F T F
F T F T F

9. Negation law:
P∨~P≡T / P∧~P≡F
P ~P P∨~P P∧~P T F
T F T F T F
F T T F T F

1.3 Reflection

1. What is the most important thing you learned in this module?


The most important thing I learned is logical operators and their importance
in constructing truth table. Also, I learnt about Law of Logics that helps to
make statements simpler and verify their equivalence.

2. How does this relate to what you already know?


The concepts like logical equivalence and truth tables are directly related to
proofs and problem-solving in math.

3. Why do you think your course team wants you to learn the
content of thismodule?
The course team likely wants you to learn the content of this propositional logic
module because:
• Such concepts will help me in enhancing problem solving skills.
• Logical reasoning forms the basis of algorithms and programming.
Evidence
10/3/24, 8:15 PM Propositional Logic

Propositional Logic
Click on a question number to see how your answers were marked and, where
available, full solutions.

Question Number Score


1 0 / 1
2 10 / 10
Total 10 / 11 (90%)

Performance Summary
Exam Name: Propositional Logic
Session ID: 13068148718
Exam Start: Thu Oct 03 2024 20:03:31
Exam Stop: Thu Oct 03 2024 20:15:25
Time Spent: 0:11:54

Question 1
Truth Table

Instructions
Please enter a truth table for the expression q ∧ (p ∨ (p ∧ q)).

Filling the table


In the top row, enter boolean expressions. You can copy/paste from the
following expression: q ∧ (p ∨ (p ∧ q)) or from the table below.
In the remaining rows, enter boolean values (true or false). Please enter them
as 1 (for true) and 0 (for false), for the system to check it.

file:///C:/Users/HP/Downloads/Propositions/Propositions/index.html 1/6
10/3/24, 8:15 PM Propositional Logic

Entering expressions
You can enter expressions either by copy-pasting the expression below (or is
sub-expressions), or typing the expression with English words - for example: "p
or (q and not p)". The system will recognise and display the expression. If it does
not display, then the system is unable to parse your input (make sure you check
the brackets).

You can copy the sub-expressions from here: q ∧ (p ∨ (p ∧ q))


Rows: 5 Columns: 5

p q p∧q p ∨ (p ∧ q) q ∧ (p ∨ (p ∧ q))
T T T T T

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

This feedback is based on your last submitted answer. Submit your


changed answer to get updated feedback.

 One or more of the cells in your answer is empty or invalid.

Score: 0/1 

Advice
Question 2
Show that ¬(q ∨ ((q ∨ p) ∧ (p ∨ p))) ≡ ¬(p ∨ q).

Instructions to fill the gaps


Apply one and only one law per step.
Start from the left hand side, in the first gap, and finish with the right hand side. You
can add additional steps, and any blank step at the end will signal the end of your
work (so don't skip a line).
The system will automatically interpret your entry and display a formula. If no
formula appears, it means that the system cannot parse your entry. Check the syntax.
Note that the displayed formula does not show all brackets, because it applies
file:///C:/Users/HP/Downloads/Propositions/Propositions/index.html 2/6
10/3/24, 8:15 PM Propositional Logic

bodmas, which can be confusing at first. Unfortunately this is hardcoded and cannot
be changed.
You can enter formulas using either the operations ¬,∧,∨, or English words not,
and, or. So, the input "p and (q or not p)" is the same as "p ∧ (q ∨ ¬ p)".
At the bottom of this question you will find a table with the list of operations, and the
keywords to use.

Entering your solution


Please note that the system should accept any correct answers, but it is very strict
about it: you can only apply one law per step, not more (note that this also includes
the fact that you cannot apply the same law twice in one go - it has to be done in two
steps: it is one law per step, not one type of law per step). The checker should tell you
when it thinks that you entered more than one law.
It is not possible to reveal the solution: checking the solution automatically is easier
than computing the solution.

You may copy-paste the expression in the first box: ¬(q ∨ ((q ∨ p) ∧ (p ∨ p)))

Select the number of steps you need: 5

LHS ¬(q∨((q∨p)∧(p∨p)))
≡ ¬ (q ∨ (q ∨ p) ∧ (p ∨ p))
¬(q∨((q∨p)∧p)) Idempotent Law

¬ (q ∨ (q ∨ p) ∧ p) 
¬(q∨((p∨q)∧p)) Commutative Law

¬ (q ∨ (p ∨ q) ∧ p) 
Absorption Law
≡ ¬(q∨p) ¬ (q ∨ p) 
Commutative Law
≡ ¬(p∨q) ¬ (p ∨ q)

You may enter the operations by copying from the following table. Either versions
are fine.

file:///C:/Users/HP/Downloads/Propositions/Propositions/index.html 3/6
10/3/24, 8:15 PM Propositional Logic

inclusive exclus
Operation/Value True False negation conjunction
disjunction disjunc
ascii version true false not and or
symbol version ¬ ∧ ∨

This feedback is based on your last submitted answer. Submit your


changed answer to get updated feedback.

The maximum you can score for this part is 10 marks. Your
scores will be scaled down accordingly.
LHS
 Your answer is numerically correct. You were awarded
1.1111111111 marks.
Step 1
This part was marked using your answers to previous parts.
 Your answer is numerically correct.
Law 1
This part was marked using your answers to previous parts.

Step 2
This part was marked using your answers to previous parts.
 Your answer is numerically correct.
Law 2

Step 3
This part was marked using your answers to previous parts.
 Your answer is numerically correct.
Law 3

Step 4
This part was marked using your answers to previous parts.
 Your answer is numerically correct.
file:///C:/Users/HP/Downloads/Propositions/Propositions/index.html 4/6
10/3/24, 8:15 PM Propositional Logic

Law 4

Step 5
This part was marked using your answers to previous parts.
 You did not enter an answer.
Law 5
Step 6
Law 6
Step 7
This part was marked using your answers to previous parts.
 You did not enter an answer.
Law 7
Step 8
Law 8
Step 9
This part was marked using your answers to previous parts.
 You did not enter an answer.
Law 9
Step 10
Law 10
Step 11
This part was marked using your answers to previous parts.
 You did not enter an answer.
Law 11
Step 12
Law 12
You scored 10 marks for this part.

Score: 10/10 

file:///C:/Users/HP/Downloads/Propositions/Propositions/index.html 5/6
10/3/24, 8:15 PM Propositional Logic

Advice

Created using Numbas (https://www.numbas.org.uk), developed by Newcastle University


(http://www.newcastle.ac.uk).

file:///C:/Users/HP/Downloads/Propositions/Propositions/index.html 6/6
REFERENCES:
1. D2L Modules
2. Quiz
3. Discrete Maths Oscar Levin

You might also like