[Hernandez 1213A] Cs30 day2

Page 1

Propositional Calculus (cont...)

CS 30 : Discrete Mathematics for Computer Science

First Semester, AY 2012-2013

https://sites.google.com/a/dcs.upd.edu.ph/nhsh_classes/cs 30

sablay-logo

Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University of the Philippines, Diliman nshernandez@dcs.upd.edu.ph

updilseal Day 2

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Mathematical Logic

sablay-logo

1

Propositional Calculus (cont...) Arguments Predicates and Quanti ers

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Tautology? Contradiction?

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Tautology? Contradiction? De nition A statement that is always true is called a tautology.

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Tautology? Contradiction? De nition A statement that is always true is called a tautology. A statement that is always false is called a contradiction.

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Tautology? Contradiction? De nition A statement that is always true is called a tautology. A statement that is always false is called a contradiction.

sablay-logo

Example 1

The statement p ∨

âˆźp

is

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Tautology? Contradiction? De nition A statement that is always true is called a tautology. A statement that is always false is called a contradiction.

sablay-logo

Example 1

The statement p ∨

âˆźp

is a tautology.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Tautology? Contradiction? De nition A statement that is always true is called a tautology. A statement that is always false is called a contradiction.

sablay-logo

Example 1

The statement p ∨

∼p

is a tautology.

2

The statement p ∧

∼p

is

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Tautology? Contradiction? De nition A statement that is always true is called a tautology. A statement that is always false is called a contradiction.

sablay-logo

Example 1

The statement p ∨

∼p

is a tautology.

2

The statement p ∧

∼p

is a contradiction.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Tautology? Contradiction? De nition A statement that is always true is called a tautology. A statement that is always false is called a contradiction.

sablay-logo

Example 1

The statement p ∨

∼p

is a tautology.

2

The statement p ∧

∼p

is a contradiction.

3

The statement

((p ∨ q ) ∧ p ) ⇐⇒ p

is

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Tautology? Contradiction? De nition A statement that is always true is called a tautology. A statement that is always false is called a contradiction.

sablay-logo

Example 1

The statement p ∨

∼p

is a tautology.

2

The statement p ∧

∼p

is a contradiction.

3

The statement

((p ∨ q ) ∧ p ) ⇐⇒ p

is a tautology.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Tautology? Contradiction? De nition A statement that is always true is called a tautology. A statement that is always false is called a contradiction.

sablay-logo

Example 1

The statement p ∨

âˆźp

is a tautology.

2

The statement p ∧

âˆźp

is a contradiction.

3

The statement

((p ∨ q ) ∧ p ) �⇒ p

is a tautology.

Remark: p1 �⇒ p2 is a tautology i p1 and p2 have the same truth value. updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Tautology? Contradiction? De nition A statement that is always true is called a tautology. A statement that is always false is called a contradiction.

sablay-logo

Example 1

The statement p ∨

âˆźp

is a tautology.

2

The statement p ∧

âˆźp

is a contradiction.

3

The statement

((p ∨ q ) ∧ p ) �⇒ p

is a tautology.

Remark: p1 �⇒ p2 is a tautology i p1 and p2 have the same truth value. We say that p1 and p2 are equivalent, denoted p1 ≥ p2 .

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Argument ?

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Argument ? De nition A conditional of the form (a conjunction of statements) implies c where c is a statement, is called an argument . That is,

p1

∧ p2 ∧ . . . ∧ pn =⇒ c

sablay-logo

The statements in the conjunction on the left side of the conditional are called premises , while c is called the conclusion.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Argument valid?

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Argument valid? An argument is valid if it is a tautology.

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Argument valid? An argument is valid if it is a tautology.

p1

∧ p2 ∧ . . . ∧ pn =⇒ c

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Argument valid? An argument is valid if it is a tautology.

p1

∧ p2 ∧ . . . ∧ pn =⇒ c

sablay-logo

Note: 1

A conjunction of several statements is true only when all the statements are true.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Argument valid? An argument is valid if it is a tautology.

p1

∧ p2 ∧ . . . ∧ pn =⇒ c

sablay-logo

Note: 1

A conjunction of several statements is true only when all the statements are true.

2

A conditional is false only when the antecedent is true and the consequence is false.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Argument valid? An argument is valid if it is a tautology.

p1

∧ p2 ∧ . . . ∧ pn =⇒ c

sablay-logo

Note: 1

