Review 1. Andreas Klappenecker

Similar documents
CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

Review 3. Andreas Klappenecker

CSCE 222 Discrete Structures for Computing. Review for the Final. Hyunyoung Lee

Review for Midterm 1. Andreas Klappenecker

Predicate Logic. Andreas Klappenecker

CSCE 222 Discrete Structures for Computing

Propositional Logic, Predicates, and Equivalence

2.1 Sets. Definition 1 A set is an unordered collection of objects. Important sets: N, Z, Z +, Q, R.

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

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

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

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

HANDOUT AND SET THEORY. Ariyadi Wijaya

Background for Discrete Mathematics

Equivalence of Propositions

Intro to Logic and Proofs

Functions. Given a function f: A B:

Logic, Sets, and Proofs

Sets McGraw-Hill Education

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

MAT115A-21 COMPLETE LECTURE NOTES

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.

CSCE 222 Discrete Structures for Computing. Review for Exam 2. Dr. Hyunyoung Lee !!!

Chapter Summary. Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.

We want to show P (n) is true for all integers

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Mathematics Review for Business PhD Students

Math 3336: Discrete Mathematics Practice Problems for Exam I

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Solutions to Homework Set 1

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

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

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

MATH 13 SAMPLE FINAL EXAM SOLUTIONS

Logic Overview, I. and T T T T F F F T F F F F

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

Chapter 1 Elementary Logic

MATH 2001 MIDTERM EXAM 1 SOLUTION

CSE 20 DISCRETE MATH SPRING

CSE 20 DISCRETE MATH WINTER

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Math 13, Spring 2013, Lecture B: Midterm

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

0 Sets and Induction. Sets

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

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

Mathematics Review for Business PhD Students Lecture Notes

Announcements. Exam 1 Review

Discrete Mathematical Structures: Theory and Applications

Discrete Mathematics. (c) Marcin Sydow. Sets. Set operations. Sets. Set identities Number sets. Pair. Power Set. Venn diagrams

Sets, Logic, Relations, and Functions

Math Fall 2014 Final Exam Solutions

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

4. Sets The language of sets. Describing a Set. c Oksana Shatalov, Fall Set-builder notation (a more precise way of describing a set)

Chapter 1 : The language of mathematics.

CSCE 222 Discrete Structures for Computing. Dr. Hyunyoung Lee

Chapter 2 - Basics Structures

Sets and Functions. MATH 464/506, Real Analysis. J. Robert Buchanan. Summer Department of Mathematics. J. Robert Buchanan Sets and Functions

Chapter Summary. Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Computability

Math 210 Exam 2 - Practice Problems. 1. For each of the following, determine whether the statement is True or False.

A Guide to Proof-Writing

4. Sets The language of sets. Describing a Set. c Oksana Shatalov, Fall

Section 2.2 Set Operations. Propositional calculus and set theory are both instances of an algebraic system called a. Boolean Algebra.

MTH 299 In Class and Recitation Problems SUMMER 2016

Discrete Mathematics

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination I (Spring 2008)

SETS AND FUNCTIONS JOSHUA BALLEW

COMP1002 exam study sheet

CSE 1400 Applied Discrete Mathematics Proofs

The Logic of Compound Statements cont.

Chapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60

Automata Theory and Formal Grammars: Lecture 1

Proofs. Joe Patten August 10, 2018

ANS: If you are in Kwangju then you are in South Korea but not in Seoul.

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

In N we can do addition, but in order to do subtraction we need to extend N to the integers

software design & management Gachon University Chulyun Kim

In N we can do addition, but in order to do subtraction we need to extend N to the integers

Contribution of Problems

REVIEW FOR THIRD 3200 MIDTERM

Fall 2014 CMSC250/250H Midterm II

ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS

With Question/Answer Animations. Chapter 2

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

Mathematical Reasoning Rules of Inference & Mathematical Induction. 1. Assign propositional variables to the component propositional argument.

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant).

CSC 125 :: Final Exam May 3 & 5, 2010

Today s Topics. Methods of proof Relationships to logical equivalences. Important definitions Relationships to sets, relations Special functions

5 Set Operations, Functions, and Counting

Introduction to Decision Sciences Lecture 6

Supplementary Logic Notes CSE 321 Winter 2009

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Discrete Mathematics. Spring 2017

