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.

Slides:



Advertisements
Similar presentations
1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: The Moon is made of green cheese. Trenton.
Advertisements

CS128 – Discrete Mathematics for Computer Science
2.2 Conditional Statements. Goals Identify statements which are conditional Identify the antecedent and consequent of a conditional statement Negate conditional.
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Discrete Mathematics Math 6A Instructor: M. Welling.
CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.
First Order Logic. Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not.
Chapter 2: The Logic of Compound Statements 2.1 Logical Forms and Equivalence 12.1 Logical Forms and Equivalences Logic is a science of the necessary laws.
Adapted from Discrete Math
Chapter 1 -- The Foundations: Logic and Proof, Sets and Functions
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
Elementary Logic PHIL Intersession 2013 MTWHF 10:00 – 12:00 ASA0118C Steven A. Miller Day 4.
Conjunctions, Disjunctions, and Negations Symbolic Logic 2/12/2001.
The Foundations: Logic and Proofs
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
Propositions and Truth Tables
Propositions and Truth Tables. Proposition: Makes a claim that may be either true or false; it must have the structure of a complete sentence.
Section 1.5 Implications. Implication Statements If Cara has a piano lesson, then it is Friday. If it is raining, then I need to remember my umbrella.
The Foundations: Logic and Proofs
Section 1-4 Logic Katelyn Donovan MAT 202 Dr. Marinas January 19, 2006.
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
Discrete Mathematics and Its Applications
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Ch.1 (Part 1): The Foundations: Logic and Proofs Introduction.
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
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Chapter 1 Section 1.2 Symbolic Logic. Sentences vs Statements A truth value is one of two words either true (T) or false (F). A statement is a particular.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
Chapter 2: The Logic of Compound Statements 2.2 Conditional Statements
Lecture 4. CONDITIONAL STATEMENTS: Consider the statement: "If you earn an A in Math, then I'll buy you a computer." This statement is made up of two.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
LOGIC Lesson 2.1. What is an on-the-spot Quiz  This quiz is defined by me.  While I’m having my lectures, you have to be alert.  Because there are.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
Chapter 1: The Foundations: Logic and Proofs
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Section 1.1 Propositions and Logical Operations. Introduction Remember that discrete is –the study of decision making in non-continuous systems. That.
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
LECTURE 1. Disrete mathematics and its application by rosen 7 th edition THE FOUNDATIONS: LOGIC AND PROOFS 1.1 PROPOSITIONAL LOGIC.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
TRUTH TABLES Edited from the original by: Mimi Opkins CECS 100 Fall 2011 Thanks for the ppt.
Conditional statement or implication IF p then q is denoted p ⇒ q p is the antecedent or hypothesis q is the consequent or conclusion ⇒ means IF…THEN.
Section 1.3 Implications. Vocabulary Words conditional operation ( ⇒ or →) conditional proposition conditional statement (implication statement) hypothesis.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
CS104 The Foundations: Logic and Proof 1. 2 What is Discrete Structure?  Discrete Objects  Separated from each other (Opposite of continuous)  e.g.,
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Chapter 1 Logic and proofs
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Simple Logic.
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
CSNB 143 Discrete Mathematical Structures
CS 202, Spring 2008 Epp, sections 1.1 and 1.2
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
Logic.
COT 3100, Spr Applications of Discrete Structures
Ch.1 (Part 1): The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Chapter 8 Logic Topics
Information Technology Department
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
Discrete Mathematics and Its Applications Kenneth H
MAT 3100 Introduction to Proof
The Foundations: Logic and Proofs
Presentation transcript:

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 is President of the United States –CS1 is a prerequisite for this class –I am breathing

3 Many statements are not propositions... Give me liberty or give me death ax 2 + bx + c = 0 See Spot run Who am I and why am I here?

4 Representing propositions Can use letter to represent proposition; think of letter as logical variable Typically use p to represent first proposition, q for second, r for third, etc. Truth value of a proposition is T (true) or F(false)

5 Negation Logical opposite of a proposition If p is a proposition, not p is its negation Not p is usually denoted: pp

6 Truth table Graphical display of relationships between truth values of propositions Shows all possible values of propositions, or combinations of propositions p  p T F F T

7 Logical Operators Negation is an example of a logical operation; the negation operator is unary, meaning it operates on one logical variable (like unary arithmetic negation) Connectives are operators that operate on two (or more) propositions