A conjunction of several statements is true only when all the statements are true.

2

A conditional is false only when the antecedent is true and the consequence is false.

3

Therefore, an argument is invalid only when there is an instance where all the premises are true, but the conclusion is false. If such a situation cannot occur, the argument is valid.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Analyzing Arguments Using Truth Tables

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Analyzing Arguments Using Truth Tables 1

Translate the premises and the conclusion into symbolic form.

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Analyzing Arguments Using Truth Tables 1

Translate the premises and the conclusion into symbolic form.

2

Write the truth table for the premises and the conclusion.

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Analyzing Arguments Using Truth Tables 1

Translate the premises and the conclusion into symbolic form.

2

Write the truth table for the premises and the conclusion.

3

Determine if there is a row in which all the premises are true and the conclusion is false. If yes, the argument is invalid, otherwise it is

sablay-logo

valid.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Analyzing Arguments Using Truth Tables 1

Translate the premises and the conclusion into symbolic form.

2

Write the truth table for the premises and the conclusion.

3

Determine if there is a row in which all the premises are true and the conclusion is false. If yes, the argument is invalid, otherwise it is

sablay-logo

valid.

Example 1

, , ((p ∧ q ) ⇒∼ r ) =⇒∼ q

p r

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Analyzing Arguments Using Truth Tables 1

Translate the premises and the conclusion into symbolic form.

2

Write the truth table for the premises and the conclusion.

3

Determine if there is a row in which all the premises are true and the conclusion is false. If yes, the argument is invalid, otherwise it is

sablay-logo

valid.

Example 1

p r

2

Mary studies hard. If Mary studies hard then she is a nerd. If Mary

, , ((p ∧ q ) ⇒∼ r ) =⇒∼ q

is a nerd then she does not party. Therefore Mary does not party. updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

A more complex deduction You are about to leave for school in the morning and discover that you don't have your glasses. You know the following statements are true: a. If I was reading the newspaper in the kitchen, then my glasses are on the kitchen table. b. If my glasses are on the kitchen table, then I saw them at

sablay-logo

breakfast. c. I did not see my glasses at breakfast. d. I was reading the newspaper in the living room or I was reading the newspaper in the kitchen. e. If I was reading the newspaper in the living room then my glasses are on the co ee table. Now I know where my glasses are! It's on the co ee table! :-)

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Analyzing Arguments Using Rules of Inference RULES OF INFERENCE

sablay-logo

updilseal

p, q , r , s

can be any statement.

c

dcs-logo

is a contradiction.

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Try this ... If I go to my rst class tomorrow, then I must get up early. If I go to the dance tonight, I will stay up late. If I stay up late and get up early, then I will be forced to exist on only ve hours sleep. I cannot exist on ve hours of sleep. Therefore I must either miss my rst class tomorrow or not go to the

sablay-logo

dance.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Logical Equivalences

sablay-logo

t

is a tautology.

c

is a contradiction.

p, q , r

can be any statement.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Logical Equivalences

sablay-logo

t

is a tautology.

c

is a contradiction.

p, q , r

can be any statement.

Knowledge of logically equivalent statements is very useful for constructing arguments. It often happens that it is di cult to see how a conclusion follows from one form of a statement, whereas it is easy to see how it follows from a logically equivalent form of the statement. Discrete Mathematics for Computer Science

CS 30

updilseal

dcs-logo

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

More Logical Equivalences 1

p

2

p

→ q ≡ ¬p ∨ q

3

p

∧ q ≡ ¬(p → ¬q )

4

¬(p → q ) ≡ p ∧ ¬q

5

(p → q ) ∧ (p → r ) ≡ p → (q ∧ r )

6

(p → r ) ∧ (q → r ) ≡ (p ∨ q ) → r

7

(p → q ) ∨ (p → r ) ≡ p → (q ∨ r )

8

(p → r ) ∨ (q → r ) ≡ (p ∧ q ) → r

9

p

↔ q ≡ (p → q ) ∧ (q → p )

10

p

↔ q ≡ ¬p ↔ ¬q

11

p

↔ q ≡ (p ∧ q ) ∨ (¬p ∧ ¬q )

12

¬(p ↔ q ) ≡ p ↔ ¬q

→ q ≡ ¬q → ¬p

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Going back to ... Knights and Knaves The logician Raymond Smullyan describes an island containing two types of people: knights who always tell the truth and knaves who always lie.

