Chapter 1 The Foundations: Logic and Proof, Sets, and Functions

Slides:



Advertisements
Similar presentations
Artificial Intelligence
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.
CS128 – Discrete Mathematics for Computer Science
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.
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
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.
Discrete Mathematics and Its Applications
Lecture for Week Spring.   Introduction to Propositional Logic  Types of Proposition  Operator and Truth table Agenda.
Chapter 1: The Foundations: Logic and Proofs
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
1 Introduction to Abstract Mathematics The Logic and Language of Proofs Instructor: Hayk Melikya Proposition: Informal introduction to.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
Chapter 2: The Logic of Compound Statements 2.2 Conditional Statements
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 Section 1 Logic.
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
6.1 Logic Logic is not only the foundation of mathematics, but also is important in numerous fields including law, medicine, and science. Although the.
1/10/ Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone:
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
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
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.
Discrete Mathematics Lecture # 1. Course Objectives  Express statements with the precision of formal logic.  Analyze arguments to test their validity.
CS104:Discrete Structures Chapter 2: Proof Techniques.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
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.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
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
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
Chapter 1 Propositional Logic
Discrete Mathematical
Chapter 7. Propositional and Predicate Logic
DISCRETE MATHEMATICS CHAPTER I.
Discrete Mathematics Logic.
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
COMP 1380 Discrete Structures I Thompson Rivers University
Logic.
Logic programming ( Handbook of Logic in Artificial Intelligence, Vol) by D. M. Gabbay, C. Hogger, J.A. Robinson .
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Propositional Calculus: Boolean Algebra and Simplification
CS100: Discrete structures
Information Technology Department
CHAPTER 1: LOGICS AND PROOF
CS201: Data Structures and Discrete Mathematics I
Applied Discrete Mathematics Week 1: Logic
Back to “Serious” Topics…
Discrete Mathematics and Its Applications Kenneth H
Computer Security: Art and Science, 2nd Edition
Discrete Mathematics Lecture 2: Propositional Logic
The Logic of Declarative Statements
Discrete Mathematics Logic.
MAT 3100 Introduction to Proof
Chapter 7. Propositional and Predicate Logic
Discrete Mathematics Lecture 2: Propositional Logic
Foundations of Discrete Mathematics
COMP 1380 Discrete Structures I Thompson Rivers University
CS201: Data Structures and Discrete Mathematics I
The Foundations: Logic and Proofs
Presentation transcript:

Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Dr. Mahmoud Wahdan

Introduction Three important topics are covered: logic, sets, and functions. The rules of logic specify the meaning of mathematical statements. For instance, these rules help us understand and reason with statements such as "There exists an integer that is not the sum of two squares," and "For every positive integer n the sum of the positive integers not exceeding n is n(n + 1)/2."

Introduction (Cont.) Logic is the basis of all mathematical reasoning, and it has practical applications to the design of computing machines, to system specifications, to artificial intelligence, to computer programming, to programming languages, and to other areas of computer science.

Logic The rules of logic give precise meaning to mathematical statements. These rules are used to distinguish between valid and invalid mathematical arguments. A major goal is to understand and how to construct correct mathematical arguments.

Logic (Cont.) In addition to its importance in understanding mathematical reasoning, logic has numerous applications in computer science. These rules are used in the design of computer circuits; the construction of computer programs, the verification of the correctness of programs, and in many other ways.

Propositions A proposition is a declarative sentence that is either true or false, but not both. Example 1: All the following declarative sentences are propositions. Cairo is the capital of Egypt. Paris is the capital of the USA. 1 + 1 = 2. 2 + 2 = 3. Propositions 1 and 3 are true, whereas 2 and 4 are false.

Propositions (Cont.) Example 2: All the following sentences are NOT propositions. What time is it? Read this carefully. r + I = 2. x + y = z . Sentences 1 and 2 are not propositions because they are not declarative sentences. Sentences 3 and 4 are not propositions because they are neither true nor false, since the variables in these sentences have not been assigned values.

Propositions (Cont.) Letters are used to denote propositions: p, q, r, s, . . . . The truth value of a proposition is true (T) if it is a true proposition and false (F), if it is a false proposition. The area of logic that deals with propositions is called the propositional calculus or propositional logic.

