Discrete Structures Propositional Logic 1 Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

The Foundations: Logic and Proofs
CSE 311 Foundations of Computing I Spring 2013 Lecture 1 Propositional Logic.
CS128 – Discrete Mathematics for Computer Science
Logic programming ( Handbook of Logic in Artificial Intelligence, Vol) by D. M. Gabbay, C. Hogger, J.A. Robinson. 1.
About the Course Lecture 0: Sep 2 AB C. Plan  Course Information and Arrangement  Course Requirement  Topics and objectives of this course.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 1 Propositional Logic.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.
Adapted from Discrete Math
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
Intro to Discrete Structures
CSNB143 – Discrete Structure
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.
CSE 311 Foundations of Computing I Autumn 2012 Lecture 1 Propositional Logic 1.
About the Course Lecture 0: Sep 10 AB C. Plan  Course Information and Arrangement  Course Requirement  Topics and objectives of this course.
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.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Chapter 1: The Foundations: Logic and Proofs
CISC 2315 Discrete Structures Professor William G. Tanner, Jr. Fall 2010 Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability,
CS 103 Discrete Structures Lecture 01 Introduction to the Course
Introduction to Discrete Mathematics J. H. Wang Sep. 14, 2010.
CSci 2011 Textbook ^Discrete Mathematics and Its Applications,  Rosen  6th Edition  McGraw Hill  2006.
Course overview Course title: Discrete mathematics for Computer Science Instructors: Dr. Abdelouahid Derhab Credit.
1 10/13/2015 MATH 224 – Discrete Mathematics Why Study Discrete Math  Determination of the efficiency of algorithms, e.g., insertion sort versus selection.
Dr. Amer Rasheed COMSATS Institute of Information Technology
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
CISC 2315 Discrete Structures Professor William G. Tanner, Jr. Spring 2011 Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability,
Discrete Structures – CS Text Discrete Mathematics and Its Applications Kenneth H. Rosen (7 th Edition) Chapter 1 The Foundations: Logic and Proofs.
MATH 224 – Discrete Mathematics
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.
SSK3003 DISCRETE STRUCTURES
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.
September1999 CMSC 203 / 0201 Fall 2002 Week #1 – 28/30 August 2002 Prof. Marie desJardins.
1/10/ Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone:
Chapter 1: The Foundations: Logic and Proofs
1 CS 381 Introduction to Discrete Structures Lecture #1 Syllabus Week 1.
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.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Discrete Mathematics Course syllabus. Course No.: Course Classification: Department Compulsory (CS,CIS,SE) Course Name: Discrete Mathematics Time.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
1.  This course covers the mathematical foundations of computer science and engineering. It provides an introduction to elementary concepts in mathematics.
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.
Discrete Structures MT217 Lecture 01. Course Objectives Express statements with the precision of formal logic Analyze arguments to test their validity.
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
Chapter 7. Propositional and Predicate Logic
Lecture 1 – Formal Logic.
CSE15 Discrete Mathematics 01/30/17
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
Ch.1 (Part 1): The Foundations: Logic and Proofs
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
Principles of Computing – UFCFA3-30-1
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
Introduction to Discrete Mathematics
CHAPTER 1: LOGICS AND PROOF
CS201: Data Structures and Discrete Mathematics I
Discrete Math (2) Haiming Chen Associate Professor, PhD
Discrete Mathematics and Its Applications Kenneth H
CSE 321 Discrete Structures
Chapter 7. Propositional and Predicate Logic
Foundations of Discrete Mathematics
CS201: Data Structures and Discrete Mathematics I
Presentation transcript:

Discrete Structures Propositional Logic 1 Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore. 1

Instructor MS in Computer Science and Engineering Chalmers University of Technology, Sweden. PhD in Computer Science University of Grenoble, France. Post-doc Research Fellow Pohang University of Science and Technology, South Korea.Specialization: Human Language Processing, Logic, Proof Theory, Data mining 2

