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

Similar documents
CSE 20 DISCRETE MATH. Fall

CSC Discrete Math I, Spring Propositional Logic

CSE 20 DISCRETE MATH WINTER

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

Compound Propositions

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

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

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

Boolean Logic. CS 231 Dianna Xu

Definition 2. Conjunction of p and q

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

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

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

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

We last time we began introducing equivalency laws.

EECS 1028 M: Discrete Mathematics for Engineers

CSE 20 DISCRETE MATH WINTER

Chapter 1, Section 1.1 Propositional Logic

PROPOSITIONAL CALCULUS

Propositional Logic 1

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

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

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

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Math.3336: Discrete Mathematics. Applications of Propositional Logic

Discrete Mathematics

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

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

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

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

DISCRETE MATHEMATICS BA202

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

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

CSE 20: Discrete Mathematics

CSE 240 Logic and Discrete Mathematics

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

Propositional Logic. Spring Propositional Logic Spring / 32

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

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

CSE 20 DISCRETE MATH. Winter

Propositional logic ( ): Review from Mat 1348

Section 1.1: Logical Form and Logical Equivalence

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

Today s Topic: Propositional Logic

Discrete Structures of Computer Science Propositional Logic I

Introduction Propositional Logic

CSE 20 DISCRETE MATH. Winter

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

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

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

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

MAT2345 Discrete Math

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

Learning Goals of CS245 Logic and Computation

Discrete Structures for Computer Science

UNIT-I: Propositional Logic

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

2.2: Logical Equivalence: The Laws of Logic

CSE 20 DISCRETE MATH. Fall

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

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

Introduction. Applications of discrete mathematics:

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

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

AMTH140 Lecture 8. Symbolic Logic

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

software design & management Gachon University Chulyun Kim

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

Propositional Equivalence

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

CSE 311: Foundations of Computing. Lecture 3: Digital Circuits & Equivalence

Introduction to Decision Sciences Lecture 2

1.1 Language and Logic

Propositional Logic. Fall () Propositional Logic Fall / 30

Proofs. Joe Patten August 10, 2018

1.1 Language and Logic

Logic and Proof. Aiichiro Nakano

Topics in Logic and Proofs

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits

LOGIC & PROPOSITIONAL EQUIVALENCE

FUNDAMENTALS OF MATHEMATICS HANDOUT 1.3 DR. MCLOUGHLIN

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

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

Announcements CompSci 102 Discrete Math for Computer Science

DISCRETE STRUCTURES WEEK5 LECTURE1

Discrete Mathematics and Applications COT3100

The statement calculus and logic

THE LOGIC OF COMPOUND STATEMENTS

CSE 311: Foundations of Computing I

Mat 243 Exam 1 Review

The Foundations: Logic and Proofs. Part I

Logic and Proof. On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes!

15414/614 Optional Lecture 1: Propositional Logic

ECOM Discrete Mathematics

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.

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

Tautologies, Contradictions, and Contingencies

Transcription:

CSE 20 HW1 graded review form? HW2 released DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/

Today's learning goals Translate sentences from English to propositional logic using appropriate propositional variables and boolean operators. Truth tables: negation, conjunction, disjunction, exclusive or, conditional, biconditional operators. Evaluate the truth value of a compound proposition given truth values of its constituent variables. Form the converse, contrapositive, and inverse of a given conditional statement. Decide and justify whether or not a collection of propositions is consistent.

Logic Rosen Section 1.1 Use gates and circuits to express arithmetic. Precisely express theorems and invariant statements. Make valid arguments to prove theorems.

Circuits Propositions 0 (off) False 1 (on) (Order switched!) True p q p v q p ^ q p q T T T T F T F T F T F T T F T F F F F F

Definitions Rosen p. 2-4 Proposition: declarative sentence that is T or F (not both) Propositional variable: variables that represent propositions. Compound proposition: new propositions formed from existing propositions using logical operators. Truth table: table with 1 row for each of the possible combinations of truth values of the input and an additional column that shows the truth value of the result of the operation corresponding to a particular row.

Truth table: (p v q) v (p v r) How many rows are in the truth table for (p v q) v (p v r)? A. 1 B. 2 C. 3 D. 4 E. None of the above How do we fill in these rows? - Inputs - Output Precedence order of operations on p. 11

Truth tables Can use truth table to compute truth value of compound proposition. Also, can specify logical operator by truth table.

Truth tables Can use truth table to compute value of compound proposition. p q r (p v q) v (p v r) T T T T T F T F T T F F F T T F T F F F T F F F

Compound propositions Rosen p. 3-4, 21 p T F p F T Negation p q p v q p OR q p ^ q p AND q p q p XOR q T T T T F T F T F T F T T F T F F F F F Disjunction Conjunction p p p q p q p q p q Inverter OR gate AND gate XOR gate

