16
6/8/2016 1 PS10 Sets & Logic Lets check it out: We will be covering A) Propositions, negations, B) Conjunctions, disjunctions, and C) intro to truth tables, D) 3 propositions. Think about this. On Saint Patrick’s Day, the students in a class are all encouraged to wear green clothes to school. Sam Maddy Austin Jacob For each of these statements, list the students for which the statement is true: a) I am wearing a green shirt. b) I am not wearing a green shirt. c) I am wearing a green shirt and green pants. d) I am wearing a green shirt or green pants. e) I am wearing a green shirt or green pants, but not both.

PS10 Sets & Logic - WordPressblogs.bethel.k12.or.us/andrewsaputo/files/2016/06/IB-PS10.2-Logic... · PS10 Sets & Logic Lets check it out ... to truth tables, D) 3 propositions. Think

  • Upload
    vonhan

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

6/8/2016

1

PS10 Sets & LogicLets check it out: We will be covering A) Propositions, negations, B) Conjunctions, disjunctions, and C) intro to truth tables, D) 3 propositions.

Think about this.

On Saint Patrick’s Day, the

students in a class are all

encouraged to wear green

clothes to school.

Sam Maddy Austin Jacob

For each of these statements, list the students for which the statement is

true:

a) I am wearing a green shirt.

b) I am not wearing a green shirt.

c) I am wearing a green shirt and green pants.

d) I am wearing a green shirt or green pants.

e) I am wearing a green shirt or green pants, but not both.

6/8/2016

2

Propositions

Propositions are statements which may be

true or false.

They are not if a form of a question, but rather

an assertion that do not include opinions.

Propositions do no have to have the same

answer every time its asserted, but rather are

indeterminate.

The truth value of a proposition is whether it is

true or false.

[Note that Logic is closely associated with set notation

and Venn diagrams.]

Examples

Which of the following statements are propositions? If they are

propositions, are they true, false, or indeterminate?

1) 14

7= 2

2) You have a turtle on your back.

3) I like your flannel hat.

4) Mr. Saputo has 2300 records.

6/8/2016

3

PROPOSITION NOTATION

We represent propositions by letters such

as p, q, and r.

For example,

p: It always rains on Tuesdays.

q: 37 + 9 = 46

r: x is an even number.

Negation

Even though I have botched it a few times,

negation means something different than 𝐴′. This

is the compliment.

The negation of a proposition p is “not p”, and is written as ¬𝑝. The truth value of ¬𝑝 is the opposite

of the truth value of 𝑝.

Example:

The proposition 𝑝: It is raining outside.

The negation of p, ¬𝑝: It is not raining outside.

Write down an example about yourself!

6/8/2016

4

Back to the example

𝑝: 𝐼𝑡 𝑖𝑠 𝑟𝑎𝑖𝑛𝑖𝑛𝑔 𝑜𝑢𝑡𝑠𝑖𝑑𝑒

¬𝑝: 𝑖𝑡 𝑖𝑠 𝑛𝑜𝑡 𝑟𝑎𝑖𝑛𝑖𝑛𝑔 𝑜𝑢𝑡𝑠𝑖𝑑𝑒.

From this example we can see that ¬𝑝 is

With this information, it is simple to organize the information

in a Truth table. The first row is your propositions in general,

followed by columns that that correspond with the truth

value outcomes.

𝑓𝑎𝑙𝑠𝑒 𝑤ℎ𝑒𝑛 𝑝 𝑖𝑠 𝑡𝑟𝑢𝑒𝑡𝑟𝑢𝑒 𝑤ℎ𝑒𝑛 𝑝 𝑖𝑠 𝑓𝑎𝑙𝑠𝑒

Negation with sets

For sets, the negation can also be the compliment. They

are one in the same, but the terminology is different.

Example:

𝑈 =1

2, 3,5,7,9,11

Find the negation of 𝑥 𝑤ℎ𝑒𝑛 𝑥 ∈ ℤ

6/8/2016

5

NEGATION AND VENN DIAGRAMS

We can use a Venn diagram to

represent these propositions and their

negations.

For example, consider p: x is greater

than 10.

U is the universal set of all the values that the variable x may take.

P is the truth set of the proposition p, or the set of

values of x ∈ U for which p is true.

𝑃’ is the truth set of ¬p.