Written Homework #1: Analysis of Algorithms

Transcription:

Review 1 Andreas Klappenecker

Summary Propositional Logic, Chapter 1 Predicate Logic, Chapter 1 Proofs, Chapter 1 Sets, Chapter 2 Functions, Chapter 2 Sequences and Sums, Chapter 2 Asymptotic Notations, Chapter 3 Time Complexity of Algorithms, Chapter 3

Strategy for Exam Preparation - Start studying now! - Make sure you know your definitions! - Do odd numbered exercises (Solutions are in the Appendix) - Review your quizzes - Review your homework

Logical Connectives - Summary Let B={t,f}. Assign to each connective a function M: B->B that determines its semantics. P M (P ) f t t f P Q M (P, Q) y if is false. M (P, Q) M (P, Q) M (P, Q) M (P, Q) f f f f f t t f t f t t t f t f f t t f f t t t t f t t

Alternative Summary Summary. Informally, we can summarize the meaning of the connectives as follows: 1) The and connective (a b) is true if and only if both a and b are true. 2) The or connective (a b) is true if and only if at least one of a, b is true. 3) The exclusive or (a b) is true if and only if precisely one of a, b is true. 4) The implication (a b) is false if and only if the premise a is true and the conclusion b is false. 5) The biconditional connective (a b) is true if and only if the truth values of a and b are the same. An interpretation of a subset S of Prop is an assignment of truth values to all variables that occur in the propositions contained in S. We showed that there exist a unique valuation extending an interpretation of all propositions.

Conditional Perhaps the most important logical connective is the conditional, also known as implication: p -> q The statement asserts that q holds on the condition that p holds. We call p the hypothesis or premise, and q the conclusion or consequence. Typical usage in proofs: If p, then q ; p implies q ; q only if p ; q when p ; q follows from p p is sufficient for q ; a sufficient condition for q is p ; a necessary condition for p is q ; q is necessary for p

Predicates A function P from a set D to the set Prop of propositions is called a predicate. The set D is called the domain of P. E: Z->{t,f} with E(x)= x is an even integer, E(6) is true; O: Z->{t,f} with O(x)= x is an odd integer; O(6) is false.

Logical Equivalence Two statements involving quantifiers and predicates are logically equivalent if and only if they have the same truth values no matter which predicates are substituted into these statements and which domain is used. We write A B for logically equivalent A and B. You use logical equivalences to derive more convenient forms statements. Example: De Morgan s laws.

De Morgan s Laws xp (x) x P (x) xp (x) x P (x) (p q) p q (p q) p q

Valid Arguments An argument in propositional logic is a sequence of propositions that end with a proposition called conclusion. The argument is called valid if the conclusion follows from the preceding statements (called premises). In other words, in a valid argument it is impossible that all premises are true but the conclusion is false.

Modus Ponens The tautology (p (p->q)) -> q is the basis for the rule of inference called modus ponens. p p -> q ------- q

Modus Tollens q p -> q ------ p The University will not close on Wednesday. If it snows on Wednesday, then the University will close. Therefore, It will not snow on Wednesday

Simplification p q ------ p

Formal Argument p q r p r s s t t Argument 1) p q Hypothesis 2) p Simplification of 1) 3) r p Hypothesis 4) r Modus tollens using 2) and 3) 5) r s Hyposthesis 6) s Modus ponens using 4), 5) 7) s t Hypothesis 8) t Modus ponens using 6), 7)

Sets, Functions, Summations

Set Builder Notation The set builder notation describes all elements as a subset of a set having a certain property. Q = { p/q R p Z, q Z, and q 0 } [a,b] = { x R a <= x <= b } [a,b) = { x R a <= x < b } (a,b] = { x R a < x <= b } (a,b) = { x R a < x < b } 16

Equality of Sets Two sets A and B are called equal if and only if they have the same elements. A = B if and only if x(x A x B) [To prove A=B, it is sufficient to show that both x(x A x B) and x(x B x A) hold. Why? ] 17

Subset A set A is a subset of B, written A B, if and only if every element of A is an element of B. Thus, A B if and only if x(x A x B) 18

Cardinality of a Set Let S be a set with a finite number of elements. We say that the set has cardinality n if and only if S contains n elements. We write S to denote the cardinality of the set. For example, = 0. 19

