Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Statements and Operations Statements and operators can be combined in any way to form new statements. PQ PQPQPQPQ  (P  Q) (  P)  (  Q) TTTFF.

Similar presentations


Presentation on theme: "1 Statements and Operations Statements and operators can be combined in any way to form new statements. PQ PQPQPQPQ  (P  Q) (  P)  (  Q) TTTFF."— Presentation transcript:

1 1 Statements and Operations Statements and operators can be combined in any way to form new statements. PQ PQPQPQPQ  (P  Q) (  P)  (  Q) TTTFF TFFTT FTFTT FFFTT

2 2 Exercises To take discrete mathematics, you must have taken calculus or a course in computer science.To take discrete mathematics, you must have taken calculus or a course in computer science. When you buy a new car from Toyota Motor Company, you get SAR2000 back in cash or a 2% car loan.When you buy a new car from Toyota Motor Company, you get SAR2000 back in cash or a 2% car loan. School is closed if more than 2 feet of snow falls or if the wind chill is below -100.School is closed if more than 2 feet of snow falls or if the wind chill is below -100.

3 3 Exercises –P: take discrete mathematics –Q: take calculus –R: take a course in computer science P  Q  RP  Q  R Problem with proposition RProblem with proposition R –What if I want to represent “take COSC 222”? To take discrete mathematics, you must have taken calculus or a course in computer science.To take discrete mathematics, you must have taken calculus or a course in computer science.

4 Exercises –P: buy a car from Toyota Motor Company –Q: get SAR2000 cash back –R: get a 2% car loan P  Q  RP  Q  R Why use XOR here? – example of ambiguity of natural languagesWhy use XOR here? – example of ambiguity of natural languages When you buy a new car from Toyota Motor Company, you get SAR2000 back in cash or a 2% car loan.When you buy a new car from Toyota Motor Company, you get SAR2000 back in cash or a 2% car loan.

5 Exercises –P: School is closed –Q: 2 meters of snow falls –R: wind chill is below -100 Q  R  PQ  R  P Precedence among operators:Precedence among operators: , , , ,  School is closed if more than 2 meters of snow falls or if the wind chill is below -100.School is closed if more than 2 meters of snow falls or if the wind chill is below -100.

6 Compound Statement Example

7  If p=>q is an implication, then its converse is the implication q => p and its contrapositive is the implication ~ q => ~p and its contrapositive is the implication ~ q => ~p E.g. E.g. Give the converse and the contrapositive of the implication “If it is raining, then I get wet” Converse: If I get wet, then It is raining. Converse: If I get wet, then It is raining. Contrapositive: If I do not get wet, then It is not raining. Converse and Contrapositive 7

8 Equivalent Statements PQ  (P  Q) (  P)  (  Q)  (P  Q)  (  P)  (  Q) TTFFT TFTTT FTTTT FFTTT The statements  (P  Q) and (  P)  (  Q) are logically equivalent, since they have the same truth table, or put it in another way,  (P  Q)  (  P)  (  Q) is always true.

9 9 Tautologies and Contradictions A tautology is a statement that is always true. Examples: –R  (  R) –  (P  Q)  (  P)  (  Q) A contradiction or Absurdity. is a statement that is always false. Examples: –R  (  R) –  (  (P  Q)  (  P)  (  Q)) The negation of any tautology is a contradiction, and the negation of any contradiction is a tautology.

10 A statement that can be either true or false, depending on the truth values of its propositional variables, is called a contingency. Example A statement that can be either true or false, depending on the truth values of its propositional variables, is called a contingency. Example The statement (p ⇒ q) ∧ (p ∨ q) is a Contingency Contingency


Download ppt "1 Statements and Operations Statements and operators can be combined in any way to form new statements. PQ PQPQPQPQ  (P  Q) (  P)  (  Q) TTTFF."

Similar presentations


Ads by Google