CS 340: Discrete Structures for Engineers

Similar documents
PROBLEM SET 3: PROOF TECHNIQUES

CS Module 1. Ben Harsha Apr 12, 2017

Introduction Propositional Logic

Inference and Proofs (1.6 & 1.7)

ICS141: Discrete Mathematics for Computer Science I

Course Staff. Textbook

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

MATH CSE20 Homework 5 Due Monday November 4

Proof by Contradiction

Math Real Analysis

Recitation 4: Quantifiers and basic proofs

Midterm Exam Solution

MATH 341, Section 001 FALL 2014 Introduction to the Language and Practice of Mathematics

Contradiction MATH Contradiction. Benjamin V.C. Collins, James A. Swenson MATH 2730

Basic Logic and Proof Techniques

1.1 Language and Logic

CSE 240 Logic and Discrete Mathematics

Proofs. Joe Patten August 10, 2018

AMTH140 Lecture 8. Symbolic Logic

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

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

Preparing for the CS 173 (A) Fall 2018 Midterm 1

CSE 311: Foundations of Computing I

Math 13, Spring 2013, Lecture B: Midterm

LECTURE 1. Logic and Proofs

Math.3336: Discrete Mathematics. Proof Methods and Strategy

Logic and Truth Tables

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

MAT 243 Test 1 SOLUTIONS, FORM A

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

MA103 STATEMENTS, PROOF, LOGIC

COT 2104 Homework Assignment 1 (Answers)

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

Logic, Sets, and Proofs

1.1 Language and Logic

Math.3336: Discrete Mathematics. Applications of Propositional Logic

MATH 2200 Final Review

Sec$on Summary. Mathematical Proofs Forms of Theorems Trivial & Vacuous Proofs Direct Proofs Indirect Proofs

MATH 135 Fall 2006 Proofs, Part IV

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

Some Review Problems for Exam 1: Solutions

Introducing Proof 1. hsn.uk.net. Contents

Section 1.2: Propositional Logic

We last time we began introducing equivalency laws.

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

More examples of mathematical. Lecture 4 ICOM 4075

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

EECS 1028 M: Discrete Mathematics for Engineers

CSE 20. Final Review. CSE 20: Final Review

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

Mathematical Reasoning (Part I) 1

Compound Propositions

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

Introduction to Basic Proof Techniques Mathew A. Johnson

Writing proofs for MATH 61CM, 61DM Week 1: basic logic, proof by contradiction, proof by induction

Math 10850, fall 2017, University of Notre Dame

Mathematics 220 Midterm Practice problems from old exams Page 1 of 8

For all For every For each For any There exists at least one There exists There is Some

Propositional natural deduction

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Section 3.1: Direct Proof and Counterexample 1

Intro to Algebra Today. We will learn names for the properties of real numbers. Homework Next Week. Due Tuesday 45-47/ 15-20, 32-35, 40-41, *28,29,38

Example 1: Identifying the Parts of a Conditional Statement

Elementary Logic and Proof

MATH 2200 Final LC Review

Basic Proof Examples

1.1 Statements and Compound Statements

Logic and Truth Tables

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.

Lecture 5 : Proofs DRAFT

CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions

CSC165. Larry Zhang, October 7, 2014

means is a subset of. So we say A B for sets A and B if x A we have x B holds. BY CONTRAST, a S means that a is a member of S.

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

Basics of Proofs. 1 The Basics. 2 Proof Strategies. 2.1 Understand What s Going On

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

Introduction. Outline. EE3321 Electromagnetic Field Theory. Welcome! About this class Rules and syllabus Let s get started! 9/19/2018. E t.

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

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Axiomatic systems. Revisiting the rules of inference. Example: A theorem and its proof in an abstract axiomatic system:

Announcements. Exam 1 Review

Adam Blank Spring 2017 CSE 311. Foundations of Computing I

Section 1.2: Conditional Statements

CS70: Discrete Math and Probability. Slides adopted from Satish Rao, CS70 Spring 2016 June 20, 2016

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Chapter 4: Classical Propositional Semantics

Do not open this exam until you are told to begin. You will have 75 minutes for the exam.

- 1.2 Implication P. Danziger. Implication

Boolean Logic. CS 231 Dianna Xu

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

CSC Discrete Math I, Spring Propositional Logic

PS10.3 Logical implications

CS1800: Mathematical Induction. Professor Kevin Gold

Discrete Structures for Computer Science

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

Transcription:

CS 340: Discrete Structures for Engineers Instructor: Prof. Harry Porter Office: FAB 115-06 harry@cs.pdx.edu Hours: Mon 3-4, Wed 3-4, or by appointment Website: web.cecs.pdx.edu/~harry/discrete Class Mailing List: PorterClassList2 (mailman) Important Dates: Exam #1 Exam #2 Final Exam - Thursday, June 10, 12:30PM Holiday - Monday, May 31 Grading: 10% Homeworks 10% In-class quizzes, class participation 50% Midterm exams 30% Final Exam CS340-Discrete Structures Page 1

