variables Compound Statements Remember PEMDAS? Compound Statements There is also an order or operations for compound statements Compound

Statements PEMDAS for compound statements: ~ before or Compound Statements PEMDAS for compound statements: squiggle before arrows Compound Statements

PEMDAS for compound statements: ~ before or Example: q ~ p q = (~ p) Compound Statements The order of operations can be overridden through the use of parentheses

Compound Statements The order of operations can be overridden through the use of parentheses ~ (p q) is the negation of the conjunction of p and q Compound Statements The symbols and are

considered coequal in order of operation Compound Statements pqr is ambiguous It must be written as either: (p q) r or p (q r) to have meaning Compound Statements

IN-CLASS PROBLEMS Suppose x is a particular real number p: 0

p,q and r qr Compound Statements IN-CLASS PROBLEMS Suppose x is a particular real number p: 0

Suppose x is a particular real number p: 0

Compound Statements IN-CLASS PROBLEMS Suppose x is a particular real number p: 0

Logical Equivalence 6 is greater than 2 2 is less than 6 Are these two statements two different ways of saying the same thing? Logical Equivalence 6 is greater than 2 2 is less than 6 Are these two statements two different ways of saying the same thing? Yep because of the definition of the words

greater than and less Logical Equivalence Dogs bark and cats meow Cats meow and dogs bark Are these two statements two different ways of saying the same thing? Logical Equivalence Dogs bark and cats meow Cats meow and dogs bark Are these two statements two different ways of saying the same thing?

Yep, but not because of definitions of words Logical Equivalence Dogs bark and cats meow Cats meow and dogs bark Are these two statements two different ways of saying the same thing? Yep, because of the logical form of the statements Logical Equivalence Any two statements whose logical forms are related in

the same way would either both be true or both be false Logical Equivalence p q T T F F T

F T F pq p and q T F F F qp q and p

T F F F Logical Equivalence Two statement forms are called logically equivalent if and only if they have identical truth values in their truth table Logical Equivalence Two statement forms are called logically equivalent if

and only if they have identical truth values in their truth table Written: p q Logical Equivalence Test for logical equivalence: 1) What are the statements? 2) Construct a truth table 3) If the truth values are the same for each statement, then they are logically equivalent

Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) p Is ~(~p) logically equivalent to p? Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) p Is ~(~p) logically equivalent to p?

p ~(~p) Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) p Is ~(~p) logically equivalent to p? p ~p

~(~p) Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) p Is ~(~p) logically equivalent to p? p T F ~p

~(~p) Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) p Is ~(~p) logically equivalent to p? p T F ~p F

T ~(~p) Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) p Is ~(~p) logically equivalent to p? p T F

~p F T ~(~p) T F Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) p Is ~(~p) logically equivalent to p?

p T F ~p F T ~(~p) T F p and ~(~p) always have the same truth values

Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p ~q? Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p ~q? p q

Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p ~q? p T T F F q T F T

F Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p ~q? p T T F F q T

F T F pq Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p ~q? p T T F

F q T F T F pq T F F F Logical Equivalence

IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p ~q? p T T F F q T F T F

pq T F F F ~(pq) Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p ~q? p

T T F F q T F T F pq T F F

F ~(pq) F T T T Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p ~q? p

q pq T T F F T F T F T

F F F ~(pq ) F T T T ~p ~q

Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p ~q? p q pq T T F F

T F T F T F F F ~(pq ) F T

T T ~p ~q F F T T F T F

T Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p ~q? p q pq ~(pq)

~p ~q T T F F T F T F T

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

T F T ~p~ q Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p ~q? p q

pq ~(pq) ~p ~q T T F F T

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

F T T F T F T ~p~ q F F F T

~(pq) and ~p~q dont have the same truth values Questions? www.career.gatech.edu Conditional Statements Types of compound statements: Conditional statements/

propositions contain versions of the words ifthen Conditional Statements Types of compound statements: Conditional statements/ propositions contain versions of the words ifthen Ex: If a human has a Y Conditional

Statements Types of compound statements: Conditional statements/ propositions contain versions of the words ifthen denoted symbolically by p Conditional Statements In a conditional statement pq

p is called the hypothesis (or antecedent) and q is called the conclusion (or consequent) Conditional Statements The truth of statement q depends on the truth of statement p Conditional Statements

