Top Banner
The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari http://arief.ismy.web.id
26

The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Dec 14, 2015

Download

Documents

Ann Bunnell
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

The Foundation: LogicPropositional Logic, Propositional Equivalence

Muhammad Ariefdownload dari http://arief.ismy.web.id

Page 2: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Propositions / Statements

• A statement (or proposition) is a sentence that is true or false but not both.

• The truth value of a proposition is either TRUE / T / 1 or FALSE / F / 0.

• Ex.– two plus two equals four

• Proposition? Yes• Truth value: true

http://arief.ismy.web.id

Page 3: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Examples• Two plus two equals five

– Proposition? Yes– Truth value: False

• An elephant is bigger than an ant– Proposition? Yes– Truth value: true

• He is a university student – Proposition? No– Truth value: depend on who he is

• C is bigger than 10– Proposition? No – Truth value: unknown

• F plus G equals 9– Proposition? No– Truth value: unknown

http://arief.ismy.web.id

Page 4: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Examples

• Dimana letak kampus UMN – Proposition? No (pertanyaan)

• Jangan memakai sandal ke kampus– Proposition? No (perintah)

• Mudah-mudahan jalan tidak macet – Proposition? No (harapan)

• Indahnya bulan purnama– Proposition? No (ketakjuban / keheranan)

http://arief.ismy.web.id

Page 5: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Compound Propositions / Compound Statements

• A composition of two or more proposition / statement that is true or false but not both

• Example:– Budi is studying at UMN, he is a university student

• Compound statement? Yes• Truth value : True

– Jika x = 1 dan y = 2 maka x lebih besar daripada y• Compound Statement? Yes• Truth value: False

http://arief.ismy.web.id

Page 6: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Formalization of (Compound) Statements

• Translating a (compound) statement to symbols (such as x, y, z) and logical operator.

• Logical operator:~, ¬ not

and

or

http://arief.ismy.web.id

Page 7: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Example~p : not p, negation of p

p q : p and q, conjunction of p and q

p q : p or q, disjunction of p and q

• Order of operation : ( … )

~

Example:

~p q = (~p) qp q r is ambiguous, (p q) r or p (q r)

http://arief.ismy.web.id

Page 8: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Example

• p = it is hot; q = it is sunny

• It is not hot but sunny– It is not hot and it is sunny ~p q

• It is neither hot nor sunny– It is not hot and it is not sunny ~p ~q

http://arief.ismy.web.id

Page 9: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Example

• x ≤ a means x < a or x = a

• a ≤ x ≤ b means a ≤ x and x ≤ b

• 2 ≤ x ≤ 1– compound statement? Yes– Truth value: False

http://arief.ismy.web.id

Page 10: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Truth TableThe list of all possible truth values of a

compound statement.

Truth Table for Negation

http://arief.ismy.web.id

Page 11: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Truth Table for Conjunction p q

http://arief.ismy.web.id

Page 12: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Truth Table for Disjunction p q

http://arief.ismy.web.id

Page 13: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Evaluating the Truth of more General Compound Statements

~p q = (~p) q

Steps: - Evaluate the expressions within the

innermost parentheses- Evaluate the expressions within the next

innermost set of parentheses- Until you have the truth values for the

complete expression.http://arief.ismy.web.id

Page 14: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Evaluating the Truth of more General Compound Statements

p q ~p ~p q

T T F F

T F F F

F T T T

F F T Fhttp://arief.ismy.web.id

Page 15: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Truth Table for Exclusive Or

Definition:• (p q) ~(p q) : p q, p XOR q,

http://arief.ismy.web.id

Page 16: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Truth Table for (p q) ~r

http://arief.ismy.web.id

Page 17: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Logical EquivalenceDefinition:• Two statement forms are called logically

equivalent if, and only if, they have identical truth values for each possible substitution of statements for their statement variable.

P = p qQ = q p

• The logical equivalence of statement forms P and Q is denoted by writing P Q.

http://arief.ismy.web.id

Page 18: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Logical Equivalence P Q

http://arief.ismy.web.id

Page 19: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

~(~p) p

http://arief.ismy.web.id

Page 20: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Are ~(p q) and ~p ~q logically equivalent?

http://arief.ismy.web.id

Page 21: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

De Morgan’s LawsDefinition:• The negation of an AND statement is

logically equivalent to the OR statement in which each component is negated.

~(p q) ~p ~q

• The negation of an OR statement is logically equivalent to the AND statement in which each component is negated.

~(p q) ~p ~qhttp://arief.ismy.web.id

Page 22: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

De Morgan’s Laws

http://arief.ismy.web.id

Page 23: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Tautologies and Contradictions

• A tautology is a statement form that is always true regardless of the truth values of the individual statements substituted for its statement variables.

p ~p

• A contradiction is a statement form that is always false regardless of the truth values of the individual statements substituted for its statement variables.

p ~p

http://arief.ismy.web.id

Page 24: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Tautologies and Contradictions

http://arief.ismy.web.id

Page 25: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Examples

• x + y > 0 (not a statement)

• For x = 1 and y = 2, x + y > 0

• For x = -1 and y = 0, x + y > 0

http://arief.ismy.web.id

Page 26: The Foundation: Logic Propositional Logic, Propositional Equivalence Muhammad Arief download dari .

Applying De Morgan’s Laws

• John is six feet tall and he weighs at least 200 pounds.• The bus was late or Tom’s watch was slow.• -1 < x 4• p: jim is tall and jim is thin

• John is not six feet tall or he weighs less than 200 pounds.

• The bus was not late and Tom’s watch was not slow.• -1 < x and x 4• -1 < x or x 4• -1 x and x > 4• ~p: jim is not tall or jim is not thin

http://arief.ismy.web.id