Statements and Operations Statements and operators can be
Statements and Operations Statements and operators can be combined in any way to form new statements. P Q T T F F T F P Q (P Q) ( P) ( Q) T F F T T T 1
Exercises • 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 SAR 2000 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. 2
Exercises • To take discrete mathematics, you must have taken calculus or a course in computer science. – P: take discrete mathematics – Q: take calculus – R: take a course in computer science • P Q R • Problem with proposition R – What if I want to represent “take COSC 222”? 3
Exercises • When you buy a new car from Toyota Motor Company, you get SAR 2000 back in cash or a 2% car loan. – P: buy a car from Toyota Motor Company – Q: get SAR 2000 cash back – R: get a 2% car loan • P Q R • Why use XOR here? – example of ambiguity of natural languages
Exercises • School is closed if more than 2 meters of snow falls or if the wind chill is below -100. – P: School is closed – Q: 2 meters of snow falls – R: wind chill is below -100 • Q R P • Precedence among operators: , ,
Compound Statement Example
Converse and Contrapositive �If p=>q is an implication, then its converse is the implication q => p and its contrapositive is the implication ~ q => ~p 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. Contrapositive: If I do not get wet, then It is not raining. 7
Equivalent Statements P Q T T F F T F (P Q) ( P) ( Q) F T T 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.
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. 9
Contingency 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
- Slides: 10