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

Lecture 1 - Propositional Logic

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

Lecture 1 - Propositional Logic

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

CSC510

DISCRETE STRUCTURES

PROPOSITIONAL LOGIC
Lecture 1: Introduction to Propositional Logic
Logic

Logic defines as a formal language for logical reasoning


• A tool that helps us to understand how to construct a valid argument
Propositions
 A proposition is a declarative sentence that is either true or false.
 Examples of propositions:
 The Moon is made of green cheese.
 Trenton is the capital of New Jersey.
 Toronto is the capital of Canada.
 1+0=1
 0+0=2
 Examples that are not propositions.
 Sit down!
 What time is it?
 x+1=2
 x+y=z
Propositional logic

Let see other examples :

1. How are you? (Yes /No) A question is not a proposition

2. x+5=3 (Yes /No) since x is not specified, neither T nor F

3. 2 is a prime number (Yes /No) Can determine true nor false

4. She is very talented (Yes /No) since she is not specified, neither T nor F

5. There are other life forms on other planets in the universe.


(Yes /No) Can determine true nor false
Composite statements

More complex propositional statements can be build from the elementary statements using
logical connectives.

• Logical connectives:
1. Negation
2. Conjunction
3. Disjunction
4. Exclusive or
5. Implication
6. Biconditional
Negation

The negation of a proposition p is denoted by ¬p and has this truth table:

p ¬p

T F

F T

Example:

Let p denotes “The earth is round”, then ¬p denotes “It is not the case that the earth is
round,” or more simply “The earth is not round.”
Negation (cont.)

Negate the following propositions:


It is raining today.
• It is not raining today.

2 is a prime number.
• 2 is not a prime number

There are other life forms on other planets in the universe.


• It is not the case that there are other life forms on other planets in the universe.
Conjunction

Definition: Let p and q be propositions. The proposition "p and q" denoted by p ∧ q, is true
when both p and q are true and is false otherwise. The proposition p ∧ q is called the
conjunction of p and q.

• Examples:
🠶 Shah Alam is located in Selangor and 5 + 2 = 8
🠶 It is raining today and 2 is a prime number.
🠶 2 is a prime number and 5 + 2 ≠ 8.
🠶 13 is a perfect square and 9 is a prime.
Disjunction

Definition: Let p and q be propositions. The proposition "p or q" denoted by p ∨ q, is false
when both p and q are false and is true otherwise. The proposition p ∨ q is called the
disjunction of p and q.

• Examples:
🠶 Shah Alam is located in Selangor or 5 + 2 = 8.
🠶 It is raining today or 2 is a prime number.
🠶 2 is a prime number or 5 + 2 ≠ 8.
🠶 13 is a perfect square or 9 is a prime.
Truth tables

• Conjunction and disjunction


🠶 Four different combinations of values for p and q
🠶 p ∨ q (the or is used inclusively, i.e., p ∨ q is true when either p or q or both are true).

p q p^q p∨ q
1 1 1 1
1 0 0 1
0 1 0 1
0 0 0 0

1 – TRUE
0 - FALSE
Exclusive or

Definition: Let p and q be propositions. The proposition "p exclusive or q" denoted by p ⊕ q,
is true when exactly one of p and q is true and is false otherwise.

p q p⊕ q
1 1 0
1 0 1
0 1 1
0 0 0
Implication

Definition: Let p and q be propositions. The proposition "p implies q" denoted by p → q is
called implication. It is false when p is true and q is false and is true otherwise.

In p → q, p is called the hypothesis and q is called the conclusion.

p q p → q
1 1 1
1 0 0
0 1 1
0 0 1
Understanding Implication

🠶 In p →q there does not need to be any connection between the antecedent or the
consequent. The “meaning” of p →q depends only on the truth values of p and q.
🠶 These implications are perfectly fine, but would not be used in ordinary English.
🠶 “If the moon is made of green cheese, then I have more money than Bill Gates. ”
🠶 “If the moon is made of green cheese, then I’m on welfare.”
🠶 “If 1 + 1 = 3, then your grandma wears combat boots.”
Implication (cont.)

🠶 • p → q is read in a variety of equivalent ways:


🠶 • if p then q
🠶 • p only if q
🠶 • p is sufficient for q
🠶 • q whenever p

• Examples:
🠶 – if the moon is made of green cheese then 2 is a prime.
🠶 •T
🠶 – if today is friday then 2 * 3 = 8.
🠶 •F
Implication (cont.)

🠶 The converse of p → q is q → p
🠶 The contrapositive of p → q is ¬q → ¬p
🠶 The inverse of p → q is ¬p → ¬q

Examples:

If it snows, the traffic moves slowly.

Let p: it snows q: traffic moves slowly p→q

🠶 The converse (q → p): If the traffic moves slowly, then it snows.


Implication (cont.)

Examples:

If it snows, the traffic moves slowly.

🠶 The contrapositive (¬q → ¬p) : If the traffic does not move slowly, then it does not
snow

🠶 The inverse (¬p → ¬q): If it does not snow, then traffic does not move slowly.
Biconditional

•Definition: Let p and q be propositions. The biconditional


🠶 p ↔ q (read p if and only if q), is true when p and q have the same truth values and is false
otherwise.

p q p ↔ q
1 1 1
1 0 0
0 1 0
0 0 1

Note: two truth values always agree.


Exercise

Which of these sentences are propositions? What are the truth values of those that are
propositions?

a) Kuala Lumpur is the capital of Massachusetts.

b) Itaewon is a city in North Korea.

c) 2 + 3 = 5.

d) 5 + 7 = 10.

e) x + 2 = 11.

f ) Answer this question


p : I bought a new shirt today.
q : I won the million-dollar jackpot.

Express each of these propositions as an English sentence.

a) ¬ p

b) p ∨ q

c) p → q

d) p ∧ q

e) p ↔ q
p : I love pink
q : I love black

Express each of these propositions as an English sentence.

a) ¬ p

b) (p → q)

You might also like