COT 3100, Spr Applications of Discrete Structures

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

CSE 311: Foundations of Computing Fall 2013 Lecture 3: Logic and Boolean algebra.
Foundations of Logic Mathematical Logic is a tool for working with elaborate compound statements. It includes: A formal language for expressing them.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Section 1.1 Logic. 2 Proposition Statement that is either true or false –can’t be both –in English, must contain a form of “to be” Examples: –Cate Sheller.
Introduction to Logic Sections 1.1 and 1.2 of Rosen Fall 2010 CSCE 235 Introduction to Discrete Structures URL: cse.unl.edu/~cse235 Questions:
Introduction to Logic Logical Form: general rules
CSE 311 Foundations of Computing I Autumn 2011 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence.
Logical Equivalence & Predicate Logic
Propositions and Truth Tables
The Foundations: Logic and Proofs
2009/9 1 Logic and Proofs §1.1 Introduction §1.2 Propositional Equivalences §1.3 Predicates and Quantifiers §1.4 Nested Quantifiers §1.5~7 Methods of Proofs.
Discrete Maths 2. Propositional Logic Objective
2009/9 1 Logic and Proofs §1.1 Introduction §1.2 Propositional Equivalences §1.3 Predicates and Quantifiers §1.4 Nested Quantifiers §1.5~7 Methods of.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Ch.1 (Part 1): The Foundations: Logic and Proofs Introduction.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
1 Propositional Logic Rosen 5 th ed., § Foundations of Logic: Overview Propositional logic:Propositional logic: –Basic definitions. –Equivalence.
Propositional Logic Foundations of Logic: Overview Propositional logic (§ ): – Basic definitions. (§1.1) – Equivalence rules & derivations. (§1.2)
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Chapter 1: The Foundations: Logic and Proofs
Review I Rosen , 3.1 Know your definitions!
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Chapter 1: The Foundations: Logic and Proofs
The Foundations: Logic and Proof, Sets, and Foundations PROPOSITIONS A proposition is a declarative sentence that is either True or False, but not the.
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Module #1 - Logic 2016/7/91 Module #1: Logic (Textbook: §1.1~1.4) Dr. Chih-Wei Yi Department of Computer Science National Chiao Tung University.
Propositional Logic. Logic Logic: the science of reasoning, proof, thinking or inference. Logic allows us to analyze a piece of reasoning and determine.
Logic I 권태경 To do so, it should include a language to express statements, a notation to simplify expressions. Logic Mathematical Logic.
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
2. The Logic of Compound Statements Summary
The Foundations: Logic and Proofs
Discrete Mathematics Lecture 1 Logic of Compound Statements
CSNB 143 Discrete Mathematical Structures
CSCE 235 Introduction to Discrete Structures
CS 202, Spring 2008 Epp, sections 1.1 and 1.2
6/20/2018 Discrete Math A word about organization: Since different courses have different lengths of lecture periods, and different instructors go at different.
6/20/2018 Arab Open University Faculty of Computer Studies M131 - Discrete Mathematics 6/20/2018.
(CSC 102) Discrete Structures Lecture 2.
CPCS222 Discrete Structures I
Ch.1 (Part 1): The Foundations: Logic and Proofs
Mathematics for Computing
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
CSCI 3310 Mathematical Foundation of Computer Science
Administrivia Course Web:
Propositional Equivalences
Information Technology Department
Propositional Equivalence (§1.2)
CS 220: Discrete Structures and their Applications
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
Lecture 2: Propositional Equivalences
Cs Discrete Mathematics
Foundations of Discrete Mathematics
The Foundations: Logic and Proofs
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Discrete Structures Prepositional Logic 2
The Foundations: Logic and Proofs
Presentation transcript:

COT 3100, Spr. 2001 Applications of Discrete Structures Section #1089X - MWF 4th period Dr. Michael P. Frank Lecture #3 Fri., Jan. 12, 2001 1/12/01 Lecture #3

Administrivia Team assignments. Return graded pre-tests. HW#1 will be available@4pm. Due Thu. 5pm! Harris @ career expo Jan. 23+24. Today: Continue §1.1: xor, implies, biconditional, alternative notations, bits and bit strings. Start §1.2: Simple equivalences. 1/12/01 Lecture #3

Review: The Negation Operator The unary negation operator “¬” (NOT) transforms a proposition into its negation. E.g. If p = “I have brown hair.” then ¬p = “I do not have brown hair.” Truth table for NOT: 1/12/01 Lecture #3

Review: Conjunction Truth Table Note that a conjunction p1  p2  …  pn of n propositions will have 2n rows in its truth table. ¬ and  operations together are universal -sufficient to express any truth table! 1/12/01 Lecture #3

Review: Disjunction Truth Table Note that pq means that p is true, or q is true, or both are true! So this operation is also called inclusive or, because it includes the possibility that both p and q are true. “¬” and “” together are also universal. 1/12/01 Lecture #3

The Exclusive Or Operator The binary exclusive-or operator “” (XOR) combines two propositions to form their logical “exclusive or” (exjunction?). p = “I will earn an A in this course,” q = “I will drop this course,” p  q = “I will either earn an A for this course, or I will drop it (but not both!)” 1/12/01 Lecture #3

Exclusive-Or Truth Table Note that pq means that p is true, or q is true, but not both! This operation is called inclusive or, because it excludes the possibility that both p and q are true. “¬” and “” together are not universal. 1/12/01 Lecture #3

Natural Language is Ambiguous Note that English “or” is ambiguous regarding the “both” case! “Pat is a singer or Pat is a writer.” - “Pat is a man or Pat is a woman.” - Need context to disambiguate the meaning! For this class, assume “or” means inclusive.   1/12/01 Lecture #3

