CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.

Slides:



Advertisements
Similar presentations
Chapter 1: The Foundations: Logic and Proofs
Advertisements

Af2 Introduction. What’s the course about? Discrete Mathematics The mathematics that underpins computer science and other sciences as well.
Grading Lecture attendance: -1% per 2 unexcused absences
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.
CSE 311 Foundations of Computing I Spring 2013 Lecture 1 Propositional Logic.
Discrete Mathematics Lecture 1 Logic of Compound Statements Harper Langston New York University.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 1 Propositional Logic.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
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.
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:
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
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
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.
Propositions and Truth Tables
The Foundations: Logic and Proofs
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.
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Chapter 1: The Foundations: Logic and Proofs
Foundations of Computing I CSE 311 Fall CSE 311: Foundations of Computing I Fall 2014 Lecture 1: Propositional Logic.
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.
Dr. Amer Rasheed COMSATS Institute of Information Technology
Discrete Structures – CS Text Discrete Mathematics and Its Applications Kenneth H. Rosen (7 th Edition) Chapter 1 The Foundations: Logic and Proofs.
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.
Lecture Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
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.
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
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.
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 Mathematics Lecture # 4. Conditional Statements or Implication  If p and q are statement variables, the conditional of q by p is “If p 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.,
1.2 Application of Propositional Logic. Section Summary Translating English sentences Systems Specifications Consistence System Specifications Boolean.
CSE 311: Foundations of Computing Fall 2013 Lecture 1: Propositional logic.
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
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
2. The Logic of Compound Statements Summary
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.
CPCS222 Discrete Structures I
Ch.1 (Part 1): The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
CS100: Discrete structures
Information Technology Department
Applications of Propositional Logic
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
Discrete Mathematics and Its Applications Kenneth H
Discrete Mathematics Lecture 2: Propositional Logic
CSE 321 Discrete Structures
MAT 3100 Introduction to Proof
COMP 1380 Discrete Structures I Thompson Rivers University
The Foundations: Logic and Proofs
1.3 Propositional Equivalences
Discrete Structures Prepositional Logic 2
The Foundations: Logic and Proofs
Presentation transcript:

CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1

CSE 115/ENGR 160 Instructor: Ming-Hsuan Yang Teaching assistant: Jime Yang and Chih-Yuan Yang Lectures: – KL 217, Tuesday/Thursday 4:30 pm to 5:45 pm Labs: – SE 138, Monday 8:00 am to 10:50 am (CSE115-02L), Wednesday 1:00 pm to 3:50 pm (CSE115-03L) Web site: 2

Office hours Office hours: – Wednesday 3:00 pm – 4:00 pm – SE 258 TA hours – Monday 8:00 am to 10:50 am, Wednesday 1:00 pm to 3:50 pm – SE 138 3

Course goals Mathematical reasoning – Logic, inference, proof Combinatorial analysis – Count and enumerate objects Discrete structures – Sets, sequences, functions, graphs, trees, relations Algorithmic reasoning – Specifications and verifications Applications and modeling – Internet, business, artificial intelligence, etc. 4

Topics Logic Proof Sets Functions Number theory Counting Relations Graph Boolean algebra 5

Textbook Discrete Mathematics and Its Applications by Kenneth H. Rosen, 7 th edition, McGraw Hill 6

Prerequisite Upper division standing Basic knowledge of calculus (MATH 21 and MATH 22) Basic knowledge in computer science 7

Grading 5% Class participation 25% Homework 20% Four quizzes 20% Two midterms 30% Final 8

Class policy Do not use computers or smart phones in class All the lecture notes will be posted on the class web Weekly homework assigned on Thursday and due in the following Thursday in class Must be your own work Homework returned in class 9

1.1 Propositional logic Understand and construct correct mathematical arguments Give precise meaning to mathematical statements Rules are used to distinguish between valid (true) and invalid arguments Used in numerous applications: circuit design, programs, verification of correctness of programs, artificial intelligence, etc. 10

Proposition A declarative sentence that is either true or false, but not both – Washington, D.C., is the capital of USA – California is adjacent to New York – 1+1=2 – 2+2=5 – What time is it? – Read this carefully 11

Logical operators Negation operator Conjunction (and, ^) Disjunction (or v ) Conditional statement  Biconditional statement  Exclusive Or 12