"It is not the case that p“ Propositions (Cont.) Definition 1 Let p be a proposition. The statement "It is not the case that p“ is another proposition, called the negation of p. The negation of p is denoted by p. The proposition p is read "not p."

"It is not the case that today is Friday.“ Propositions (Cont.) Example 3 Find the negation of the proposition "Today is Friday.'' and express this in simple English. Solution: The negation is "It is not the case that today is Friday.“ This negation can he more simply expressed by "Today is not Friday," or "It is not Friday today.”

Propositions (Cont.) Truth Table for the Negation of a Proposition p

Propositions (Cont.) Definition 2 Let p and q be propositions. The proposition "p and q," denoted p ˄ q, is the proposition that is true when both p and q are true and is false otherwise. The proposition p ˄ q is called the conjunction of p and q.

Propositions (Cont.) Truth Table for the Conjunction of two Propositions p q p ˄ q F T

"Today is Friday and it is raining today" Propositions (Cont.) Example 4 Find the conjunction of the propositions p and q where p is the proposition "Today is Friday" and q is the proposition "It is raining today.“ Solution: The conjunction of these propositions, p ˄ q, is the proposition "Today is Friday and it is raining today" This proposition is true on rainy Fridays and is false on any day that is not a Friday and on Fridays when it does not rain.

Propositions (Cont.) Definition 3 Let p and q be propositions. The proposition "p or q," denoted p ˅ q, is the proposition that is false when both p and q are false and is true otherwise. The proposition p ˅ q is called the disjunction of p and q.

Propositions (Cont.) Truth Table for the Disjunction of two Propositions "Students who have taken calculus or computer science can take this class." p q p ˅ q F T

"Today is Friday or it is raining today" Propositions (Cont.) Example 5 What is the disjunction of the propositions p and q where p and q are the same propositions as in Example 4? Solution: The disjunction of these propositions, p ˅ q, is the proposition "Today is Friday or it is raining today" This proposition is true on any day that is either a Friday or a rainy day (including rainy Fridays). It is only false on days that are not Fridays when it also does not rain.

Propositions (Cont.) Definition 4 Let p and q be propositions. The exclusive or of p and q, denoted by p q, is the proposition that is true when exactly one of p and q is true and is false otherwise.

Propositions (Cont.) Truth Table for the Exclusive Or of two Propositions p q p q F T

Propositions (Cont.) Definition 5 let p and q be propositions, the implication (p->q) means “if p then q” or “q if p” is the proposition that is false when p is true and q is false and true otherwise. p is called hypothesis or premise q is called conclusion or consequence

p → q is equivalent to ¬p ∨ q. Propositions (Cont.) Truth Table for the Implication of two Propositions p q p ->q F T p → q is equivalent to ¬p ∨ q.

Propositions (Cont.) Ex: p (hypothesis) If it is sunny today, then we will go to the beach q (conclusion)

Propositions (Cont.) Solution: p q p ->q (rainy)F (not go)F T (go)T (sunny)T F

Propositions (Cont.) Ex2: You are guaranteed an A provided a score 85% or above. P q p ->q (score<85 or less)F (grade<A)F T (score=85 or greater)T F (grade =A)T

p → q is equivalent to ¬p ∨ q. Propositions (Cont.) Examine the possible scenarios: Suppose you score a 90% in the class, and your final grade is an A (T,T) Suppose you score a 90% in the class, and your final grade is not A (T,F) Suppose your score is 75% in the class and receive final grade B (F,F) If your score is 84% and end up with an A, (F,T) p → q is equivalent to ¬p ∨ q.

p → q is equivalent to ¬p ∨ q. Propositions (Cont.) p → q is equivalent to ¬p ∨ q. Try to prove the above statement using truth table method Evaluate the following proposition statements:

Propositions (Cont.) Definition 6 Let p and q be propositions. The proposition "p equivalent q," denoted p<->q, is the proposition that is false when both p or q are false and is true otherwise. It is also known as logical biconditional p <-> q is equivalent to (p ^ q) ∨ (¬ p ^ ¬ q) . Try to prove the above rule

Propositions (Cont.) Truth Table for the Implication of two Propositions p q p <->q F T