Introduction Propositional Logic

Similar documents
Lecture 02: Propositional Logic

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

ICS141: Discrete Mathematics for Computer Science I

Course Staff. Textbook

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

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

Knowledge Representation. Propositional logic.

CSC Discrete Math I, Spring Propositional Logic

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

Discrete Mathematics

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

PROPOSITIONAL CALCULUS

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

Today s Topic: Propositional Logic

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

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

Knowledge Representation. Propositional logic

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

Math.3336: Discrete Mathematics. Applications of Propositional Logic

Discrete Structures for Computer Science

EECS 1028 M: Discrete Mathematics for Engineers

CSE 311: Foundations of Computing I

CSE 240 Logic and Discrete Mathematics

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

Compound Propositions

MAT2345 Discrete Math

Chapter 1, Section 1.1 Propositional Logic

Adam Blank Spring 2017 CSE 311. Foundations of Computing I

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

CS 340: Discrete Structures for Engineers

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

FOUNDATION OF COMPUTER SCIENCE ETCS-203

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Lecture 4. Predicate logic

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

Introduction. Applications of discrete mathematics:

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

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

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

CSE 20 DISCRETE MATH. Fall

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

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

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

AMTH140 Lecture 8. Symbolic Logic

Section 1.1: Logical Form and Logical Equivalence

Discrete Structures of Computer Science Propositional Logic I

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

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

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

1.1 Language and Logic

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

1.1 Language and Logic

We last time we began introducing equivalency laws.

About the course. CSE 321 Discrete Structures. Why this material is important. Topic List. Propositional Logic. Administration. From the CSE catalog:

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

ICS141: Discrete Mathematics for Computer Science I

Countable and uncountable sets. Matrices.

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.

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

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

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

Math.3336: Discrete Mathematics. Propositional Equivalences

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

software design & management Gachon University Chulyun Kim

PHIL 422 Advanced Logic Inductive Proof

Logic: Propositional Logic (Part I)

Introduction to Theoretical Computer Science

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

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

Logic and Propositional Calculus

Midterm Exam Solution

DISCRETE MATHEMATICS BA202

CS Module 1. Ben Harsha Apr 12, 2017

The Logic of Compound Statements cont.

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

Section 1.2: Conditional Statements

Propositional Equivalence

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

Chapter 1 Elementary Logic

Symbolic Logic Outline

Section L.1- Introduction to Logic

Section A (not in the text) Which of the following are statements? Explain. 3. The President of the United States in 2089 will be a woman.

Math/EECS 1028M: Discrete Mathematics for Engineers Winter Suprakash Datta

Propositional Logic. Spring Propositional Logic Spring / 32

Chapter 1: Formal Logic

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1

CSC165 Mathematical Expression and Reasoning for Computer Science

UNIT-I: Propositional Logic

Introduction Introduction. Discrete Mathematics Andrei Bulatov

DISCRETE STRUCTURES WEEK5 LECTURE1

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

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.

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

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

Definition 2. Conjunction of p and q

CS70 is a course about on Discrete Mathematics for Computer Scientists. The purpose of the course is to teach you about:

Solutions to Homework I (1.1)

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

Transcription:

Discrete Mathematics for CSE of KU Introduction Propositional Logic Instructor: Kangil Kim (CSE) E-mail: kikim01@konkuk.ac.kr Tel. : 02-450-3493 Room : New Milenium Bldg. 1103 Lab : New Engineering Bldg. 1202 All slides are based on CS441 Discrete Mathematics for Computer Science course of the University of Pittsburgh given and opened by Milos Hauskrecht. Course administrivia Instructor: Kangil Kim (CSE) E-mail: kikim01@konkuk.ac.kr Tel. : 02-450-3493 Room : New Milenium Bldg. 1103 Lab : New Engineering Bldg. 1202 Course web page: http://home.konkuk.ac.kr/~khidpig/lecture/2017_1/dm 1