Logically equivalent conditional statements have the same truth value in their truth tables Conditional Statements IN-CLASS PROBLEMS Is this a statement? If Lisa is in France, then she is in Europe Conditional Statements IN-CLASS PROBLEMS

Is this statement conditional? If Lisa is in France, then she is in Europe Conditional Statements IN-CLASS PROBLEMS If Lisa is in France, then she is in Europe Think of it as: p: Lisa is in France q: She is in Europe If p then q

or pq Conditional Statements IN-CLASS PROBLEMS Is this a statement? If Lisa is not in Europe, then she is not in France Conditional Statements IN-CLASS PROBLEMS Is this statement

conditional? If Lisa is not in Europe, then she is not in France Conditional Statements IN-CLASS PROBLEMS If Lisa is not in Europe, then she is not in France Think of it as: ~q: Lisa is not in Europe ~p: She is not in France If ~q then ~p or

~q ~p Conditional Statements IN-CLASS PROBLEMS Are these statements equivalent? If Lisa is in France, then she is in Europe p q If Lisa is not in Europe, then she is not in France ~q ~p Conditional Statements

IN-CLASS PROBLEMS in in Franc Europ e e pq not in Europ e not in

France ~q~ p Conditional Statements IN-CLASS PROBLEMS in in Franc Europ e e T

T F F pq not in Europ e not in France ~q~ p

Conditional Statements IN-CLASS PROBLEMS in in Franc Europ e e T T F F

T F T F pq not in Europ e not in France ~q~

p Conditional Statements IN-CLASS PROBLEMS in in Franc Europ e e T T F F

T F T F pq T F T T not in Europ e

not in France ~q~ p Conditional Statements For conditional statements, p q is false only when p is true but q is false Otherwise it is true

Conditional Statements IN-CLASS PROBLEMS in in Franc Europ e e T T F F T

F T F pq not in Europ e T F T T

F T F T not in France ~q~ p Conditional Statements IN-CLASS PROBLEMS in

in Franc Europ e e T T F F T F T F

pq not in Europ e not in France T F T T F

T F T F F T T ~q~ p Conditional Statements IN-CLASS PROBLEMS

in in Franc Europ e e T T F F T F T F

pq not in Europ e not in France T F T T

F T F T F F T T ~q~ p T F T

T Conditional Statements IN-CLASS PROBLEMS in in Franc Europ e e T T F F

T F T F pq not in Europ e not in France

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

~q~ p T F T T pq and ~q~p have the same truth values Conditional Statements Note: while pq and ~q~p

are logically equivalent, pq and ~p~q arent Conditional Statements Contrapositive (or transposition) of a conditional statement/ proposition: The contrapositive of pq is ~q~p Conditional

Statements A conditional statement/ proposition is logically equivalent to its contrapositive Contrapositive Statements IN-CLASS PROBLEMS What is the contrapositive to: If Howard can swim across the lake, then Howard can swim to the island

Contrapositive Statements IN-CLASS PROBLEMS What is the contrapositive to: If Howard can swim across the lake, then Howard can swim to the island If Howard cannot swim to the island, then Howard cannot swim across the lake Contrapositive Statements IN-CLASS PROBLEMS

What is the contrapositive to: If today is Easter, then tomorrow is Monday Contrapositive Statements IN-CLASS PROBLEMS What is the contrapositive to: If today is Easter, then tomorrow is Monday If tomorrow is not Monday, then today is not Easter

Questions? www.career.gatech.edu Biconditional Statements Types of compound statements: Biconditional statements/ propositions contain versions of the words if and only if

denoted symbolically by p Biconditional Statements Types of compound statements: Biconditional statements/ propositions contain versions of the words if and only if Sometimes written: iff Biconditional Statements

IN-CLASS PROBLEMS Is it biconditional? I wear my sunglasses if it is sunny Biconditional Statements IN-CLASS PROBLEMS Is it biconditional? I wear my sunglasses if it is sunny nope Biconditional Statements

IN-CLASS PROBLEMS Is it biconditional? I wear my sunglasses if and only if it is sunny Biconditional Statements IN-CLASS PROBLEMS Is it biconditional? I wear my sunglasses if and only if it is sunny yep Biconditional Statements

IN-CLASS PROBLEMS Truth table: Sunglasse s? Sunny? Sunglasses iff sunny Biconditional Statements IN-CLASS PROBLEMS Truth table:

Sunglasse s? Sunny? T T F F T F T F

Sunglasses iff sunny Biconditional Statements IN-CLASS PROBLEMS Truth table: Sunglasse s? Sunny? Sunglasses iff sunny

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

Biconditional Statements For biconditional statements, p q is true whenever the two statements have the same truth value Otherwise it is false Questions? Truth Tables in Circuits

In designing digital circuits, the designer often begins with a truth table describing what the circuit should do Truth Tables in Circuits Suppose we were given the task of designing a flame detection circuit for a toxic waste incinerator Truth Tables in

Circuits The intense heat of the fire is intended to neutralize the toxicity of the waste introduced into the incinerator Truth Tables in Circuits Combustion-based techniques are commonly used to neutralize medical waste, which may be

infected with deadly viruses or bacteria Truth Tables in Circuits So long as a flame is maintained in the incinerator, it is safe to inject waste into it to be neutralized Truth Tables in Circuits

If the flame were to be extinguished, it would be unsafe to inject waste into the combustion chamber, as it would exit the exhaust un-neutralized, and pose a health threat to anyone in close proximity to the exhaust Truth Tables in Circuits What we need in this system is a sure way of

detecting the presence of a flame, and permitting waste to be injected only if a flame is proven by the flame detection system Truth Tables in Circuits Truth Tables in Circuits Our task, now, is to design the circuitry of the logic system to open the waste

valve if and only if there is good flame proven by the sensors Truth Tables in Circuits Do we want the valve to be opened if only one out of the three sensors detects flame? Two out of three? All three? Truth Tables in

Circuits Design the system so that the valve is opened if and only if all three sensors detect a good flame Truth Tables in Circuits Sensor A Sensor B Sensor C

Open? Truth Tables in Circuits Sensor A No fire No fire No fire No fire Fire Fire Fire Fire

Sensor B Sensor C Open? Truth Tables in Circuits Sensor A Sensor B No fire

No fire No fire Fire No fire No fire No fire Fire

Fire No fire Fire Fire Fire No fire Fire Fire

Sensor C Open? Truth Tables in Circuits Sensor A Sensor B Sensor C No fire

No fire Fire No fire Fire No fire No fire No fire

No fire No fire Fire Fire Fire No fire Fire Fire

Fire No fire Fire No fire No fire Fire Fire

Fire Open? Truth Tables in Circuits Sensor A Sensor B Sensor C Open?

No fire No fire Fire No No fire Fire No fire No

No fire No fire No fire No No fire Fire Fire

No Fire No fire Fire No Fire Fire No fire

No Fire No fire No fire No Fire Fire

Fire Yes Truth Tables in Circuits This functionality could be generated with a threeinput AND gate: the output of the circuit will be on if and only if input A AND input B AND input C are all fire Truth Tables in

Circuits It would be nice to have a system that minimized shutting the system down unnecessarily, yet still provide sensor redundancy Truth Tables in Circuits Two out of three might do this! Truth Tables in

Circuits Sensor A Sensor B Sensor C No fire No fire Fire No fire

Fire No fire No fire No fire No fire No fire Fire

Fire Fire No fire Fire Fire Fire No fire Fire

No fire No fire Fire Fire Fire Open? Truth Tables in Circuits

Sensor A Sensor B Sensor C Open? No fire No fire Fire

no No fire Fire No fire no No fire No fire No fire

no No fire Fire Fire yes Fire No fire

Fire yes Fire Fire No fire yes Fire No fire

No fire no Fire Fire Fire yes Truth Tables in Circuits

We might want to know when one of the sensors did not agree with the other two Truth Tables in Circuits Sensor A Sensor B Sensor C

No fire No fire Fire No fire Fire No fire No fire No fire

No fire No fire Fire Fire Fire No fire Fire

Fire Fire No fire Fire No fire No fire Fire Fire

Fire Only two agree? Truth Tables in Circuits Sensor A Sensor B Sensor C

Only two agree? No fire No fire Fire yes No fire Fire

No fire yes No fire No fire No fire no No fire Fire

Fire yes Fire No fire Fire yes Fire

Fire No fire yes Fire No fire No fire yes Fire

Fire Fire no Questions? Beach Trip Logic problems are found in Crossword Puzzle books They use the skills we learned in this class!