8 Conjunction Conjunction of 2 propositions is true if and only if both propositions are true Denoted with the symbol  If p and q are propositions, p  q means p AND q Remember -  looks like A for And

9 Examples Letp = = 4 q = “It is raining” r = “ I am in class now” What is the value of: p  q p  r r  q  p  r  p   r  (p  r)

10 Truth table for p  q pq p  q TT T TF F FT F FF F

11 Disjunction Disjunction of two propositions is false only if both propositions are false Denoted with this symbol:  If p and q are propositions, p  q means p OR q Mnemonic:  looks like OAR in the water (sort of)

12 Examples Letp = = 4 q = “It is raining” r = “ I am in class now” What is the value of: p  q p  r r  q  p  r  p   r  (p  r)

13 Truth table for disjunction pq p  q TT T TF T FT T FF F

14 Inclusive vs. exclusive OR Disjunction means or in the inclusive sense; includes the possibility that both propositions are true, and can be true at the same time For example, you may take this class if you have taken Calculus I or you have the instructor’s permission - in other words, you can take it if you have either, or both

15 Exclusive OR The exclusive or of two propositions is true when exactly one of the propositions is true, false otherwise Exclusive or is denoted with this symbol:  For p and q, p  q means p XOR q Mnemonic:  looks like sideways X inside an O

16 English examples I am either in class or in my office The meal comes with soup or salad You can have your cake or you can eat it

17 Examples Letp = = 4 q = “It is raining” r = “ I am in class now” What is the value of: p  q p  r r  q  p  r  p   r  (p  r)

18 Truth table for  pq p  q TT F TF T FT T FF F

19 Implication The implication of two propositions depends on the ordering of the propositions The first proposition is calls the premise (or hypothesis or antecedent) and the second is the conclusion (or consequence) An implication is false when the premise is true but the conclusion is false, and true in all other cases

20 Implication Implication is denoted with the symbol  For p and q, p  q can be read as: –if p then q –p implies q –q if p –p only if q –q whenever p –q is necessary for p –p is sufficient for q –if p, q

21 Implication Note that a false premise always leads to a true implication, regardless of the truth value of the conclusion Implication does not necessarily mean a cause and effect relationship between the premise and the conclusion

22 Implications in English If Cate lives in Iowa, then Discrete Math is a 3-credit class Since p (I live in Iowa) and q (this is a 3- credit class) are both true, p  q is true even though p and q are unrelated statements

23 Implications in English If the sky is brown, then 2+2=5 Since p (sky is brown) and q (2+2=5) are both false, the implication p  q is true Remember, you can conclude anything from a false premise

24 If/then vs. implication In programming, the if/then logic structure is not the same as implication, though the two are related In a program, if the premise (if expression) is true, the statements following the premise will executed, otherwise not There is no “conclusion,” so it’s not an implication

25 Examples Letp = = 4 q = “It is raining” r = “ I am in class now” What is the value of: p  q p  r r  q  p  r  p   r  (p  r)

26 Truth table for  pq p  q TT T TF F FT T FF T

27 Converse & contrapositive For the implication p  q, the converse is q  p For the implication p  q, the contrapositive is  q   p

28 Biconditional A biconditional is a proposition that is true when p and q have the same truth values (both true or both false) For p and q, the biconditional is denoted as p  q, which can be read as: –p if and only if q –p is necessary and sufficient for q –if p then q, and conversely

29 Examples Letp = = 4 q = “It is raining” r = “ I am in class now” What is the value of: p  q p  r r  q  p  r  p   r  (p  r)

30 Truth table for  pq p  q TT T TF F FT F FF T

31 Compound propositions Can build compound propositions by combining simple propositions using negation and connectives Use parentheses to specify order or operations Negation takes precedence over connectives

32 Examples Letp = = 4 q = “It is raining” r = “ I am in class now” What is the value of: (p  q)  ( p  r) (r  q)  (  p  r)  (p   r)   (p  r)

33 Logic & Bit Operations A bit string is a sequence of 1s and 0s - the number of bits in the string is the length of the string Bit operations correspond to logical operations with 1 representing T and 0 representing F

34 Bit operation examples Let s1 = s2 = s1 OR s2 = s1 AND s2 = s1 XOR s2 =

35 Section 1.1 Logic - ends -