Logistics Two lectures per week – Each lecture requires reading course book (and an optional reading of reference books) 3 Quizzes (15% marks) 3 Assignments (10% marks) Three exams – Sessional Exam 1 (10% marks) – Sessional Exam 2 (15% marks) – Terminal Exam (50% marks) Covers all course 3

Logistics Cont. Course material will be posted on the course website: Course representative (CR) can also collect course material from me after every lecture Other students may get it from him DON’T individually approach me for the material CR: Get course handbook and this lecture from me after this class 4

Logistics Cont. What is on the website: – Course Handbook – Lectures – Assignments – Past quizzes and their solutions – Exams pattern – News Visit the website frequently 5

Plagiarism Copying someone else’s work (partial or complete) and submitting it as if it were one’s own Zero tolerance for plagiarism Read course handbook to know more about plagiarism 6

Attendance Policy 80% attendance is mandatory The students falling short will not be allowed to appear in the Terminal Exam To get good grade you must attend all the lectures and read suggested material 7

Course Objectives Deep understanding of discrete structures used in Computer Science Developing problem solving and analytical skills Developing algorithmic and computational skills – Ability to understand mathematical arguments and their design – Understanding of logic – Proofing techniques 8

Course Objectives Think Mathematically The very foundation of Computer Science 9

Discrete Structures/Mathematics Discrete mathematics deals with objects that come in discrete bundles, e.g., 1 or 2 babies. Continuous mathematics deals with objects that vary continuously, e.g., 3.42 inches from a wall. Think of digital watches versus analog watches (ones where the second hand loops around continuously without stopping). 10

Discrete vs. Continuous Continuous Discrete 11

Why Study Discrete Structures It is the mathematics underlying almost all of computer science: Program verification – Analyzing algorithms for correctness and efficiency Finding efficient algorithms – (for sorting, searching, etc.) Formalizing security requirements Designing cryptographic protocols for enhanced security Graph Theory (Networks – both physical & social) 12

Course Topics Foundations: Logic Methods of Proof Set Theory Induction and Recursion Counting Relations Graphs Trees Introduction of Algorithms 13

Course requires original thinking Many students find this course to be significantly more challenging than other courses Because (among other things), it teaches mathematical reasoning and problem solving – Requires original and deep thinking Book exercises – A way to let you successfully apply concepts using your own creativity One of the primary goals of this course: To learn how to attack problems that may be somewhat different from any you may have previously seen 14

Lecture Schedule WeeksTopic of LectureReading Assignment Week 1Foundations: LogicChapter 1 (section 1.1 and 1.2), Rosen. Week 2Predicate AlgebraChapter 1 (section 3, 4 and 5), Rosen. Week 3Methods of Proof:Chapter 1 (section 6 and 7), Rosen. Week 4Set TheoryChapter 2, Rosen. Week 5SESSIONAL I Exam  Paper will be conducted in the first lecture of the week  Marked papers will be shown to students and the solution of paper will be discussed in the second lecture of the week 15

Lecture Schedule Week 6Induction and RecursionChapter 4, Rosen. Week 7CountingChapter 5 and 7, Rosen Week 8RelationsChapter 8, Rosen. Week 9Revision weak Week 10SESSIONAL II Exam  Paper will be conducted in the first lecture  Marked papers will be shown to students in the second lecture 16

Lecture Schedule Week 11GraphsChapter 9, Rosen Week 12Graphs Algorithms  Euler and Hamilton paths  Shortest paths problems  Planar graphs  Graph colouring Chapter 9, Rosen Week 13Trees  Introduction  Applications Chapter 10, Rosen Week 14Tree Algorithms  Traversal  Spanning trees  Minimum Spanning trees Chapter 10, Rosen Week 15Introduction of Algorithms  Algorithms  Growth function  Complexity of algorithms Chapter 3, Rosen Week 16Revision Week 17Final exam 17

