Discrete Structures – CS2300 1 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (7 th Edition) Chapter 1 The Foundations: Logic and Proofs.

Slides:



Advertisements
Similar presentations
Af2 Introduction. What’s the course about? Discrete Mathematics The mathematics that underpins computer science and other sciences as well.
Advertisements

04 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
CSE 311 Foundations of Computing I Spring 2013 Lecture 1 Propositional Logic.
CS128 – Discrete Mathematics for Computer Science
CSE 311 Foundations of Computing I Autumn 2011 Lecture 1 Propositional Logic.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Introduction to Logic Sections 1.1 and 1.2 of Rosen Spring 2010
From Chapter 4 Formal Specification using Z David Lightfoot
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.
Introduction to Logic Sections 1.1 and 1.2 of Rosen Fall 2010 CSCE 235 Introduction to Discrete Structures URL: cse.unl.edu/~cse235 Questions:
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.
Adapted from Discrete Math
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
Propositions and Truth Tables
The Foundations: Logic and Proofs
Discrete Maths 2. Propositional Logic Objective
CSE 311 Foundations of Computing I Autumn 2012 Lecture 1 Propositional Logic 1.
Discrete Mathematics and Its Applications
COS 150 Discrete Structures Assoc. Prof. Svetla Boytcheva Fall semester 2014.
© 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,
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
CSci 2011 Textbook ^Discrete Mathematics and Its Applications,  Rosen  6th Edition  McGraw Hill  2006.
Review I Rosen , 3.1 Know your definitions!
Dr. Amer Rasheed COMSATS Institute of Information Technology
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
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.
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
September1999 CMSC 203 / 0201 Fall 2002 Week #1 – 28/30 August 2002 Prof. Marie desJardins.
Conditional Statements
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
1/10/ Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone:
Discrete Mathematics CS 285. Lecture 12 Quick Overview The conceptual center of computer science is the ALGORITHM.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
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
The Foundations: Logic and Proof, Sets, and Foundations PROPOSITIONS A proposition is a declarative sentence that is either True or False, but not the.
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
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.
Discrete Structures Class Meeting 1. Outline of Today Information sheet Questionnaire Quiz 0 Learning mathematics – Reading math – Solving problems.
Discrete Mathematics Lecture # 4. Conditional Statements or Implication  If p and q are statement variables, the conditional of q by p is “If p then.
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.
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.
CS 2130 Computational Structures (Discrete Mathematics for Computing)
Chapter 1 Propositional Logic
CSNB 143 Discrete Mathematical Structures
CSE15 Discrete Mathematics 01/30/17
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
COMP 1380 Discrete Structures I Thompson Rivers University
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
Discrete Mathematics and Its Applications Kenneth H
Discrete Mathematics Lecture 2: Propositional Logic
MAT 3100 Introduction to Proof
COMP 1380 Discrete Structures I Thompson Rivers University
The Foundations: Logic and Proofs
Presentation transcript:

Discrete Structures – CS Text Discrete Mathematics and Its Applications Kenneth H. Rosen (7 th Edition) Chapter 1 The Foundations: Logic and Proofs

About This Course The Conceptual Foundation of Computer Science Prerequisite for CS 3240 (Theory of Computation) Applied Mathematics Course

Continuous vs. Discrete Math 3 ContinuousDiscrete Sliding down a slide Pouring water Length of rope Crawling slug Adding milk Grade point average Climbing up stairs Stacking ice cubes Number of knots Hopping rabbit Adding eggs Calculus grade

Discrete Solutions How many ways are there to choose a valid password? What is the probability of winning the lottery? Is there a path linking two particular computers in a network? What is the shortest path between two destinations using a transportation system? How many valid Internet addresses are there? 4

Chapter 1 Objective “In this chapter we will explain what makes up a correct mathematical [logical] argument and introduce tools to construct these arguments.” 5

Sections 1.1, Logic Propositional Logic

Propositions 7 A proposition is a statement that is either true or false, but not both. Today is Tuesday. Six is a prime number. Count is less than ten. 7<5 Consider this statement.

Compound Propositions 8 Compound propositions are formed from existing propositions using logical operators Today is Wednesday and it is snowing outside. 12 is not a prime number.

Negation of a Proposition 9 TFTF F T NOT !

Negation of a Proposition 10 repeat{ … }until(feof(my_file)); while (!feof(my_file)){ … }

Disjunction of Two Propositions 11 T T F F T F T T T F OR ||

Disjunction of Two Propositions 12 repeat{ … }until(count>10 || feof(myfile)); if(choice==PAUSE || choice ==STOP)...

Conjunction of Two Propositions 13 T T F F T F T F F F AND &&

Conjunction of Two Propositions 14 while(!feof(a_file) && index<SIZE) { … } if(!done && time_left)...

Exclusive-OR of Two Propositions 15 T T F F T F F T T F Exactly one of them is true. ^ “but not both”

Implication 16 T T F F T F T F T T p is called the hypothesis and q is the conclusion

Implication (“Conditional”) “if p, then q” “p implies q” “if p,q” “p only if q” “p is sufficient for q” “q if p” “q whenever p” “q is necessary for p” 17 T T F F T F T F T T 17

q whenever p 18 T T F F T F T F T T Suppose that the proposition is true. Then, q is true whenever p is true. 18

p is sufficient for q 19 T T F F T F T F T T Suppose that the proposition is true. Then, to guarantee that q is true it is sufficient to say that p is true. 19

Converse of an Implication 20 T T F F T F T F T T T T F T And Conversely 20

Example of Converse 21 If it stays warm for a week, the apple trees will bloom. If the apple trees bloom, it will be warm for a week. If x is even then x 2 is even. If x 2 is even then x is even.

Contrapositive of an Implication 22 T T F F T F T F T T T F T F F F T T F T T T 22

Examples of Contrapositive 23 If it snows tonight, then I will stay at home. If I do not stay at home, then it didn’t snow tonight. If x is odd then x 2 is odd. If x 2 is not odd then x is not odd. If x 2 is even then x is even.

Biconditional T T F F T F T F T T T T F T T F F T 24

Biconditional 25 p if and only if qp iff q

Bitwise operators AND OR XOR a&b a|b a^b 27

t01_1_009.jpg

Tautology 29 Tautology - a compound proposition that is always true. T T T T T F F T F T T T F F T T

Contradiction 30 Contradiction - a compound proposition that is always false. T F F F T F

Contingency 31 A contingency is neither a tautology nor a contradiction. T T T T T F F F F T F T F F F T