Compound propositions Rosen p. 10 Consider the compound proposition p q T T? T F? F T? F F? To fill in rows Plug in values one row at a time. OR Use intermediate columns.

Compound propositions Rosen p. 10 Consider the compound proposition p q T T? T F? F T? F F?

Compound propositions Rosen p. 10 Consider the compound proposition p q T T F F F T T F F T T F F T T F T F F F T T T F Does this look familiar?

Logical equivalences Rosen p. 25 Compound propositions that have the same truth values in all possible cases are logically equivalent, denoted. p q T T T T F F F T F F F F What compound proposition is logically equivalent to? A. B. C. D. E. None of the above.

Tautology and contradiction Rosen p. 25 Tautology: compound proposition that is always T Contradiction: compound proposition that is always F p q F T T T F T T F F T F T F T F F F T Which of the following is a tautology? A. B. C. D. E.

Tautology and contradiction Rosen p. 25 Tautology: compound proposition that is always T Contradiction: compound proposition that is always F p q F T T T F T T F F T F T F T F F F T Are all compound propositions either tautologies or contradictions?

Translation Rosen p. 22: 1.2#7 Express the sentence "The message was sent from an unknown system but it was not scanned for viruses" using the propositions p: "The message is scanned for viruses" q: "The message was sent from an unknown system" A. B. C. D. E. None of the above.

System specification + consistency Rosen p. 18 Can such a system be built? System specifications are consistent if they do not contain conflicting requirements In other words: the specifications are consistent if there is a truth assignment to the input propositional variables that makes each specification true.

System specification + consistency Rosen p. 18 System specifications are consistent if they do not contain conflicting requirements Practically speaking Start with system specifications in English Translate to compound propositions Fill in truth table with one column for each of the specifications Look for row in truth table where each output column evaluates to T

Conditionals Rosen p. 6-10 p q p à q T T T T F F F T T F F T "If p, then q"

Conditionals Rosen p. 6-10 p q p à q T T T T F F F T T F F T "If p, then q" The only way to make a conditional statement false is to

Conditionals Rosen p. 6-10 Hypothesis Antecedent Conclusion Consequent p q p à q T T T T F F F T T F F T "If p, then q"

Conditionals Rosen p. 6-10 p q p à q q à p T T T T F F F T T F F T Converse of pà q Contrapositive of pà q Inverse of pà q

Conditionals Rosen p. 6-10 p q p à q q à p T T T T F F F F T T F F F F T Converse of pà q Contrapositive of pà q Inverse of pà q

Conditionals Rosen p. 6-10 p q p à q q à p T T T T T T T F F T F T F T T F T F F F T T T T Converse of pà q Contrapositive of pà q Inverse of pà q

Biconditionals Rosen p. 6-10 Which of these compound propositions is logically equivalent to? A. B. C. D. E. None of the above. "If and only if" "Necessary and sufficient" p q T T T T F F F T F F F T

Biconditionals Rosen p. 6-10 "If and only if" "Necessary and sufficient" Notice: Compound propositions A and B are logically equivalent iff Aß à B is a tautology p q T T T T F F F T F F F T

Translation Rosen p. 22: 1.2#7 Express the sentence "The message is scanned for viruses whenever the message was sent from an unknown system" using the propositions p: "The message is scanned for viruses" q: "The message was sent from an unknown system" A. B. C. D. E. None of the above.

System specification + consistency Rosen p. 23 #11 The router can send packets to the edge system only if it supports the new address space. For the router to support the new address space, it is necessary that the latest software release be installed. The router can send packets to the edge system if the latest software release is installed. The router supports the new address space.

System specification + consistency Rosen p. 23 #11 p only if q. For q, it is necessary that r. p if r. q.

System specification + consistency Rosen p. 23 #11 p only if q. For q, it is necessary that r. p if r. q.

System specification + consistency Rosen p. 18 p only if q. For q, it is necessary that r. p if r. Can such a system be built? q. System specifications are consistent if they do not contain conflicting requirements In other words: the specifications are consistent if there is a truth assignment to the input propositional variables that makes each specification true.

System specification + consistency Rosen p. 23 #11 p q r T T T T T T T T T F T F T T T F T F T T F T F F F T T F F T T T T F T F T F T F T T F F T T T F F F F F T T T F

System specification + consistency Rosen p. 18 p q r T T T T T T T T T F T F T T T F T F T T F T F F F T T F F T T T T F T F T F T F T T F F T T T F F F F F T T T F System specifications are consistent if they do not contain conflicting requirements

Reminders Discussion section tomorrow Review quiz "due" tomorrow HW2 due Friday