Recommended Books Course Book Discrete Mathematics and Its Applications, 6 th Ed. by Kenneth H. Rosen Reference Books: Discrete Mathematics, 6th Ed. Richard Johnsonbaugh Applied Discrete Structures for Computer Science. Pearson Education, Inc. Alan Doerr and Kenneth Levasseur. Discrete Mathematics Using a Computer. John O’Donnell, Cordelia Hall and Rex Page. 2 nd Ed. Springer. 18

LECTURE 1 Foundations: Logic Chapter 1 Sections 1.1 and

Introduction Logic is the study of the principles and methods that distinguishes between a valid and an invalid argument Logic deals with general reasoning laws, which you can trust 20

Applications Applied in proving program correctness and verification Databases (Relational Algebra and calculus) Artificial Intelligence 21

Propositional Logic 22

Proposition 23

Truth Values If a proposition is true, we say that it has a truth value of “true” If a proposition is false, its truth value is “false” The truth values “true” and “false” are, respectively, denoted by the letters T and F 24

Examples 25

Context 26

Quiz 27

Quiz 28

The area of logic that deals with propositions is called the propositional calculus or propositional logic It was first developed systematically by the Greek philosopher Aristotle more than 2300 years ago 29

Compound Propositions Compound propositions, are formed from existing propositions using logical operators (also called as connectives) The methods to produce new propositions (from those that we already have) were discussed by the English mathematician George Boole in 1854 in his book The Laws of Thought 30

Symbols for Connectives SymbolMeaning Negation Or, disjunction And, conjunction Implication Bi-implication 31

Negation 32

Examples 33

Truth Table for the Negation 34

The Conjunction Definition 2 Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, is the proposition “p and q.” The conjunction p ∧ q is true when both p and q are true and is false otherwise. 35

Examples 36

Truth Table Can you do it for three propositions? How many possible answers? 37

The Disjunction Definition 3 Let p and q be propositions. The disjunction of p and q, denoted by p ∨ q, is the proposition “p or q.” The disjunction p ∨ q is false when both p and q are false and is true otherwise. 38

Truth Table 39

Inclusive vs. Exclusive “Students who have taken calculus or computer science can take this class.” (Inclusive or) “Students who have taken calculus or computer science, but not both, can enroll in this class.” Students who have taken either calculus or computer science, can enroll in this class. (exclusive or) 40

Exclusive Disjunction 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. Either p or q. p or q but not both. 41

Truth Table Either p or q. p or q but not both. 42

“Inclusive or” or “Exclusive or” “Tonight I will stay home or go out to a movie.” ??? Human languages can be ambiguous So be careful 43

Conditional Statements/ Implication p: Premise, Hypothesis, antecedent q: Conclusion, Consequence The statement p → q is true when – both p and q are true – p is false (no matter what truth value q has) 44

Conditional Statements Definition 5: Let p and q be propositions. The conditional statement p → q is the proposition “if p, then q.” The conditional statement p → q is false when p is true and q is false, and true otherwise. In the conditional statement p → q, p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence). 45

46

Other forms Conditional statements play an essential role in mathematical reasoning Many ways to express an implication (p -> q) : 47

p: you get 100% on the final q: you will get an A p implies that q. you get 100% on the final implies that you will get an A. If p, then q. If you get 100% on the final, then that you will get an A. 48

If p, q. If you get 100% on the final, that you will get an A. p is sufficient for q. Get 100% on the final is sufficient for getting an A. q only if p. you will get an A only if you get 100% on the final. q unless ¬ p. you will get an A unless you don’t get 100% on final. 49

Examples If I fall in a lake, then I’ll get wet. If gravity does not exist then I can fly. If sun rises from the west then it’ll be the end of our planet. If the moon is made of cheese, then the earth is rectangular. 50

Example Cont. If you get 100% on the final, then you will get an A. 51

Exercise Translate the propositions into respective formulae – It is raining and windy. – It is sunny but freezing. – Give me tea or coffee. – If there are DDP students and enrolled in BS, then I will teach DS. 52

Truth tables pq

Exercise Can you complete the following truth table without asking me any question in class? 54 pqr p, q and r are parameters in this exercise

Do exercises from the course book 55