Study Habits: Study the glossary of symbols and definitions; Get to know the language. Proficiency will come from doing problems. Go beyond the assigned work. Look at problems early so your subconscious has plenty of time to play with them. Review daily Read ahead, before each lecture. Don t expect immediate success. Anything worthwhile takes time and effort. Problem solving proficiency will be key to your success! Page 2

Slide Credits: Chris Brooks! Page 3

Section 1.1: What is a Proof? A proof is a demonstration that some statement is true. (There are other non-mathematical definitions.) A statement is true iff (if-and-only-if) we have a rigorous proof. We normally express proofs using English sentences mixed with symbols. We take a statement to be either true or false. If A and B are statements, not A negation opposite in truth value from A A and B conjunction true exactly when both A and B are true A or B disjunction true except when both A and B are false if A then B conditional statement A is the hypothesis, B is the conclusion Its contrapositive is if not B then not A Its converse is if B then A Page 4

Truth Tables A B not A A and B A or B if A then B if not B then not A T T F T T T T T F F F T F F F T T F T T T F F T F F T T Statements with the same truth table values are equivalent. This table shows that a conditional and its contrapositive are equivalent. Page 5

We ll demonstrate proofs using numbers. Some definitions: integers {, -2, -1, 0, 1, 2, } odd integers {, -3, -1, 1, 3, } They have the form 2k+1 for some integer k. even integers {, -4, -2, 0, 2, 4, } They have the form 2k for some integer k. m n m divides n if m 0 and n = km for some integer k p is prime if p>1 and its only divisors are 1 and p Characteristics of a good proof: It is clear and correct. It has a nice structure, like a good program. Broken up into separate parts that define and prove intermediate steps. Pieces are decomposable, independent. Easy to understand, follow, verify. Like a good scientific experiment: easy to replicate. Page 6

Proof Approach #1: Exhaustive Checking Some statements can be proven by checking all possible cases Must be a finite number. Example: There is a prime number between 200 and 220. Proof: Check exhaustively. Find that 211 is prime. QED Example: Each of the numbers 288, 198, and 387 is divisible by 9. Proof: Check that 9 divides each number. QED Page 7

Proof Approach #2: Conditional Proof Most statements we prove are conditionals. if A then B Start by assuming the hypothesis is true. Then try to find a statement that follows from the hypothesis and/or known facts. Continue deriving new statements until we reach the conclusion. Example: If x is odd and y is even then x-y is odd. Proof: Assume x is odd and y is even. Then x=2k+1 and y=2m for some integers k and m. So we have x-y = (2k+1) (2m) = 2(k-m) + 1 Since k-m must be an integer, 2(k-m)+1 must be odd. QED Example: If x is odd then x 2 is odd. Proof: Assume x is odd. Then x=2k+1 for some integer k. So we have x2 = (2k+1) 2 = 4k 2 + 4k + 1 = 2(2k 2 +2k) + 1 Since 2k 2 +2k must be an integer, 2(2k 2 +2k)+1 must be odd. QED Page 8

Example: If x is even then x 2 is even. Proof: In-class quiz Example: If x 2 is odd, then x is odd. Proof: The contrapositive of this statement is: If x is even, then x 2 is even which was proven in the previous example. QED Example: If x 2 is even, then x is even. Proof: In-class quiz Page 9

If and Only If Proofs iff A statement of the form A if and only if B means A iff B A implies B and B implies A Approach #1: Prove A implies B. Then prove B implies A. Approach #2: Create a chain of statements. A iff X 1 iff X 2 iff iff X n iff B Theorem: x is even if and only if x 2-2x+1 is odd. Proof: x is even iff x = 2k for some integer k (definition) iff x-1 = 2k-1 for some integer k (algebra) iff x-1 = 2(k-1)+1 for some integer k (algebra) iff x-1 is odd (definition) iff (x-1) 2 is odd (previous example) iff x 2-2x+1 is odd (algebra) QED Page 10

A false statement is called a contradiction. For example, S and not S is a contradiction for and statement S. Proof By Contradiction A truth table shows that if A then B is equivalent to A and not B implies false To prove if A then B, start by assuming A and assuming not B. Then argue toward a false statement the contradiction. If, from A and not B you can derive a statement that is false, you ve found a proof by contradiction. B must really be true. Page 11

Theorem: If x 2 is odd then x is odd. Proof: Assume that x 2 is odd and x is even. Then x=2k for some integer k. So we have x 2 = (2k) 2 = 4k 2 = 2(2k 2 ) Since 2k 2 is an integer, 2(2k 2 ) must be even. So x 2 is even. From the assumption we have x 2 is odd and x 2 is even This is a contradiction, proving the theorem is true! QED Theorem: if 2 5n then n is even. Proof: Assume that 2 5n and n is odd. Since 2 5n, we have 5n = 2d for some integer d. Since n is odd, we have n = 2k+1 for some integer k. Then we have 2d = 5n = 5(2k+1) = 10k+5 So 2d = 10k+5. Rewriting, we get 5 = 2d-10k = 2(d-5k) Since d-5k is an integer, we see that 5 is apparently a even number. False! Contradiction! So the theorem is proven. QED Page 12