Course administrivia Time and Place: Monday: 10:30 AM - 11:45 AM, Room No. 303 Friday: 09:30 AM - 10:45 AM, Room No. 504 Prerequisites: No prerequisite courses Course administrivia Textbook: Kenneth H. Rosen. Discrete Mathematics and Its Applications, 7th Edition, McGraw Hill, 2012. 2

Course administrivia Grading policy Midterm Exam: 35% Finalterm Exam: 35% Homework Assignments: 20% Attendance Rate: 10% Course administrivia Homework assignments Assigned in class and posted on the course web page Due: one week after each posting No extension policy Collaboration policy: You may discuss the material covered in the course with your fellow students in order to understand it better However, homework assignments should be worked on and written up individually 3

Course administrivia Course policies: Any un-intellectual behavior and cheating on exams, homework assignments, quizzes will be dealt with severely If you feel you may have violated the rules speak to us as soon as possible. Course syllabus Tentative topics: (not sequentially given) Logic and proofs Sets Functions Integers and modular arithmetic Sequences and summations Counting Probability Relations Graphs 4

Course administrivia Questions Discrete mathematics Discrete mathematics study of mathematical structures and objects that are fundamentally discrete rather than continuous. Examples of objects with discrete values are integers, graphs, or statements in logic. Discrete mathematics and computer science. Concepts from discrete mathematics are useful for describing objects and problems in computer algorithms and programming languages. These have applications in cryptography, automated theorem proving, and software development. 5

Course syllabus Tentative topics: Logic and proofs Sets Functions Integers and modular arithmetic Sequences and summations Counting Probability Relations Graphs Course syllabus Tentative topics: Logic and proofs Sets Functions Integers and modular arithmetic Sequences and summations Counting Probability Relations Graphs 6

Logic Logic: defines a formal language for representing knowledge and for making logical inferences It helps us to understand how to construct a valid argument Logic defines: Syntax of statements The meaning of statements The rules of logical inference (manipulation) The simplest logic Propositional logic Definition: A proposition is a statement that is either true or false. Examples: Pitt is located in the Oakland section of Pittsburgh. (T) 5 + 2 = 8. (F) It is raining today. (either T or F) 7

Propositional logic Examples (cont.): How are you? a question is not a proposition x + 5 = 3 since x is not specified, neither true nor false 2 is a prime number. (T) She is very talented. since she is not specified, neither true nor false There are other life forms on other planets in the universe. either T or F Composite statements More complex propositional statements can be build from elementary statements using logical connectives. Example: Proposition A: It rains outside Proposition B: We will see a movie A new (combined) proposition: If it rains outside then we will see a movie 8

Composite statements More complex propositional statements can be build from elementary statements using logical connectives. Logical connectives: Negation Conjunction Disjunction Exclusive or Implication Biconditional Negation Definition: Let p be a proposition. The statement "It is not the case that p." is another proposition, called the negation of p. The negation of p is denoted by p and read as "not p." Example: Pitt is located in the Oakland section of Pittsburgh. It is not the case that Pitt is located in the Oakland section of Pittsburgh. Other examples: 5 + 2 8. 10 is not a prime number. It is not the case that buses stop running at 9:00pm. 9

Negation Negate the following propositions: It is raining today. It is not raining today. 2 is a prime number. 2 is not a prime number There are other life forms on other planets in the universe. It is not the case that there are other life forms on other planets in the universe. Negation A truth table displays the relationships between truth values (T or F) of different propositions. p p T F F T Rows: all possible values of elementary propositions: 10

Conjunction Definition: Let p and q be propositions. The proposition "p and q" denoted by p q, is true when both p and q are true and is false otherwise. The proposition p q is called the conjunction of p and q. Examples: Pitt is located in the Oakland section of Pittsburgh and 5 + 2 = 8 It is raining today and 2 is a prime number. 2 is a prime number and 5 + 2 8. 13 is a perfect square and 9 is a prime. Disjunction Definition: Let p and q be propositions. The proposition "p or q" denoted by p q, is false when both p and q are false and is true otherwise. The proposition p q is called the disjunction of p and q. Examples: Pitt is located in the Oakland section of Pittsburgh or 5 + 2 = 8. It is raining today or 2 is a prime number. 2 is a prime number or 5 + 2 8. 13 is a perfect square or 9 is a prime. 11

