1.1 Propositional Logic - Lecture Slides | CS 2233, Study notes of Discrete Mathematics

Material Type: Notes; Class: Discrete Math Structures; Subject: Computer Science; University: University of Texas - San Antonio; Term: Fall 2008;

Typology: Study notes

Pre 2010

Uploaded on 07/30/2009

koofers-user-vaw
koofers-user-vaw 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
8/27/08 CS 2233 Discrete Mathematical Structures -- Carola Wenk 1
CS 2233 -- Fall 2008
Discrete Mathematical Structures
1.1 Propositional Logic
Carola Wenk
8/27/08 CS 2233 Discrete Mathematical Structures -- Carola Wenk 2
Propositions
Definition. A proposition is a sentence that is either
true (T) or false (F), but not both.
Examples: Which of the following are propositions?
The Alamo is located in San Antonio.
4+2 = 42
UTSA is the best school in the world.
2*3 = 6
2*x= 6
It is warm in San Antonio
8/27/08 CS 2233 Discrete Mathematical Structures -- Carola Wenk 3
Negation ¬
Definition. Let pbe a proposition. The
negation (“not”) of p, denoted by ¬p, has the
opposite truth value than the truth value of p.
Read ¬pas: “not p or “It is not the case that
p”.
Truth Table:
p¬p
TF
FT
Examples: Negate the following:
“The Alamo is located in San Antonio.”
»“The Alamo is not located in San Antonio”
or “It is not the case that the Alamo is located in San Antonio”
Today is Monday
»“Today is not Monday” or “It is not the case that today is
Monday”
8/27/08 CS 2233 Discrete Mathematical Structures -- Carola Wenk 4
Conjunction
Definition. Let pand qbe propositions. The
conjunction (“and”) of p and q, denoted by
p q, is true when both pand qare true and
is false otherwise.
Read p q as: “p and q”.
Truth Table:
p q p q
TT T
TF F
FT F
FF F
Examples: Find the conjunction of pand q:
p: “It is sunny today.” q: “Today is Monday.”
»“It is sunny today and today is Monday.”
The conjunction is true on sunny Mondays (TT) but it is false
on any non-sunny day (FT or FF) and it is false on any other
day but Monday (TF or FF).
pf3

Partial preview of the text

Download 1.1 Propositional Logic - Lecture Slides | CS 2233 and more Study notes Discrete Mathematics in PDF only on Docsity!

8/27/^

CS 2233 Discrete Mathematical Structures -- Carola Wenk

1

CS 2233 -- Fall 2008

Discrete Mathematical Structures

1.1 Propositional Logic

Carola Wenk

8/27/^

CS 2233 Discrete Mathematical Structures -- Carola Wenk

Propositions

Definition.

A^ proposition

is a sentence that is either

true (

T) or false (

F), but not both.

Examples:

Which of the following are propositions?

  • The Alamo is located in San Antonio.• 4+2 = 42• UTSA is the best school in the world.• 23 = 6• 2

x^ = 6

  • It is warm in San Antonio

8/27/^

CS 2233 Discrete Mathematical Structures -- Carola Wenk

3

Negation

Definition.

Let^ p

be a proposition. The

negation

(“not”) of

p, denoted by ¬

p, has the

opposite truth value than the truth value of p.Read ¬

p^ as: “not

p” or “It is not the case that

p”.

Truth Table:^ p^

¬p T^

F

F^

T

Examples:

Negate the following:

  • “The Alamo is located in San Antonio.”» “The Alamo is not located in San Antonio”or “It is not the case that the Alamo is located in San Antonio”• Today is Monday» “Today is not Monday” or “It is not the case that today isMonday”

8/27/^

CS 2233 Discrete Mathematical Structures -- Carola Wenk

Conjunction

Definition.

Let^ p

and^

q^ be propositions. The

conjunction

(“and”) of

p^ and

q, denoted by

p^ q, is true when both

p^ and

q^ are true and

is false otherwise.Read

p^ q

as: “

p^ and

q”.

Truth Table:^ p^

q^ p

q T^ T

T

T^ F

F

F^ T

F

F^ F

F

Examples:

Find the conjunction of

p^ and

q:

-^ p: “It is sunny today.”

q: “Today is Monday.”

» “It is sunny today and today is Monday.”The conjunction is true on sunny Mondays (

TT) but it is false

on any non-sunny day (

FT^ or

FF) and it is false on any other

day but Monday (

TF^ or

FF).

8/27/^

CS 2233 Discrete Mathematical Structures -- Carola Wenk

5

Disjunction

Definition.

Let^ p

and^

q^ be propositions. The

disjunction

(“inclusive or”) of

p^ and

q,

denoted by

p^ q

, is false when both

p^ and

q

are false and is true otherwise.Read

p^ q

as: “

p^ or^

q”.

Truth Table:^ p^

q^ p

q T^ T

T

T^ F

T

F^ T

T

F^ F

F

Examples:

Find the disjunction of

p^ and

q:

-^ p: “It is sunny today.”

q: “Today is Monday.”

» “It is sunny today or today is Monday.”The disjunction is true on sunny Mondays (

TT) and on

Mondays (

FT^ or

TT) and on sunny days (

TF^ or

TT). It is only

false on non-sunny days that are not Mondays (

FF).

8/27/^

CS 2233 Discrete Mathematical Structures -- Carola Wenk

Exclusive Or

Definition.

Let^ p

and^

q^ be propositions. The

exclusive or

(“xor”) of

p^ and

q, denoted by

p⊕q, is true when exactly one of

p^ and

q^ is

true, and false otherwise.Read

p⊕q

as: “

p^ xor

q”.

Truth Table:^ p^

q^

p⊕q T^ T

F

T^ F

T

F^ T

T

F^ F

F

Where is the difference between or and xor? • “Students who have taken calculus or biology can take thisclass.” Is this

p^ q

or^ p⊕

q^?

  • The use of “or” in English is usually inclusive (i.e.,
  • How can we make this statement exclusive (i.e.,

» “Students who have taken calculus or biology, but not both,can enroll in this class.”Note that “either….or” is supposed to be exclusive, but we oftendon’t use it in the correct way in English.

8/27/^

CS 2233 Discrete Mathematical Structures -- Carola Wenk

7

Conditional Statement

Definition.

Let^ p

and^

q^ be propositions. The

conditional statement p

→q^ is false when

p^ is

true and

q^ is false, and true otherwise.

p^ is

called the

hypothesis

and^

q^ the

conclusion

Truth Table:^ p^

q^

p→q T^ T

T

T^ F

F

F^ T

T

F^ F

T

Read

p→q

as: “if

p,^ then

q”^

“p^ implies

q”

“p^ only if

q” ….. many more examples in the book.

Examples: • “If I am elected, then I will lower taxes.”»^ p→

q^ with

p^ “elected” and

q^ “taxes”

-^ p: “It rains.”

q: “We get wet.” » “If it rains, then we will get wet.”» “We will get wet whenever it rains.”» “It rains only if we get wet.”

8/27/^

CS 2233 Discrete Mathematical Structures -- Carola Wenk

Biconditional Statement

Definition.

Let^ p

and^

q^ be propositions. The

biconditional statement

(“iff”)

p→q

is true

when

p^ and

q^ have the same truth value, and false otherwise.

Truth Table:^ p^

q^

p↔q T^ T

T

T^ F

F

F^ T

F

F^ F

T

Read

p↔q

as: “

p^ if and only if

q”

“p iff q

Example: • “You can take the flight if and only if you buy a ticket.”