You visit the island and are approached by two natives who speak to you

sablay-logo

as follows: A says: B is a knight. B says: A and I are of opposite type. You say: Both of you are surely knaves!

Give an argument as to why you arrive at that conclusion.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Predicate ? De nition A

predicate is a statement containing one or more variables.

If values

are assigned to all the variables in a predicate, the resulting statement is a proposition.

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Predicate ? De nition A

predicate is a statement containing one or more variables.

If values

are assigned to all the variables in a predicate, the resulting statement is a proposition.

sablay-logo

Example x

<5

is a predicate, where x is a variable denoting any real number.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Predicate ? De nition A

predicate is a statement containing one or more variables.

If values

are assigned to all the variables in a predicate, the resulting statement is a proposition.

sablay-logo

Example x

<5

is a predicate, where x is a variable denoting any real number.

Substituting a real number for x , yields a proposition:

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Predicate ? De nition A

predicate is a statement containing one or more variables.

If values

are assigned to all the variables in a predicate, the resulting statement is a proposition.

sablay-logo

Example x

<5

is a predicate, where x is a variable denoting any real number.

Substituting a real number for x , yields a proposition: 3

<5

6

<5 updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Predicate ? De nition A

predicate is a statement containing one or more variables.

If values

are assigned to all the variables in a predicate, the resulting statement is a proposition.

sablay-logo

Example x

<5

is a predicate, where x is a variable denoting any real number.

Substituting a real number for x , yields a proposition: 3

<5

6

<5 updilseal

What are their truth values?

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Quanti ers ? Quanti ers are words that refer to quantities such as some or all and tell for how many elements a given predicate is true.

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Quanti ers ? Quanti ers are words that refer to quantities such as some or all and tell for how many elements a given predicate is true.

∀

universal quanti er

∃

existential quanti er

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Quanti ers ? Quanti ers are words that refer to quantities such as some or all and tell for how many elements a given predicate is true.

∀

universal quanti er

∃

existential quanti er

sablay-logo

Example There exists an x such that x

< 5.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Quanti ers ? Quanti ers are words that refer to quantities such as some or all and tell for how many elements a given predicate is true.

universal quanti er

existential quanti er

sablay-logo

Example There exists an x such that x

< 5.

∃x , x < 5

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Quanti ers ? Quanti ers are words that refer to quantities such as some or all and tell for how many elements a given predicate is true.

universal quanti er

existential quanti er

sablay-logo

Example There exists an x such that x

< 5.

∃x , x < 5 For all x , x

<5

or x

≥ 5.

∀x , (x < 5 ∨ x ≥ 5)

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Universal Statement? Existential Statement? De nition Let Q (x ) be a predicate and D the domain of x . A

universal statement is a statement of the form ∀x ∈ D , Q (x ).

It is de ned to be true if and only if Q (x ) is true for every x in D .

sablay-logo

It is de ned to be false if and only if Q (x ) is false for at least one x in D .

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Universal Statement? Existential Statement? De nition Let Q (x ) be a predicate and D the domain of x . A

universal statement is a statement of the form ∀x ∈ D , Q (x ).

It is de ned to be true if and only if Q (x ) is true for every x in D .

sablay-logo

It is de ned to be false if and only if Q (x ) is false for at least one x in D . A value for x for which Q (x ) is false is called a counterexample to the universal statement.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Universal Statement? Existential Statement? De nition Let Q (x ) be a predicate and D the domain of x . A

universal statement is a statement of the form ∀x ∈ D , Q (x ).

It is de ned to be true if and only if Q (x ) is true for every x in D .

sablay-logo

It is de ned to be false if and only if Q (x ) is false for at least one x in D . A value for x for which Q (x ) is false is called a counterexample to the universal statement. An

existential statement is a statement of the form ∃x ∈ D

such that

( )

Q x .

It is de ned to be true if and only if Q (x ) is true for at least one x in D. It is false if and only if Q (x ) is false for all x in D .

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Truth Value of a Quanti ed Statement Example 1

Let D

= {1, 2, 3, 4, 5}

and consider the statement

∀x ∈ D , x 2 ≥ x .

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Truth Value of a Quanti ed Statement Example 1

Let D

= {1, 2, 3, 4, 5}

and consider the statement

∀x ∈ D , x 2 ≥ x .

TRUE

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Truth Value of a Quanti ed Statement Example 1

Let D

= {1, 2, 3, 4, 5}