Example

Consider 𝑈 = 𝑥 2 < 𝑥 < 12, 𝑥 ∈ ℕ and proposition p: x is a prime number.

Find the truth sets of p and ¬p, and

display them on a Venn diagram.

6/8/2016

6

COMPOUND PROPOSITIONS

Compound propositions are statements

which are formed using connectives such as and and or.

Lets start with conjunctions:

When two propositions are joined using

the word and, the new proposition is the conjunction of the original propositions.

If p and q are propositions, 𝑝 ∧ 𝑞 is used to denote their conjunction.

Example

𝑝: 𝐴𝑑𝑟𝑖𝑎𝑛𝑎 ℎ𝑎𝑑 𝑐𝑜𝑓𝑓𝑒𝑒 𝑓𝑜𝑟 𝑏𝑟𝑒𝑎𝑘𝑓𝑎𝑠𝑡

𝑞: 𝐴𝑑𝑟𝑖𝑎𝑛𝑎 ℎ𝑎𝑑 𝑏𝑎𝑐𝑜𝑛 𝑓𝑜𝑟 𝑏𝑟𝑒𝑎𝑘𝑓𝑎𝑠𝑡

𝑝 ∧ 𝑞: 𝐴𝑑𝑟𝑖𝑎𝑛𝑎 ℎ𝑎𝑑 𝑐𝑜𝑓𝑓𝑒𝑒 𝑎𝑛𝑑 𝑏𝑎𝑐𝑜𝑛 𝑓𝑜𝑟 𝑏𝑟𝑒𝑎𝑘𝑓𝑎𝑠𝑡.

𝑝 ∧ 𝑞 is only true if Adriana had both coffee and a bacon for

breakfast, which means that both p and q are true.

If either of p or q is not true, or both p and q are not true,

then 𝑝 ∧ 𝑞 is not true.

This leads to something very important:

A conjunction is true only when both original

propositions are true.

6/8/2016

7

Lets use Adriana as an example

We are going to look at a truth table to help us understand each

situation that could possibly happen.

Lets use Adriana as an exampleWe can use Venn diagrams to represent

conjunctions.

Suppose:

P is the truth set of p, and

Q is the truth set of q.

The truth set of 𝑝 ∧ 𝑞 is 𝑃 ∩ 𝑄, the region where

both p and q are true.

6/8/2016

8

Lets do another example. Write down 𝑝 ∧ 𝑞 for the following pairs of propositions and fill in a truth

table:

A. 𝑝: 𝐹𝑟𝑎𝑛𝑐𝑜 𝑖𝑠 𝑎 𝑠𝑡𝑢𝑑𝑒𝑛𝑡, 𝑞: 𝐹𝑟𝑎𝑛𝑐𝑜 𝑖𝑠 𝑎 𝑠𝑒𝑛𝑖𝑜𝑟

B. 𝑝:𝐻𝑒𝑖𝑑𝑖 𝑖𝑠 𝑎 𝑓𝑖𝑔𝑢𝑟𝑒 𝑠𝑘𝑎𝑡𝑒𝑟,𝑞:𝐻𝑒𝑖𝑑𝑖 𝑖𝑠 𝑎 𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑖𝑜𝑛 𝑠𝑦𝑐𝑟𝑜𝑛𝑖𝑧𝑒𝑑 𝑠𝑤𝑖𝑚𝑚𝑒𝑟.

A. Which situation is true on the table?

𝒑 𝒒 𝒑 ∧ 𝒒

𝒑 𝒒 𝒑 ∧ 𝒒

Lets do another example. A. Decide whether p ∧ 𝑞 is true or false. Highlight the truth table that this

circumstance follows.

𝑝: 4 𝑖𝑠 𝑎 𝑓𝑎𝑐𝑡𝑜𝑟 𝑜𝑓 16, 𝑞: 3 𝑖𝑠 𝑎 𝑓𝑎𝑐𝑡𝑜𝑟 𝑜𝑓 16.

𝒑 𝒒 𝒑 ∧ 𝒒

6/8/2016

9

DISJUNCTION When two propositions are joined by the word or, the new proposition is

the disjunction of the original propositions.

If p and q are propositions, 𝑝 ∨ 𝑞 is used to denote their disjunction.

Example:

𝑝:𝐷𝑎𝑖𝑠𝑦 𝑟𝑎𝑛 𝑡ℎ𝑒 500𝑚 𝑡𝑜𝑑𝑎𝑦

𝑞: 𝐷𝑎𝑖𝑠𝑦 𝑟𝑎𝑛 𝑡ℎ𝑒 1,000𝑚 𝑡𝑜𝑑𝑎𝑦.

𝑝 ∨ 𝑞:

A disjunction is true when one or both propositions

are true.

A disjunction is only false if both propositions are

false.

The truth table for the disjunction

“p or q” is: Here is the truth table for every disjunction

𝒑 𝒒 𝒑 ∨ 𝒒

6/8/2016

10

Venns

If P and Q are the truth sets for propositions p and q respectively,

then the truth set for 𝑝 ∨ 𝑞 is 𝑃 ∪ 𝑄, the region where p or q or both

are true.

The exclusive disjunction is true when only one of the propositions

is true. The exclusive disjunction of p and q is written p ∨ q.

We can describe p V q as “p or q, but not both”, or “exactly one

of p and q”. Example:

p: Orion ate cereal for breakfast

q: Orion ate toast for breakfast

p V q: Sally ate cereal or toast, but not both, for breakfast.

The truth table for the exclusive disjunction p V q is:

𝒑 𝒒 𝒑 ∨ 𝒒

6/8/2016

11

The exclusive disjunction is true when only one of the propositions

is true. The exclusive disjunction of p and q is written p ∨ q.

We can describe p V q as “p or q, but not both”, or “exactly one

of p and q”. Example:

p: Orion ate cereal for breakfast

q: Orion ate toast for breakfast

p V q: Sally ate cereal or toast, but not both, for breakfast.

If P and Q are the truth sets for propositions p and q respectively,

then the truth set for p V q is the region shaded, where exactly

one of p and q is true.

𝑝 ∨ 𝑞 ⟺ 𝑃 ∪ 𝑄 − (𝑃 ∩ 𝑄)

𝒑 𝒒 𝒑 ∨ 𝒒

Example

6/8/2016

12

Do we have time for more? TRUTH

TABLES AND LOGICAL EQUIVALENCE

The truth tables for negation, conjunction, disjunction, and

exclusive disjunction can be summarized in one table.

𝒑 𝒒 ¬𝒑 𝒑 ∧ 𝒒 𝒑 ∨ 𝒒 𝒑 ∨ 𝒒

Construct a truth table for 𝑝 ∧ ¬𝑞.

We start by listing all possible combinations of p and q. We can fill

in each column afterwards.

𝒑 𝒒 ¬𝒒 𝒑 ∧ ¬𝒒

6/8/2016

13

TAUTOLOGY AND LOGICAL

CONTRADICTION A compound proposition is a tautology if all the values in its truth

table column are true.

A compound proposition is a logical contradiction if all the values

in its truth table column are false.

1) is 𝑝 ∧ ¬𝑝 a tautology a logical contradiction or neither?

𝒑 ¬𝒑 𝒑 ∧ ¬𝒑

More difficult

Show that (¬𝑞 ∧ 𝑝) ∧ (𝑞 ∨ ¬𝑝) is a logical contradiction.

6/8/2016

14

One last thing in C

Two propositions are logically equivalent if they have the same

truth table column.

Lets do one alone

Construct a truth table for the following propositions:

1) ¬𝑝 ∧ 𝑞

𝒑 𝒒 ¬𝒑 ¬𝒑 ∧ 𝒒

6/8/2016

15

Lets break it down using the

symbols ∧= Both need to be true to have a true

∨= One or more need to be true to have a true.

∨ = Only one can be true to have a true

¬= The opposite of whatever it is in front of.

Three propositions r is used to state a third proposition. At this point, what p, q and r are

tend to get abstract, therefore, we are going focus on what

happens in the truth table.p q r

T

T

T

T

F

F

F

F

T

T

F

F

T

T

F

F

T

F

T

F

T

F

T

F

6/8/2016

16

You try to construct a 3 prop truth

table for (𝑝 ∨ 𝑞) ∧ 𝑟

Homework

P.236

8B.1 #2, 3

P. 238

8B.2 #2, 4, 5, 9, 11-13

P.242 8C.1 #1-9 odd.

P.244 8C.2 #2-6 even