Discrete Mathematics

Similar documents
Logic. Def. A Proposition is a statement that is either true or false.

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

DISCRETE MATHEMATICS BA202

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

Compound Propositions

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Introduction Propositional Logic

CSC Discrete Math I, Spring Propositional Logic

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Today s Topic: Propositional Logic

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

Introduction. Applications of discrete mathematics:

Sec$on Summary. Propositions Connectives. Truth Tables. Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional

An Introduction to Logic 1.1 ~ 1.4 6/21/04 ~ 6/23/04

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

ICS141: Discrete Mathematics for Computer Science I

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

Discrete Structures for Computer Science

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

CSE 20 DISCRETE MATH. Fall

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

EECS 1028 M: Discrete Mathematics for Engineers

3.2: Compound Statements and Connective Notes

Section 1.1 Propositional Logic. proposition : true = T (or 1) or false = F (or 0) (binary logic) the moon is made of green cheese

AMTH140 Lecture 8. Symbolic Logic

Boolean Logic. CS 231 Dianna Xu

Definition 2. Conjunction of p and q

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

The statement calculus and logic

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Discrete Structures of Computer Science Propositional Logic I

Deduction by Daniel Bonevac. Chapter 3 Truth Trees

Propositional Logic 1

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

A statement is a sentence that is definitely either true or false but not both.

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Chapter 1: The Logic of Compound Statements. January 7, 2008

MAT2345 Discrete Math

Solutions to Homework I (1.1)

Propositions. Frequently, we will use the word statement instead of proposition.

Section 3.1. Statements and Logical Connectives. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

PROPOSITIONAL CALCULUS

Chapter 5: Section 5-1 Mathematical Logic

Recall that the expression x > 3 is not a proposition. Why?

Proofs. Joe Patten August 10, 2018

software design & management Gachon University Chulyun Kim

Intro to Logic and Proofs

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

LOGIC CONNECTIVES. Students who have an ACT score of at least 30 OR a GPA of at least 3.5 can receive a college scholarship.

Section 1.1: Logical Form and Logical Equivalence

DISCRETE STRUCTURES WEEK5 LECTURE1

1.1 Language and Logic

ICS141: Discrete Mathematics for Computer Science I

Overview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions

Section 3.1 Statements, Negations, and Quantified Statements

ARTIFICIAL INTELLIGENCE

Discrete Mathematics and Applications COT3100

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Basic Logic and Proof Techniques

ECOM Discrete Mathematics

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

DERIVATIONS AND TRUTH TABLES

Course Staff. Textbook

CSCE 222 Discrete Structures for Computing. Propositional Logic. Dr. Hyunyoung Lee. !!!!!! Based on slides by Andreas Klappenecker

CSE 240 Logic and Discrete Mathematics

Chapter 1 Elementary Logic

FOUNDATION OF COMPUTER SCIENCE ETCS-203

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Chapter 1, Section 1.1 Propositional Logic

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

Chapter 1 Logic Unit Math 114

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Functions. Lecture 4: Truth functions, evaluating compound statements. Arithmetic Functions. x y x+y

Introduction to Sets and Logic (MATH 1190)

THE LOGIC OF COMPOUND STATEMENTS

Chapter 3: Logic. Diana Pell. A statement is a declarative sentence that is either true or false, but not both.

CSE 20: Discrete Mathematics

LECTURE 1. Logic and Proofs

Propositional Logic. Fall () Propositional Logic Fall / 30

A Statement; Logical Operations

03 Propositional Logic II

Florida State University Course Notes MAD 2104 Discrete Mathematics I

1.1 Language and Logic

CSE 311: Foundations of Computing I. Spring 2015 Lecture 1: Propositional Logic

Lecture 02: Propositional Logic

Connectives Name Symbol OR Disjunction And Conjunction If then Implication/ conditional If and only if Bi-implication / biconditional

15414/614 Optional Lecture 1: Propositional Logic

Unit 1 Logic Unit Math 114

Truth-Functional Logic

It is not the case that ϕ. p = It is not the case that it is snowing = It is not. r = It is not the case that Mary will go to the party =

MA103 STATEMENTS, PROOF, LOGIC

Transcription:

Discrete Mathematics Discrete mathematics is devoted to the study of discrete or distinct unconnected objects. Classical mathematics deals with functions on real numbers. Real numbers form a continuous line. Some calculus techniques apply only to continuous functions. Dealing with discrete objects requires techniques different from classical math. 1

Why study Discrete Mathematics? Computers typically work with discrete information. Examples: bits integers letters employee records passwords This is why a course in Discrete Mathematics is standard in Computer Science or Software Engineering programmes. 2

Applications of Discrete Mathematics The techniques of Discrete Mathematics help us solve many kinds of problems. For example: What is the shortest route to go from point A to point B given a map marked with all distances between points? How many different ways are there of choosing a valid password in a system? What is the most efficient way to multiply a given sequence of matrices? How should you schedule a given collection of tasks on a set of computers, so that all tasks finish as soon as possible? 3

Applications of Discrete Mathematics Discrete mathematics provides the foundations for many fields: Computer security and cryptography. Automata theory: the theory behind compilers. Algorithms and data structures. Database theory. Routing and other problems in computer networks. Scheduling theory. 4

Learning objectives for discrete mathematics To develop mathematical maturity. IOW, the ability to understand and create mathematical arguments. To learn mathematical reasoning and problem solving, rather than a set of skills (e.g. how to multiply, divide, differentiate and integrate). To be able to attack problems different from previously seen. To learn to apply mathematical abstraction to problems. To understand that computer programming is not that different from writing mathematical proofs. 5

HOW to study Discrete Math? Goal: Develop your ability to understand and create mathematical arguments, i.e. to develop mathematical maturity. Discrete Math is different from the Math courses you have studied before: 1. Not a set of formulas you need to memorize and be able to apply. 2. You will learn Mathematical reasoning and problem solving. Mathematical reasoning and problem solving are essential skill in writing computer programs and developing software. In order to achieve this: 1. Read the textbook, not only the lecture slides. 2. Solve exercises, Solve exercises, Solve exercises,... 3. Use the textbooks Student site 4. Practise, practise, practise,... 6

Syllabus In this course we cover 1. Propositional logic, first order logic, proofs. 2. Sets, functions, sequences, and sums. 3. Integers and modular arithmetic. 4. Induction and recursion. 5. Relations, equivalence relations, partial orderings. 7

Propositional Logic Logic deals with the methods of reasoning. The rules of logic give precise meaning to mathematical statements. It deals with objects having two values: True, also denoted T or or 1 False, also denoted F or or 0 We call T and F truth values. Proposition or Statement: A declarative sentence which can be either true or false but not both. (We say its truth value is either T or F.) 8

Examples of propositions Montreal is a city in Canada. truth value is T. Concordia is located near a metro station truth value is T. 2 + 2 = 5 truth value is F. Examples of things that are not propositions Don t do that! an imperative sentence. What time is it? A question x < 4 truth value depends on x. 9

We name propositions, for example p, q, r,... Examples: p = def It is raining today. q = def Montreal is the capital of Canada. r = def 2 + 3 = 5. The truth value of some proposition dependes on their time, place, context, speaker,... Bill Clinton is the president of the USA The sun is shining The truth value of other propositions are absolute, that is, either True or False So, the only way to interpret 2+2 = 5 is False. and the only way to interpret 2+2 = 4 is True. 10

Logical operators and compound propositions Propositions can be combined using logical connectives, such as negation, and, or, etc. Examples: p not p p q p and q p q p or q p q p exclusive-or q p q if p then q p q p if and only if q 11

Negation It is not the case that p. p If the proposition p is true then the negation of p is false. If the proposition p is false then the negation of p is true. Example: p = def Today is Monday. p = It is not the case that today is Monday. Today is not Monday. 12

Truth tables We use a truth table to determine the truth values of compound propositions in terms of the component parts. The truth table for negation: p p T F F T 13

Disjunction p q is true when at least one of p, q is true (also known as inclusive or). Example: p = def Montreal is the capital of Canada. q = def 2 + 3 = 5. p q = Montreal is the capital of Canada or 2+3 = 5. The truth table for disjunction: p q p q T T T T F T F T T F F F 14

Exclusive Or p q is true when exactly one of p, q is true and the other is false. Example: p = def I will have soup. q = def I will have salad. p q = I will have soup or salad but not both. The truth table for exclusive or: p q p q T T F T F T F T T F F F 15

Conjunction p q is true when both p, q are true. Example: p = def It is raining. q = def It is dark outside. p q = It is raining and it is dark outside. The truth table for conjunction: p q p q T T T T F F F T F F F F 16

Conditional p q (if p then q) p q is false only when p is true and q is false. p is called the hypothesis or antecedent q is called the conclusion or consequent. Example: p q = def If today is Monday, then I have to go to school. The truth table for conditional: p q p q T T T T F F F T T F F T 17

The conditional p q can be expressed in English in many ways: if p then q p implies q p only if q p is sufficient for q q is necessary for p q if p q whenever p 18

Examples: If you get 100% on the final, then you will get an A. If Maria learns discrete mathematics, then she will find a good job. Maria will find a good job when she learns discrete mathematics. For Maria to get a good job, it is sufficient for her to learn discrete mathematics. Caution is required: If today is Friday, then 2 + 3 = 5. If today is Friday, then 2 + 3 = 6. If it is sunny today, then we will go to the beach. 19

Biconditional p q (p if and only if q) is true when p, q have the same truth values. p is necessary and sufficient for q. p iff q. Example: p q = def We will go to the beach if and only if it is sunny. The truth table for biconditional: p q p q T T T T F F F T F F F T 20

Classroom exercise: Build a truth table for the compound proposition ((p q) r) 21