1 / 18

Propositional Logic (section 1.1)

Propositional Logic (section 1.1). January 12, 2009. Logical Operators. Negation operator Conjunction (and, v) Disjunction (or ^ ) Conditional statement  Biconditional statement  (less important) Exclusive Or. Conjunction: p ^ q is true when both p and q are true. False otherwise

brita
Download Presentation

Propositional Logic (section 1.1)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Propositional Logic(section 1.1) January 12, 2009

  2. Logical Operators • Negation operator • Conjunction (and, v) • Disjunction (or ^ ) • Conditional statement  • Biconditional statement  • (less important) Exclusive Or

  3. Conjunction: p ^ q is true when both p and q are true. False otherwise • Disjunction: p v q is false when both p and q are false. True otherwise • Conditional Statement: p q is false when p is true and q is false. True otherwise • Biconditional Statement: p  q is true when p, q have the same truth value. False otherwise • Exclusive Or is true when exactly one of p, q is true. False otherwise

  4. Precedence of Logical Operators • Negation • Conjunction (^) • Disjunction (v) • Conditional Statement • Biconditional Statement

  5. Compound Propositions • We can use logical operators to build compound propositions and evaluate their truth values p q T T T T F F F T F F F F

  6. Translating English to logical Expressions Why? English is often ambiguous and translating sentences into compound propositions removes the ambiguity. Using logical expressions, we can analyze them and determine their truth values. And we can use rules of inferences to reason about them.

  7. Example “ You can access the internet from campus only if you are a computer science major or you are not a freshman. p : “You can access the internet from campus” q : “You are a computer science major” r : “You are freshmen” p  ( q v ~r )

  8. System Specification • Translating sentences in natural language into logical expressions is an essential part of specifying both hardware and software systems. • Consistency of system specification. • Example: (on page 12) Express the specification “The automated reply cannot be sent when the file system is full”

  9. Let p denote “The automated reply can be sent” • Let q denote “The file system is full” The logical expression for the sentence “The automated reply cannot be sent when the file system is full” is

  10. A more complicated example: (on page 12) Determine whether these system specifications are consistent: 1. The diagnostic message is stored in the buffer or it is retransmitted. 2. The diagnostic message is not stored in the buffer. 3. If the diagnostic message is stored in the buffer, then it is retransmitted.

  11. Let p denote “The diagnostic message is stored in the buffer” • Let q denote “The diagnostic message is retransmitted” The three specifications are

  12. If we add one more requirement “The diagnostic message is not retransmitted” The new specifications now are This is inconsistent! No truth values of p and q will make all the above statements true.

  13. Propositional Equivalence (1.2) • A compound proposition is a tautology if it is always true. • A compound proposition is a contradiction if it is always false. • A compound proposition is called a contingency if it is neither a tautology or a contradiction.

  14. Examples Which is a tautology? And which is a contradiction?

  15. Logical Equivalence Two compound propositions p, q, are called logically equivalent if p  q is a tautology. It is denoted as One way to verify a logical equivalence is by examining truth tables.

  16. Examples

  17. De Morgan’s Law • The first example above is known as the De Morgan’s law

  18. Example • Express the negation of “Heather will go to the concert or Steve will go to the concert” Heather will not go to the concert AND Steve will not go to the concert.

More Related