The Implication Operator The implication p  q states that p implies q. I.e., If p is true, then q is true; but if p is not true, then q could be either true or false. E.g., p=“You study hard.” q=“You will get a good grade.” p  q = “If you study hard, then you will get a good grade.” (else, it could go either way) 1/12/01 Lecture #3

Implication Truth Table p  q is false only when p is true but q is not true. p  q does not imply that p causes q! p  q does not imply that p or q are ever true! E.g. “(1=0)  pigs can fly” is TRUE! 1/12/01 Lecture #3

Examples of Implications “If this lecture ends, then the sun will rise tomorrow.” True or False? “If Tuesday is a day of the week, then I am a penguin.” True or False? “If 1+1=6, then Bush won the election.” True or False? “If the moon is made of green cheese, then I am richer than Bill Gates.” True or False? 1/12/01 Lecture #3

English Phrases Meaning p  q “p implies q” “if p, then q” “if p, q” “when p, q” “whenever p, q” “q if p” “q when p” “q whenever p” “p only if q” “p is sufficient for q” “q is necessary for p” “q follows from p” “q is implied by p” We will see some equivalent logic expressions later. 1/12/01 Lecture #3

Converse versus Contrapositive Some terminology: The converse of p  q is: q  p. The contrapositive of p  q is: ¬q  ¬ p. One of these two has the same meaning (same truth table) as p  q. Can you figure out which? Contrapositive 1/12/01 Lecture #3

How do we know for sure? Proving the equivalence of p  q and its contrapositive using truth tables: 1/12/01 Lecture #3

The biconditional operator The biconditional p  q states that p is true if and only if (IFF) q is true. p = “Bush won the election.” q = “Bush will be our next president.” p  q = “If and only if Bush won the election, Bush will be our next president.” 1/12/01 Lecture #3

Biconditional Truth Table p  q means that p and q have the same truth value. Note this truth table is the exact opposite of ’s! p  q means ¬(p  q) p  q does not imply p and q are true, or cause each other. 1/12/01 Lecture #3

Boolean Operations Summary We have seen 1 unary operator (4 possible) and 5 binary operators (16 possible). 1/12/01 Lecture #3

Some Alternative Notations 1/12/01 Lecture #3

Bits and Bit Operations A bit is a binary (base 2) digit: 0 or 1. Bits may be used to represent truth values. By convention: 0 represents “true”; 1 represents “false”. Boolean algebra is like ordinary algebra except that variables stand for bits, + means “or”, and multiplication means “and”. 1/12/01 Lecture #3

Bit Strings A Bit string of length n is an ordered series or sequence of n0 bits. By convention, bit strings are written left to right: e.g. the first bit of “1001101010” is 1. When a bit string represents a base-2 number, by convention the first bit is the most significant bit. Ex. 11012=8+4+1=13. 1/12/01 Lecture #3

Bitwise Operations Boolean operations can be extended to operate on bit strings as well as single bits. E.g.: 01 1011 0110 11 0001 1101 11 1011 1111 Bit-wise OR 01 0001 0100 Bit-wise AND 10 1010 1011 Bit-wise XOR 1/12/01 Lecture #3

End of §1.1 You have learned about: Propositions: What they are. Propositional logic operators’ Symbolic notations. English equivalents. Logical meaning. Truth tables. Atomic vs. compound propositions. Alternative notations. Bits and bit-strings. Next section: §1.2 Propositional equivalences. How to prove them. 1/12/01 Lecture #3

Propositional Equivalence (§1.2) Two syntactically (i.e., textually) different compound propositions may be the semantically identical (i.e., have the same meaning). We call them equivalent. Learn: Various equivalence rules or laws. How to prove equivalences using symbolic derivations. 1/12/01 Lecture #3

Tautologies and Contradictions A tautology is a compound proposition that is true no matter what the truth values of its atomic propositions are! Ex. p  p [What is its truth table?] A contradiction is a comp. prop. that is false no matter what! Ex. p  p [Truth table?] Other comp. props. are contingencies. 1/12/01 Lecture #3

Logical Equivalence Compound proposition p is logically equivalent to compound proposition q, written pq, IFF the compound proposition pq is a tautology. Compound propositions p and q are logically equivalent to each other IFF p and q contain the same truth values as each other in all rows of their truth tables. 1/12/01 Lecture #3

Proving Equivalence via Truth Tables Ex. Prove that pq  (p  q). F T T T F T T F F T T F T F T T F F F T 1/12/01 Lecture #3

Equivalence Laws These are similar to the arithmetic identities you may have learned in algebra, but for propositional equivalences instead. They provide a pattern or template that can be used to match much more complicated propositions and to find equivalences for them. 1/12/01 Lecture #3

Equivalence Laws - Examples Identity: pT  p pF  F Domination: pT  T pF  F Idempotent: pp  p pp  p Double negation: p  p Commutative: pq  qp pq  qp Associative: (pq)r  p(qr) (pq)r  p(qr) 1/12/01 Lecture #3

More Equivalence Laws Distributive: p(qr)  (pq)(pr) p(qr)  (pq)(pr) De Morgan’s: (pq)  p  q (pq)  p  q Trivial tautology/contradiction: p  p  T p  p  F 1/12/01 Lecture #3

Defining Operators via Equivalences Exclusive or: pq  (pq)(pq) pq  (pq)(qp) Implies: pq  p  q Biconditional: pq  (pq)  (qp) pq  (pq) 1/12/01 Lecture #3

TFpqr 1/12/01 Lecture #3