Logical Operations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Logical Operations Reading: Kolman, Section 2.1.

Slides:



Advertisements
Similar presentations
TRUTH TABLES Section 1.3.
Advertisements

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.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Adapted from Discrete Math
Predicates and Quantifiers
Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
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.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
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
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Logic Disjunction A disjunction is a compound statement formed by combining two simple sentences using the word “OR”. A disjunction is true when at.
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.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
January 30, 2002Applied Discrete Mathematics Week 1: Logic and Sets 1 Let’s Talk About Logic Logic is a system based on propositions.Logic is a system.
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
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
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.
Chapter 1: The Foundations: Logic and Proofs
Conditional Statements – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Conditional Statements Reading: Kolman, Section 2.2.
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.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
رياضيات متقطعة لعلوم الحاسب 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.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Spring 2003CMSC Discrete Structures1 Let’s get started with... 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.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
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.
ICS 6D Logic Overview Instructor: Sandy Irani. What is logic? Branch of mathematics in which variables and expressions have value true (T) or false (F)
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
Discrete Mathematics Logic.
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 Logic.
Cs Discrete Mathematics
Predicates and Quantifiers
Presentation transcript:

Logical Operations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Logical Operations Reading: Kolman, Section 2.1

Logical Operations – Page 2CSCI 1900 – Discrete Structures Statement of Proposition Statement of proposition – a declarative sentence that is either true or false, but not both Examples: –The earth is round: statement that is true 2+3=5: statement that is true –Do you speak English? This is a question, not a statement

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

Logical Operations – Page 4CSCI 1900 – Discrete Structures Logical Connectives and Compound Statements x, y, z, … denote variables that can represent real numbers p, q, r,… denote prepositional variables that can be replaced by statements. –p: The sun is shining today –q: It is cold

Logical Operations – Page 5CSCI 1900 – Discrete Structures Negation If p is a statement, the negation of p is the statement not p Denoted ~p If p is true, ~p is false If p is false, ~p is true ~p is not actually connective, i.e., it doesn’t join two of anything not is a unary operation for the collection of statements and ~p is a statement if p is

Logical Operations – Page 6CSCI 1900 – Discrete Structures Examples of Negation If p: 2+3 >1 then If ~p: 2+3 <1 If q: It is cold then ~q: It is not the case that it is cold, i.e., It is not cold.

Logical Operations – Page 7CSCI 1900 – Discrete Structures Conjunction If p and q are statements, then 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 expensive –q: ETSU has plenty of parking –p  q = ?

Logical Operations – Page 8CSCI 1900 – Discrete Structures Disjunction If p and q are statements, then the disjunction of p and q is the compound statement “p or q” Denoted p  q p  q is true if either p or q are true Example: –p: I am a male –q: I am under 40 years old –p  q = ?

Logical Operations – Page 9CSCI 1900 – Discrete Structures Exclusive Disjunction If p and q are statements, then the exclusive disjunction is the compound statement, “either p or q may be true, but both are not true at the same time.” Example: –p: It is daytime –q: It is night time –p  q (in the exclusive sense) = ?

Logical Operations – Page 10CSCI 1900 – Discrete Structures Inclusive Disjunction If p and q are statements, then the inclusive disjunction is the compound statement, “either p or q may be true or they may both be true at the same time.” Example: –p: It is cold –q: It is night time –p  q (in the inclusive sense) = ?

Logical Operations – Page 11CSCI 1900 – Discrete Structures Exclusive versus Inclusive Depending on the circumstances, some 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 –Pat is either male or female

Logical Operations – Page 12CSCI 1900 – Discrete Structures Compound Statements A compound statement is a statement made from other statements For n individual propositions, there are 2 n possible combinations of truth values A 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 

Logical Operations – Page 13CSCI 1900 – Discrete Structures Truth Tables are Important Tools for this Material! pq pqpq TTT TFF FTF FFF pq pqpq TTT TFT FTT FFF

Logical Operations – Page 14CSCI 1900 – Discrete Structures Compound Statement Example (p  q)  (~p) pq p  q ~p (p  q)  (~p) TTTFT TFFFF FTFTT FFFTT

Logical Operations – Page 15CSCI 1900 – Discrete Structures Quantifiers Back in Section 1.1, a set was defined {x | P(x)} For an element t to be a member of the set, P(t) must evaluate to “true” P(x) is called a predicate or a propositional function

Logical Operations – Page 16CSCI 1900 – Discrete Structures Computer Science Functions if P(x), then execute certain steps while Q(x), do specified actions

Logical Operations – Page 17CSCI 1900 – Discrete Structures Universal quantification of a predicate P(x) Universal quantification of predicate P(x) = 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 quantifications are considered does not affect the truth value (e.g.,  x  y P(x,y) ≡  y  x P(x,y) )

Logical Operations – Page 18CSCI 1900 – Discrete Structures Examples: P(x): -(-x) = x –This predicate makes sense for all real numbers x. –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

Logical Operations – Page 19CSCI 1900 – Discrete Structures Existential quantification of a predicate P(x) 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 quantifications are considered does not affect the truth value

Logical Operations – Page 20CSCI 1900 – Discrete Structures Applying both universal and existential quantification Order of application does matter 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 such that for all A A + B = I n ” THIS IS FALSE!

Logical Operations – Page 21CSCI 1900 – Discrete Structures Assigning Quantification to Proposition Let p:  x P(x) The negation of p is false when p is true and true when p is false For p to be false, there must be at least one value of x for which P(x) is false. Thus, p is false if  x ~P(x) is true. If  x ~P(x) is false, then for every x, ~P(x) is false; that is  x P(x) is true.

Logical Operations – Page 22CSCI 1900 – Discrete Structures Okay, what exactly did the previous slide say? Assume a statement is made that “for all x, P(x) is true.” –If we can find one case that is not true, then the statement is false. –If we cannot find one case that is not true, then the statement is true. Example:  positive integers, n, P(n) = n 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.