Truth tables Conjunction and disjunction Four different combinations of values for p and q p q p q p q T T T F F T F F Rows: all possible combinations of values for elementary propositions: 2 n values Truth tables Conjunction and disjunction Four different combinations of values for p and q p q p q p q T T T T F F F T F F F F NB: p q (the or is used inclusively, i.e., p q is true when either p or q or both are true). 12

Truth tables Conjunction and disjunction Four different combinations of values for p and q p q p q p q T T T T T F F T F T F T F F F F NB: p q (the or is used inclusively, i.e., p q is true when either p or q or both are true). Exclusive or Definition: Let p and q be propositions. The proposition "p exclusive or q" denoted by p q, is true when exactly one of p and q is true and it is false otherwise. p q p q T T F T F T F T T F F F 13

Implication Definition: Let p and q be propositions. The proposition "p implies q" denoted by p q is called implication. It is false when p is true and q is false and is true otherwise. In p q, p is called the hypothesis and q is called the conclusion. p q p q T T T T F F F T T F F T Implication p q is read in a variety of equivalent ways: if p then q p only if q p is sufficient for q q whenever p Examples: if Steelers win the Super Bowl in 2013 then 2 is a prime. If F then T? 14

Implication p q is read in a variety of equivalent ways: if p then q p only if q p is sufficient for q q whenever p Examples: if Steelers win the Super Bowl in 2013 then 2 is a prime. T if today is Tuesday then 2 * 3 = 8. What is the truth value? Implication p q is read in a variety of equivalent ways: if p then q p only if q p is sufficient for q q whenever p Examples: if Steelers win the Super Bowl in 2013 then 2 is a prime. T if today is Tuesday then 2 * 3 = 8. If T then F 15

Implication p q is read in a variety of equivalent ways: if p then q p only if q p is sufficient for q q whenever p Examples: if Steelers win the Super Bowl in 2013 then 2 is a prime. T if today is Tuesday then 2 * 3 = 8. F Implication The converse of p q is q p. The contrapositive of p q is q p The inverse of p q is p q Examples: If it snows, the traffic moves slowly. p: it snows q: traffic moves slowly. p q The converse: If the traffic moves slowly then it snows. q p 16

Implication The contrapositive of p q is q p The inverse of p q is p q Examples: If it snows, the traffic moves slowly. The contrapositive: If the traffic does not move slowly then it does not snow. q p The inverse: If it does not snow the traffic moves quickly. p q Biconditional Definition: Let p and q be propositions. The biconditional p q (read p if and only if q), is true when p and q have the same truth values and is false otherwise. p q p q T T T T F F F T F F F T Note: two truth values always agree. 17

Constructing the truth table Example: Construct a truth table for (p q) ( p q) Simpler if we decompose the sentence to elementary and intermediate propositions p q p p q p q (p q) ( p q) T T T F F T F F Constructing the truth table Example: Construct the truth table for (p q) ( p q) Rows: all possible combinations of values p q p for p elementary q p q (p q) propositions: ( p q) T T 2 n values T F F T F F 18

Constructing the truth table Example: Construct the truth table for (p q) ( p q) Typically the target (unknown) compound proposition and its values p q p p q p q (p q) ( p q) T T F F T F T F Auxiliary compound propositions and their values Constructing the truth table Examples: Construct a truth table for (p q) ( p q) p q p p q p q (p q) ( p q) T T F T F F F T T F F T 19

Constructing the truth table Examples: Construct a truth table for (p q) ( p q) p q p p q p q (p q) ( p q) T T F T T F F F F T T T F F T T Constructing the truth table Examples: Construct a truth table for (p q) ( p q) p q p p q p q (p q) ( p q) T T F T F T F F F T F T T T T F F T T F 20

Constructing the truth table Examples: Construct a truth table for (p q) ( p q) Simpler if we decompose the sentence to elementary and intermediate propositions p q p p q p q (p q) ( p q) T T F T F F T F F F T F F T T T T T F F T T F F 21