and consider the statement

∀x ∈ D , x 2 ≥ x .

TRUE 2

Consider the statement

∀x ∈ R, x 2 ≥ x .

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Truth Value of a Quanti ed Statement Example 1

Let D

= {1, 2, 3, 4, 5}

and consider the statement

∀x ∈ D , x 2 ≥ x .

TRUE 2

Consider the statement

∀x ∈ R, x 2 ≥ x .

FALSE

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Arguments Predicates and Quanti ers

Propositional Calculus (cont...)

Truth Value of a Quanti ed Statement Example 1

Let D

= {1, 2, 3, 4, 5}

and consider the statement

∀x ∈ D , x 2 ≥ x .

TRUE 2 3

Consider the statement Consider the statement

∀x ∈ R, x 2 ≥ x .

∃m ∈ Z

+

FALSE

such that m

2

sablay-logo

= m.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Arguments Predicates and Quanti ers

Propositional Calculus (cont...)

Truth Value of a Quanti ed Statement Example 1

Let D

= {1, 2, 3, 4, 5}

and consider the statement

∀x ∈ D , x 2 ≥ x .

TRUE 2 3

Consider the statement Consider the statement

∀x ∈ R, x 2 ≥ x .

∃m ∈ Z

+

FALSE

such that m

2

sablay-logo

= m.

TRUE

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Arguments Predicates and Quanti ers

Propositional Calculus (cont...)

Truth Value of a Quanti ed Statement Example 1

Let D

= {1, 2, 3, 4, 5}

and consider the statement

∀x ∈ D , x 2 ≥ x .

TRUE 2 3 4

Consider the statement Consider the statement

= {5, 6, 7, 8} = m.

Let E m

2

∀x ∈ R, x 2 ≥ x .

∃m ∈ Z

+

FALSE

and consider the

sablay-logo

2

= m. TRUE statement ∃m ∈ E such

such that m

that

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Arguments Predicates and Quanti ers

Propositional Calculus (cont...)

Truth Value of a Quanti ed Statement Example 1

Let D

= {1, 2, 3, 4, 5}

and consider the statement

∀x ∈ D , x 2 ≥ x .

TRUE 2 3 4

Consider the statement Consider the statement

= {5, 6, 7, 8} = m. FALSE

Let E m

2

∀x ∈ R, x 2 ≥ x .

∃m ∈ Z

+

FALSE

and consider the

sablay-logo

2

= m. TRUE statement ∃m ∈ E such

such that m

that

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Validity of Arguments with Quanti ed Statements Using diagrams to show validity Example All human beings are mortal. Zeus is not mortal.

sablay-logo

Therefore, Zeus is not a human being.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Validity of Arguments with Quanti ed Statements Using diagrams to show invalidity Example All human beings are mortal. Felix is mortal.

sablay-logo

Therefore, Felix is a human being.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Validity of Arguments with Quanti ed Statements Using rules of inference and/or logical equivalences Example All the triangles are blue. If an object is to the right of all the squares, then it is above all the

sablay-logo

circles. If an object is not to the right of all the squares, then it is not blue. Therefore, all the triangles are above all the circles.

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Validity of Arguments with Quanti ed Statements Using rules of inference and/or logical equivalences Let T (x ) be "x is a triangle";

( ) be "x is a square"; R (x , y ) be "x is to the right

( ) be "x is blue"; ( ) be "x is a circle"; A(x , y ) be "x is above

B x

S x

C x

of y";

y".

sablay-logo

All the triangles are blue.

∀x , {T (x ) ⇒ B (x )} If an object is to the right of all the squares, it is above all the circles.

∀x , {∀y (S (y ) ⇒ R (x , y )) ⇒ ∀z (C (z ) ⇒ A(x , z ))} If an object is not to the right of all the squares, then it is not blue.

∀x , {¬ (∀y (S (y ) ⇒ R (x , y ))) ⇒ ¬B (x )} Therefore, all the triangles are above all the circles.

updilseal

dcs-logo

∀x , {T (x ) ⇒ ∀z (C (z ) ⇒ A(x , z ))} Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

Now try this ... Prove that the sum of two even integers is even.

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Arguments Predicates and Quanti ers

On ambiguity ...

sablay-logo

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Propositional Calculus (cont...)

Questions?

sablay-logo

See you next meeting!

updilseal

dcs-logo

Discrete Mathematics for Computer Science

CS 30

acl-logo


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.