Power Sets Given a set S, the power set P(S) of S is the set of all subsets of S. Example: P( {1} ) = {, {1} } P( {1,2} ) = {, {1}, {2}, {1,2} } P( ) = { } since every set contains the empty set as a subset, even the empty set. P({ }) = {, { }}. 20

Cartesian Products Let A and B be sets. The Cartesian product of A and B, denote AxB, is the set of all pairs (a,b) with a A and b B. AxB = { (a,b) a A b B } 21

Set Operations Give two sets A and B. You should know - the union of A and B - the intersection of A and B - the set difference between A and B - the complement of A 22

De Morgan Laws A B = A B Proof : A B = {x x A B} by definition of complement = {x (x A B)} = {x (x A x B)} by definition of intersection = {x (x A) (x B)} de Morgan s law from logic = {x (x A) (x B)} by definition of = {x x A x B} by definition of complement = {x x A B} by definition of union = A B 23

Terminology Let f: A -> B be a function. We call - A the domain of f and - B the codomain of f. The range of f is the set f(a) = { f(a) a in A } 24

Functions Let A and B be sets. Consider a function f: A-> B. - When is f surjective? - When is f injective? - When is f bijective? 25

Floor Function The floor function : R -> Z assigns to a real number x the largest integer <= x. 3.2 = 3-3.2 = -4 3.99 = 3 26

Ceiling Function The ceiling function : R -> Z assigns to a real number x the smallest integer >= x. 3.2 = 4-3.2 = -3 0.5 = 1 27

Basic Facts We have x = n if and only if n <= x < n+1. We have x =n if and only if n-1< x <= n. We have x = n if and only if x-1 < n <= x. We have x =n if and only if x<= n < x+1. 28

Example Prove or disprove: x = x 29

Example 3 Let m = x Hence, m x <m+1 Thus, m 2 x < (m + 1) 2 It follows that m 2 x<(m + 1) 2 Therefore, m x<m+1 Thus, we can conclude that m = x This proves our claim. 30

Geometric Series Extremely useful! If a and r = 0 are real numbers, then n ar n+1 ar j a = r 1 if r = 1 (n + 1)a if r =1 j=0 Proof: The case r = 1 holds, since ar j = a for each of the n + 1 terms of the sum. The case r = 1 holds, since (r 1) n n j=0 arj = ar j+1 = j=0 n+1 ar j j=1 n ar j j=0 n ar j j=0 = ar n+1 a and dividing by (r 1) yields the claim.

Sum of First n Positive Integers. Extremely useful! For all n 1, we have n k = n(n + 1)/2 k=1 We prove this by induction. Basis step: For n = 1, we have 1 k=1 k = 1 = 1(1 + 1)/2.

Sum of the First n Positive Integers Induction Hypothesis: We assume that the claim holds for n 1. Induction Step: Assuming the Induction Hypothesis, we will show that the claim holds for n. n k=1 k = n + n 1 k=1 k = 2n/2 +(n 1)n/2 by Induction Hypothesis = 2n+n2 n 2 = n(n+1) 2 Therefore, the claim follows by induction on n.

Infinite Geometric Series Let x be a real number such that x < 1. Then k=0 x k = 1 1 x.

Infinite Geometric Series Since the sum of a geometric series satisfies we have k=0 n k=0 x k = lim n x k = xn+1 1 x 1, n k=0 As lim n x n+1 = 0, we get x k = lim n x n+1 1 x 1 x k = k=0 1 x 1 = 1 1 x.

Asymptotic Notations

Big Oh Notation Let f,g: N -> R be functions from the natural numbers to the set of real numbers. We write f O(g) if and only if there exists some real number n 0 and a positive real constant U such that f(n) <= U g(n) for all n satisfying n >= n 0

Big Ω We define f(n) = Ω(g(n)) if and only if there exists a constant L and a natural number n 0 such that L g(n) <= f(n) holds for all n >= n 0. In other words, f(n) = Ω(g(n)) if and only if g(n) = O(f(n)).

Big Θ We define f(n) = Θ(g(n)) if and only if there exist constants L and U and a natural number n 0 such that L g(n) <= f(n) <= U g(n) holds for all n >= n 0. In other words, f(n) = Θ(g(n)) if and only if f(n) = Ω(g(n)) and f(n) = O(g(n)).