truth tables
play

Truth Tables or F to each propositional variable. Computer - PowerPoint PPT Presentation

Truth Assignments A truth assignment assigns a value T Truth Tables or F to each propositional variable. Computer scientists call assignment Equivalence of values to variables an environment. If we know the environment, we can find the value


  1. Truth Assignments A truth assignment assigns a value T Truth Tables or F to each propositional variable. Computer scientists call assignment Equivalence of values to variables an environment. If we know the environment, we can find the value of a propositional Validity formula. February 14, 2014 truth-tables.1 February 14, 2014 truth-tables.2 Albert R Meyer Albert R Meyer Equivalence Evaluation in an Environment Example: Suppose environment, v, assigns Two propositional formulas are v(P) = T, v(Q)= T, v(R) = F. equivalent Truth value of ( NOT (P AND Q) ) OR (R XOR NOT (Q)) iff they have the same truth F T T T F T F F value in all environments. F truth-tables.3 truth-tables.4 February 14, 2014 February 14, 2014 Albert R Meyer Albert R Meyer 1

  2. DeMorgan’s Law DeMorgan’s Law Q equiv to P AND Q P OR Q equiv to P Q P OR AND P Q P AND Q AND (P OR Q) NOT (P OR Q) P Q NOT P Q F F F F F F F F F T T F T T T F F T F F F T F F T F F T F F T T F F F F T F F F T F T F F F T F F F T F F F T F T T F F T T T T F F T T T T T T T F T F Same final column, so equivalent -- proof by Truth Table February 14, 2014 truth-tables.5 February 14, 2014 truth-tables.6 Albert R Meyer Albert R Meyer Definition of IFF Satisfiability & Validity The value of (P IFF Q) is T iff P and Q have the same truth value. A formula is satisfiable iff it Truth Table for IFF is true in some environment. P Q P IFF Q P Q P IFF Q T T T T T T A formula is valid iff it is T F F T F F true in all environments. F T F F T F F F T F F T truth-tables.7 truth-tables.8 February 14, 2014 February 14, 2014 Albert R Meyer Albert R Meyer 2

  3. Satisfiability & Validity Equivalence & Validity G and H are equivalent satisfiable: P, NOT (P) exactly when (P AND NOT (P)) not satisfiable: valid: (P OR NOT (P)) (G IFF H) is valid February 14, 2014 truth-tables.10 February 14, 2014 truth-tables.11 Albert R Meyer Albert R Meyer Verifying Valid, Satisfiable Efficient Test for Satisfiability? Truth table size doubles with The P = NP? question is equivalent each additional variable to asking if there is an “efficient” --exponential growth. Makes (polynomial rather than truth tables impossible when exponential time) procedure there are hundreds of variables. to check satisfiability. (In current digital circuits, there are millions of variables.) truth-tables.12 truth-tables.13 February 14, 2014 February 14, 2014 Albert R Meyer Albert R Meyer 3

  4. SAT versus VALID To check that G is valid, can check that NOT (G) is not satisfiable. So checking for one is equally difficult (or easy) as checking for the other. February 14, 2014 truth-tables.14 Albert R Meyer 4

  5. MIT OpenCourseWare http://ocw.mit.edu 6.042J / 18.062J Mathematics for Computer Science Spring 20 15 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Recommend


More recommend