Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.

Slides:



Advertisements
Similar presentations
TRUTH TABLES Section 1.3.
Advertisements

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.
Chapter 2. Logic Weiqi Luo ( 骆伟祺 ) School of Software Sun Yat-Sen University : Office : A309
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
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.
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
Discrete Mathematics Math 6A Instructor: M. Welling.
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.
Predicates and Quantifiers
The Foundations: Logic and Proofs
Intro to Discrete Structures
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.
Section 1-4 Logic Katelyn Donovan MAT 202 Dr. Marinas January 19, 2006.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
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.
Chapter 8 Logic DP Studies. Content A Propositions B Compound propositions C Truth tables and logical equivalence D Implication and equivalence E Converse,
Discrete Mathematics and Its Applications
Lecture for Week Spring.   Introduction to Propositional Logic  Types of Proposition  Operator and Truth table Agenda.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
MATH 102 Contemporary Math S. Rook
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
HAWKES LEARNING Students Count. Success Matters. Copyright © 2015 by Hawkes Learning/Quant Systems, Inc. All rights reserved. Section 3.1 Logic Statements.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Chapter 7 Review Important Terms, Symbols, Concepts 7.1. Logic A proposition is a statement (not a question.
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 1, Part II: Predicate Logic With Question/Answer Animations.
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.
Chapter 7 Logic, Sets, and Counting
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
MLS 570 Critical Thinking Reading Notes for Fogelin: Propositional Logic Fall Term 2006 North Central College.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
How do I show that two compound propositions are logically equivalent?
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
Logical Operations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Logical Operations Reading: Kolman, Section 2.1.
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
TRUTH TABLES. Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of.
Predicate Logic One step stronger than propositional logic Copyright © Curt Hill.
رياضيات متقطعة لعلوم الحاسب 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.
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
 2012 Pearson Education, Inc. Slide Chapter 3 Introduction to Logic.
3/6/20161 Let’s get started with... Logic !. 3/6/20162 Logic Crucial for mathematical reasoningCrucial for mathematical reasoning Used for designing electronic.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Propositional and predicate logic
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.
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
CSNB 143 Discrete Mathematical Structures
6/20/2018 Arab Open University Faculty of Computer Studies M131 - Discrete Mathematics 6/20/2018.
2.1 Propositions and Logical Operations
CMSC Discrete Structures
CHAPTER 1: LOGICS AND PROOF
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Cs Discrete Mathematics
Predicates and Quantifiers
Presentation transcript:

Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine

CSCI 1900 Lecture Lecture Introduction Reading –Rosen - Section 1.1 Logical Statements Logical Connectives / Compound Statements –Negation –Conjunction –Disjunction Truth Tables Quantifiers –Universal –Existential

CSCI 1900 Lecture Statement of Proposition Proposition (statement of proposition) – a declarative sentence that is either true or false, but not both Examples: –Star Trek was a TV series: True –2+3 = 5: True –Do you speak Klingon? This is a question, not a statement

CSCI 1900 Lecture Statement of Proposition (cont) –x - 3 = 5: a declarative sentence, but not a statement since it is true or false depending on the value of x –Take two aspirins: a command, not a statement –The current temperature on the surface of the planet Venus is 800 o F: a proposition of whose truth is unknown to us –The sun will come out tomorrow: a proposition that is either true or false, but not both, although we will have to wait until tomorrow to determine the answer

CSCI 1900 Lecture Notation x, y, z, … denote variables that can represent real numbers p, q, r,… denote propositional variables that can be replaced by statements –p: The sun is shining today –q: It is cold

CSCI 1900 Lecture Negation (Not) If p is a statement, the negation of p is the statement not p Denoted ~p ( alternately: !p or  p or p ) If p is True, –~p is False If p is False, –~p is True not is a unary operator for the collection of statements and ~p is a statement if p is a statement

CSCI 1900 Lecture Negation Truth Table p~ p TF FT

CSCI 1900 Lecture Examples of Negation If p: 2+3 > 1 Then ~p: 2+3 < 1 If q: It is night Then –~q: It is not the case that it is night, It is not night It is day

CSCI 1900 Lecture Conjunction If p and q are statements –The conjunction of p and q is the compound statement “p and q” –Denoted p  q p  q is true only if both p and q are true Example: –p: ETSU parking permits are readily available –q: ETSU has plenty of parking –p  q = ?

CSCI 1900 Lecture Conjunction Truth Table pq p  q TTT TFF FTF FFF

English Conjunctives The following are common conjunctives in English: And, Now, But, Still, So, Only, Therefore, Moreover, Besides, Consequently, Nevertheless, For, However, Hence, Both... And, Not only... but also, While, Then, So then CSCI 1900 Lecture

CSCI 1900 Lecture Disjunction (Inclusive) If p and q are statements, –The (inclusive) disjunction of p and q is the compound statement “p or q” –Denoted p  q p  q is true if either p is true or q is true or both are true Example: –p: I am a male q: I am under 90 years old –p  q = ? –p: I am a male q: I am under 20 years old –p  q = ?

CSCI 1900 Lecture Disjunction (Inclusive) Truth Table pq p  q TTT TFT FTT FFF

CSCI 1900 Lecture Exclusive Disjunction If p and q are statements –The exclusive disjunction true if either p is true or q is true, but not both are true –Denoted p  q Example: –p: It is daytime –q: It is night time –p  q (in the exclusive sense) = ?

CSCI 1900 Lecture Disjunction(Exclusive) Truth Table pq p  q TTF TFT FTT FFF

CSCI 1900 Lecture Exclusive versus Inclusive Depending on the circumstances, some English disjunctions are inclusive and some of exclusive. Examples of Inclusive –“I have a dog” or “I have a cat” –“It is warm outside” or “It is raining” Examples of Exclusive –Today is either Tuesday or it is Thursday –The light is either on or off

CSCI 1900 Lecture Compound Statements A compound statement is a statement made by joining simple propositions with logical connectors For n individual propositions, there are 2 n possible combinations of truth values The truth table contains 2 n rows identifying the truth values for the statement represented by the table Use parenthesis to denote order of precedence  has precedence over  Use parenthesis to ensure meaning is clear

CSCI 1900 Lecture Truth Tables as Tools Compound statements can be easily and systematically investigated with truth tables Assign a portion of the compound statement to a column Final column represents the complete compound statement

CSCI 1900 Lecture Compound Statement Example pq p  q ~p (p  q)  (~p) TTTFT TFFFF FTFTT FFFTT

CSCI 1900 Lecture Quantifiers Recall from Section 1.1, a set may be defined by its properties {x | P(x)} For a specific element e to be a member of the set, P(e) must evaluate to “true” P(x) is called a predicate or a propositional function

CSCI 1900 Lecture Computer Science Functions if P(x) then execute certain steps while Q(x) do specified actions

CSCI 1900 Lecture Universal Quantification Universal quantification of the predicate P(x) means “For all values of x, P(x) is true” Denoted  x P(x) The symbol  is called the universal quantifier The order in which multiple universal quantifications are applied does not matter (e.g.,  x  y P(x,y) ≡  y  x P(x,y) )

CSCI 1900 Lecture Universal Examples: P(x): -(-x) = x –This predicate makes sense for all real numbers x  R –The universal quantification of P(x),  x P(x), is a true statement, because for all real numbers, -(-x) = x Q(x): x+1<4 –  x Q(x) is a false statement, because, for example, Q(5) is not true

CSCI 1900 Lecture Existential Quantification Existential quantification of a predicate P(x) is the statement: “There exists a value of x for which P(x) is true.” Denoted  x P(x) Existential quantification may be applied to several variables in a predicate The order in which multiple existential quantifications are considered does not matter

CSCI 1900 Lecture Existential Examples: P(x): -(-x) = x –The existential quantification of P(x),  x P(x), is a true statement, because there is at least one real number where -(-x) = x Q(x): x+1<4 –  x Q(x) is a true statement, because, for example, Q(2) is true Nota Bene:  is not the complement of  –An Example N(x): x ≠ x  x N(x) is false and  x N(x) is also false

CSCI 1900 Lecture Applying Both  and  Quantifications Order of application matters Example: Let A and B be n x n matrices The statement  A (  B | A + B = I n ) Reads: for every A there is a B such that A + B = I n Prove by coming up for equations for b ii and b ij (j  i) Now reverse the order:  B (  A | A + B = I n) Reads: there exists a B, for all A, such that, A + B = I n The second proposition is F A L S E !

CSCI 1900 Lecture Assigning Quantification - 1 Let p:  x R(x) [R(x): a person is good] –If p is true then  x ~R(x) is false If every person is good, then there does not exist person who is not good –If p is true then  x R(x) is true If every person is good, then there exists a person who is good –If p is false then  x ~R(x) is true If not every person is good, then there exists a person who is not good

CSCI 1900 Lecture Assigning Quantification - 2 Let p:  x R(x) [R(x): a person is good] –If p is true then  x ~R(x) is false If there exists a person who is good, then it is not true that all people are not good –If p is false then  x ~R(x) is true If there does not exist a good person then every person is not good

CSCI 1900 Lecture Implications of the Previous Slide Assume a statement is made that “for all x, P(x) is true” –If we can find one case that is not true The statement is false –If there isn’t one case that is not true The statement is true Example:  positive integers, n,  n P(n) = n 2 - n + 41 is a prime number –This is false because  an integer resulting in a non- prime value, i.e.,  n such that P(n) is false

CSCI 1900 Lecture Key Concepts Summary Statement of Proposition Logical Connectives / Compound Statements –Negation –Conjunction –Disjunction Truth Tables Quantifiers –Universal –Existential