cpsc 121 models of computation
play

CPSC 121: Models of Computation Use truth tables to establish or - PowerPoint PPT Presentation

Pre-Class Learning Goals By the start of this class you should be able to CPSC 121: Models of Computation Use truth tables to establish or refute the validity of a rule of inference. Given a rule of inference and propositional logic


  1. Pre-Class Learning Goals  By the start of this class you should be able to CPSC 121: Models of Computation  Use truth tables to establish or refute the validity of a rule of inference.  Given a rule of inference and propositional logic statements that correspond to the rule's premises, apply the rule to infer a new statement implied by the original statements. Unit 4 Propositional Logic Proofs Based on slides by Patrice Belleville and Steve Wolfman Unit 4 - Propositional Proofs 2 Quiz 4 Feedback: In-Class Learning Goals  Overall:  By the end of this unit, you should be able to  Determine whether or not a propositional logic proof is valid,  Issues: and explain why it is valid or invalid.  Explore the consequences of a set of propositional logic statements by application of equivalence and inference rules, especially in order to massage statements into a desired form.  Devise and attempt multiple different, appropriate strategies for proving a propositional logic statement follows from a list or premises.  We will discuss the open-ended question soon. Unit 4 - Propositional Proofs Unit 4 - Propositional Proofs 3 4 1

  2. Where We Are in The Big Stories What is Proof?  Theory:  A rigorous formal argument that demonstrates the truth of a proposition, given the truth of the proof’s  How can we convince ourselves that an algorithm does what it's supposed to do? premises.  In general  In other words:  We need to prove that it works.  A proof is used to convince other people (or yourself) of the truth of a conditional proposition.  Every step must be well justified.  We have done a few proofs last week.  Writing a proof is a bit like writing a function:  you do it step by step, and  Now we will learn  make sure that you understand how each step relates to the  How to decide if a proof is valid in a formal setting. previous steps.  How to write proofs in English. Unit 4 - Propositional Proofs Unit 4 - Propositional Proofs 5 6 Things we'd like to prove What is a Propositional Logic Proof  We can build a combinational circuit matching any  A propositional logic proof consists of a sequence of truth table. propositions, where each proposition is one of  a premise  We can build any digital logic circuit using only 2-input  the result of applying a logical equivalence or a rule of NOR gates. inference to one or more earlier propositions.  The maximum number of swaps we need to order n and whose last proposition is the conclusion. students is n(n-1)/2.  No general algorithm exists to sort n values using  These are good starting point, because they are fewer than n log 2 n comparisons. simpler than the more free-form proofs we will discuss  There are problems that no algorithm can solve. later  Only a limited number of choices at each step. Unit 4 - Propositional Proofs Unit 4 - Propositional Proofs 7 8 2

  3. Meaning of Proof Meaning of Proof A. Premise- 1 ˄ … ˄ Premise - n ˄  Suppose you  What does it mean?  What does this argument mean? proved this: Conclusion A. Premises 1 to n can be Premise-1 B. Premise- 1 ˅ … ˅ Premise - n ˅ true Premise-1 Premise-2 Conclusion Premise-2 B. Premises 1 to n are true ... C. Premise- 1 ˄ … ˄ Premise - n → ... Premise-n C. Conclusion can be true Conclusion Premise-n ------------------ D. Conclusion is true D. Premise- 1 ˄ … ˄ Premise - n ↔ ------------------  Conclusion  Conclusion E. None of the above. Conclusion E. None of the above. Unit 4 - Propositional Proofs Unit 4 - Propositional Proofs 9 10 Why do we want valid rules? Basic Rules of Inference Modus Ponens: p → q Modus Tollens: p → q ~p______ p ~q  ~(p v q) q ~p p ˄ q p ˄ q Generalization: p p Specialization: p ˅ q q → p p q This is valid by generalization (p  p v q). a. p ˅ q p ˅ q b. This is valid because anytime ~p is true, ~(p v q) is Conjunction: p Elimination: q ~p ~q also true. p ˄ q q p c. This is valid by some other rule. p → q p ˅ q Transitivity: Proof by cases: q → r p → r This is invalid because when p = F and q = T, ~p is d. p → r q → r true but ~(p v q) is false. r p → F None of these. Contradiction: e. ~p Unit 4 - Propositional Proofs 13 14 3

  4. Onnagata Problem from Online Quiz #4 Onnagata Problem  Critique the following argument, drawn from an article Which definitions should we use? by Julian Baggini on logical fallacies. a) w = women, m = men, f = femininity, m = masculinity, o =  Premise 1 : If women are too close to femininity to portray onnagata, c = correct women then men must be too close to masculinity to play b) w = women are too close to femininity, m = men are too men, and vice versa. close to masculinity, pw = women portray women, pm =  Premise 2 : And yet, if the onnagata are correct, women are men portray men, o = onnagata are correct too close to femininity to portray women and yet men are not c) w = women are too close to femininity to portray women, too close to masculinity to play men. m = men are too close to masculinity to portray men, o =  Conclusion : Therefore, the onnagata are incorrect, and onnagata are correct women are not too close to femininity to portray women. d) None of these, but another set of definitions works well.  Note: onnagata are male actors portraying female e) None of these, and this problem cannot be modeled well characters in kabuki theatre. with propositional logic. Unit 4 - Propositional Proofs Unit 4 - Propositional Proofs 15 16 Onnagata Problem Onnagata Problem  Which of these is not an accurate translation of one of  Do the two premises contradict each other (that is, is the statements? p1 ˄ p2 ≡ F )? A. w  m A. Yes B. (w  m)  (m  w) B. No C. o  (w  ~m) C. Not enough information to tell D. ~o  ~w E. All of these are accurate translations.  Is the argument valid?  So, the argument is:  A: Yes  B: No  C: ? Unit 4 - Propositional Proofs Unit 4 - Propositional Proofs 17 18 4

  5. Onnagata Problem Proof Strategies  What can we prove?  Look at the information you have  Can we prove that the Onnagata are wrong.  Is there irrelevant information you can ignore?  Is there critical information you should focus on? A. Yes  Work backwards from the end B. No C. Not enough information  Especially if you have made some progress but are missing a step or two.  Can we prove that women are not too close to  Don't be afraid of inferring new propositions, even if femininity to portray women? you are not quite sure whether or not they will help you A. Yes get to the conclusion you want. B. No C. Not enough information  What other scenario is consistent with the premises? Unit 4 - Propositional Proofs Unit 4 - Propositional Proofs 19 20 Proof strategies (continued) Example  To prove:  What will the strategy be?  If you are not sure of the conclusion, alternate ~(q  r) A. Derive ~u so you can derive between ~s (u  q)  s B. Derive u  q so you can get  trying to find an example that shows the statement is false, ~s  ~p___ using the place where your proof failed to help you design s the counterexample  ~p C. Derive ~s by deriving first  trying to prove it, using your failed counterexample to help ~(u  q) you write the proof. D. Any of the above will work E. None of the above will work Unit 4 - Propositional Proofs Unit 4 - Propositional Proofs 21 22 5

  6. ~(q  r) ~(q  r) (u  q)  s (u  q)  s Example (cont') Example (cont') ~s  ~p___ ~s  ~p___  ~p  ~p Proof: Proof:  What is in step 8?  Which rule was used in step 8? 1. ~(q  r) A. u  q 1. ~(q  r) Premise Premise 2. (u  q)  s 2. (u  q)  s Premise Premise A. modus ponens B. ~u  ~q 3. ~s  ~p 3. ~s  ~p Premise Premise 4. ~q  ~r 4. ~q  ~r De Morgan’s (1) De Morgan’s (1) B. De Morgan's C. s 5. ~q Specialization (4) 5. ~q Specialization (4) 6. ((u  q)  s)  Bicond (2) 6. ((u  q)  s)  Bicond (2) C. modus tollens D. ~s (s  (u  q)) (s  (u  q)) 7. s  (u  q) 7. s  (u  q) D. generalization Specialization (6) Specialization (6) E. None of the above 8. ???? ???? 8. ???? ???? 9. ~(u  q) 9. ~(u  q) E. None of the above ???? ???? 10. ~s Modus tollens (7, 9) 10. ~s Modus tollens (7, 9) 11. ~p Modus ponens (3,10) 11. ~p Modus ponens (3,10) Unit 4 - Propositional Proofs Unit 4 - Propositional Proofs 23 24 ~(q  r) (u  q)  s Example (cont') Another Example ~s  ~p___  ~p Proof:  Which rule was used  Prove the following argument: in step 9? p 1. ~(q  r) Premise p → r 2. (u  q)  s Premise A. modus ponens p → (q ˅ ~r) 3. ~s  ~p Premise 4. ~q  ~r De Morgan’s (1) ~q ˅ ~s B. De Morgan's 5. ~q Specialization (4)  s 6. ((u  q)  s)  Bicond (2) C. modus tollens (s  (u  q)) 7. s  (u  q) Specialization (6) D. generalization 8. ???? ???? 9. ~(u  q) E. None of the above ???? 10. ~s Modus tollens (7, 9) 11. ~p Modus ponens (3,10) Unit 4 - Propositional Proofs Unit 4 - Propositional Proofs 25 26 6

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend