DISCRETE STRUCTURES WEEK5 LECTURE1

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

CSC Discrete Math I, Spring Propositional Logic

Compound Propositions

Discrete Mathematics and Its Applications

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

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

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

Chapter 1, Section 1.1 Propositional Logic

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Lecture 02: Propositional Logic

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

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

CSE 20 DISCRETE MATH. Fall

Discrete Structures of Computer Science Propositional Logic I

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

Introduction. Applications of discrete mathematics:

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

ARTIFICIAL INTELLIGENCE

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

Discrete Mathematics and Applications COT3100

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

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

PROPOSITIONAL CALCULUS

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

Today s Topic: Propositional Logic

AMTH140 Lecture 8. Symbolic Logic

Discrete Structures for Computer Science

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

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

EECS 1028 M: Discrete Mathematics for Engineers

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

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

Propositional Languages

CSE 20: Discrete Mathematics

Packet #1: Logic & Proofs. Applied Discrete Mathematics

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

Chapter 4: Classical Propositional Semantics

ICS141: Discrete Mathematics for Computer Science I

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

Chapter 5: Section 5-1 Mathematical Logic

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

We last time we began introducing equivalency laws.

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

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

1.1 Language and Logic

Propositional logic ( ): Review from Mat 1348

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Today s Lecture. Lecture 4: Formal SE. Some Important Points. Formal Software Engineering. Introduction to Formal Software Engineering


cse541 LOGIC FOR COMPUTER SCIENCE

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

Boolean Logic. CS 231 Dianna Xu

Definition 2. Conjunction of p and q

A Statement; Logical Operations

15414/614 Optional Lecture 1: Propositional Logic

Mathematics for linguists

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

Section 1.1: Logical Form and Logical Equivalence

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

1.1 Language and Logic

THE LOGIC OF COMPOUND STATEMENTS

Propositional Logic. Spring Propositional Logic Spring / 32

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

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

2.2: Logical Equivalence: The Laws of Logic

Symbolic Logic. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing February 5 6,

Discrete Mathematics

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

CSE 240 Logic and Discrete Mathematics

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

~ p is always false. Based on the basic truth table for disjunction, if q is true then p ~

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

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

1 The Foundations. 1.1 Logic. A proposition is a declarative sentence that is either true or false, but not both.

Mathematical Logic Part One

Math.3336: Discrete Mathematics. Applications of Propositional Logic

Solutions to Homework I (1.1)

Chapter 2: Introduction to Propositional Logic

The statement calculus and logic

software design & management Gachon University Chulyun Kim

Course Staff. Textbook

Chapter 4, Logic using Propositional Calculus Handout

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

UNIT-I: Propositional Logic

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

Proofs. Joe Patten August 10, 2018

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

CHAPTER 2 INTRODUCTION TO CLASSICAL PROPOSITIONAL LOGIC

Propositional Logic 1

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

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

Foundation of proofs. Jim Hefferon.

CSCI Homework Set 1 Due: September 11, 2018 at the beginning of class

Logic and Propositional Calculus

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Lecture 4: Proposition, Connectives and Truth Tables

Chapter 1: Formal Logic

CSC165 Mathematical Expression and Reasoning for Computer Science

Transcription:

DISCRETE STRUCTURES WEEK5 LECTURE1

Let s get started with... Logic! Spring 2010 CPCS 222 - Discrete Structures 2

Logic Crucial for mathematical reasoning Important for program design Used for designing electronic circuitry (Propositional )Logic is a system based on propositions. A proposition is a (declarative) statement that is either true or false (not both). We say that the truth value of a proposition is either true (T) or false (F). Corresponds to 1 and 0 in digital circuits Spring 2010 CPCS 222 - Discrete Structures 3

The Statement/Proposition Game Elephants are bigger than mice. Is this a statement? Is this a proposition? What is the truth value of the proposition? yes yes true Spring 2010 CPCS 222 - Discrete Structures 4

The Statement/Proposition Game 520 < 111 Is this a statement? Is this a proposition? What is the truth value of the proposition? yes yes false Spring 2010 CPCS 222 - Discrete Structures 5

The Statement/Proposition Game y > 5 Is this a statement? Is this a proposition? yes no Its truth value depends on the value of y, but this value is not specified. We call this type of statement a propositional function or open sentence. Spring 2010 CPCS 222 - Discrete Structures 6

The Statement/Proposition Game Today is January 27 and 99 < 5. Is this a statement? Is this a proposition? yes yes What is the truth value of the proposition? false Spring 2010 CPCS 222 - Discrete Structures 7

The Statement/Proposition Game Please do not fall asleep. Is this a statement? no It s a request. Is this a proposition? no Only statements can be propositions. Spring 2010 CPCS 222 - Discrete Structures 8

The Statement/Proposition Game If the moon is made of cheese, then I will be rich. Is this a statement? Is this a proposition? What is the truth value of the proposition? yes yes probably true Spring 2010 CPCS 222 - Discrete Structures 9

The Statement/Proposition Game Is this a statement? Is this a proposition? x < y if and only if y > x. because its truth value does not depend on specific values of x and y. yes yes What is the truth value of the proposition? true Spring 2010 CPCS 222 - Discrete Structures 10

Combining Propositions As we have seen in the previous examples, one or more propositions can be combined to form a single compound proposition. We formalize this by denoting propositions with letters such as p, q, r, s, and introducing several logical operators or logical connectives. Spring 2010 CPCS 222 - Discrete Structures 11

Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT, ) Conjunction Disjunction Exclusive-or Implication Biconditional (AND, ) (OR, ) (XOR, ) (if then, ) (if and only if, ) Truth tables can be used to show how these operators can combine propositions to compound propositions. Spring 2010 CPCS 222 - Discrete Structures 12

Negation (NOT) Unary Operator, Symbol: P true (T) false (F) P false (F) true (T) Spring 2010 CPCS 222 - Discrete Structures 13

Conjunction (AND) Binary Operator, Symbol: P Q P Q T T T T F F F T F F F F Spring 2010 CPCS 222 - Discrete Structures 14

Disjunction (OR) Binary Operator, Symbol: P Q P Q T T T T F T F T T F F F Spring 2010 CPCS 222 - Discrete Structures 15

Exclusive Or (XOR) Binary Operator, Symbol: P Q P Q T T F T F T F T T F F F Spring 2010 CPCS 222 - Discrete Structures 16

Implication (if - then) Binary Operator, Symbol: P Q P Q T T T T F F F T T F F T Spring 2010 CPCS 222 - Discrete Structures 17

Biconditional (if and only if) Binary Operator, Symbol: P Q P Q T T T T F F F T F F F T Spring 2010 CPCS 222 - Discrete Structures 18

Statements and Operators Statements and operators can be combined in any way to form new statements. P Q P Q ( P) P) ( Q) T T F F F T F F T T F T T F T F F T T T Spring 2010 CPCS 222 - Discrete Structures 19

Statements and Operations Statements and operators can be combined in any way to form new statements. P Q P Q (P Q) ( P) P) ( Q) T T T F F T F F T T F T F T T F F F T T Spring 2010 CPCS 222 - Discrete Structures 20

Exercises To take discrete mathematics, you must have taken calculus or a course in computer science. When you buy a new car from Toyota Motor Company, you get SAR2000 back in cash or a 2% car loan. School is closed if more than 2 feet of snow falls or if the wind chill is below -100. Spring 2010 CPCS 222 - Discrete Structures 21

Exercises To take discrete mathematics, you must have taken calculus or a course in computer science. P: take discrete mathematics Q: take calculus R: take a course in computer science P Q R Problem with proposition R What if I want to represent take CPSC 222? Spring 2010 CPCS 222 - Discrete Structures 22

Exercises When you buy a new car from Toyota Motor Company, you get SAR2000 back in cash or a 2% car loan. P: buy a car from Toyota Motor Company Q: get SAR2000 cash back R: get a 2% car loan P Q R Why use XOR here? example of ambiguity of natural languages Spring 2010 CPCS 222 - Discrete Structures 23

Exercises School is closed if more than 2 meters of snow falls or if the wind chill is below - 100. P: School is closed Q: 2 meters of snow falls R: wind chill is below -100 Q R P Precedence among operators:,,,, Spring 2010 CPCS 222 - Discrete Structures 24