Negation 13

Example “Today is Friday” – It is not the case that today is Friday – Today is not Friday At least 10 inches of rain fell today in Miami – It is not the case that at least 10 inches of rain fell today in Miami – Less than 10 inches of rain fell today in Miami 14

Conjunction 15 Conjunction: p ^ q is true when both p and q are true. False otherwise

Example p: “Today is Friday”, q: “It is raining today” p˄q “Today is Friday and it is raining today” – true: on rainy Fridays – false otherwise: Any day that is not a Friday Fridays when it does not rain 16

Disjunction 17 Disjunction: p v q is false when both p and q are false. True otherwise

Example p ˅ q: “Today is Friday or it is raining today” – True: Today is Friday It is raining today It is a rainy Friday – False Today is not Friday and it does not rain 18

Exclusive or 19 Exclusive Or is true when exactly one of p, q is true. False otherwise

Conditional statement 20 Conditional Statement: p is called the premise (or antecedent) and q is called the conclusion (or consequent) p  q is false when p is true and q is false. True otherwise

Conditional statement p  q Also called an implication 21 if p, then qp implies q if p, qp only if q p is sufficient for qa sufficient condition for q is p q if pq whenever p q when pq is necessary for p a necessary condition for p is q q unless ┐ p q follows from p Conditional Statement: p  q is false when p is true and q is false. True otherwise Example p: you go, q: I go. p  q means “If you go, then I go” is equivalent to p only if q “You go only if I go” (not the same as “I go only if you go” which is q only if p)

pqpq p only if q: – p cannot be true when q is not true – The statement is false if p is true but q is false – When p is false, q may be either true or false – Not to use “q only if p” to express p  q q unless ┐ p – If ┐ p is false, then q must be true – The statement is false when p is true but q is false, but the statement is true otherwise 22

Example If Maria learns discrete mathematics, then she will find a good job – Maria will find a good job when she learns discrete mathematics (q when p) – For Maria to get a good job, it is sufficient for her to learn discrete mathematics (sufficient condition for q is p) – Maria will find a good job unless she does not learn discrete mathematics (q unless not p) 23

Common mistake for p  q Correct: p only if q Mistake to think “q only if p” 24

Example “If today is Friday, then 2+3=6” – The statement is true every day except Friday even though 2+3=6 is false 25

Converse, contrapositive and inverse For conditional statement p  q – Converse: q  p – Contrapositive: ┐q  ┐ p – Inverse: ┐p  ┐ q Contrapositive and conditional statements are equivalent 26

Biconditional statement 27 Biconditional Statement: “p if and only if q” p  q is true when p, q have the same truth value. False otherwise Also known as bi-implications

Example P: “you can take the flight”, q: “you buy a ticket” P  q: “You can take the flight if and only if you buy a ticket” – This statement is true If you buy a ticket and take the flight If you do not buy a ticket and you cannot take the flight 28

Truth table of compound propositions 29

Precedence of logic operators 30

Bit operations 31

1.2 Translating English to logical expressions Why? English is often ambiguous and translating sentences into compound propositions removes the ambiguity Using logical expressions, we can analyze them and determine their truth values We can use rules of inferences to reason about them 32

Example “ You can access the internet from campus only if you are a computer science major or you are not a freshman. p : “You can access the internet from campus” q : “You are a computer science major” r : “You are freshmen” p  ( q v ┐r ) 33

System specification Translating sentences in natural language into logical expressions is an essential part of specifying both hardware and software systems. Consistency of system specification. Example: Express the specification “The automated reply cannot be sent when the file system is full” 34

Example 1.Let p denote “The automated reply can be sent” 2.Let q denote “The file system is full” The logical expression for the sentence “The automated reply cannot be sent when the file system is full” is 35

Example Determine whether these system specifications are consistent: 1. The diagnostic message is stored in the buffer or it is retransmitted. 2. The diagnostic message is not stored in the buffer. 3. If the diagnostic message is stored in the buffer, then it is retransmitted. 36

Example Let p denote “The diagnostic message is stored in the buffer” Let q denote “The diagnostic message is retransmitted” The three specifications are 37

Example If we add one more requirement “The diagnostic message is not retransmitted” The new specifications now are 38 This is inconsistent! No truth values of p and q will make all the above statements true

Logic gates 39