CSE 20 DISCRETE MATH SPRING

Similar documents
CSE 20 DISCRETE MATH WINTER

Climbing an Infinite Ladder

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH SPRING

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH WINTER

Discrete Mathematics. Spring 2017

Climbing an Infinite Ladder

CSE 20 DISCRETE MATH WINTER

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

Mathematical Induction

Mathematical Induction. Section 5.1

CSE 20 DISCRETE MATH. Winter

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

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

Lecture 4: Probability, Proof Techniques, Method of Induction Lecturer: Lale Özkahya

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall

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

Exercises for Unit VI (Infinite constructions in set theory)

Math 230 Final Exam, Spring 2009

MATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8

Problem 1: Suppose A, B, C and D are finite sets such that A B = C D and C = D. Prove or disprove: A = B.

INDUCTION AND RECURSION. Lecture 7 - Ch. 4

CSE 20 DISCRETE MATH. Fall

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Any Wizard of Oz fans? Discrete Math Basics. Outline. Sets. Set Operations. Sets. Dorothy: How does one get to the Emerald City?

Show Your Work! Point values are in square brackets. There are 35 points possible. Some facts about sets are on the last page.

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

CSE 105 THEORY OF COMPUTATION

Models of Computation. by Costas Busch, LSU

MATH FINAL EXAM REVIEW HINTS

n n P} is a bounded subset Proof. Let A be a nonempty subset of Z, bounded above. Define the set

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

Announcements. Read Section 2.1 (Sets), 2.2 (Set Operations) and 5.1 (Mathematical Induction) Existence Proofs. Non-constructive

CSE 105 THEORY OF COMPUTATION

Today. Wrapup of Polynomials...and modular arithmetic. Coutability and Uncountability.

6 CARDINALITY OF SETS

CSE 20 DISCRETE MATH. Winter

SETS AND FUNCTIONS JOSHUA BALLEW

Reed-Solomon code. P(n + 2k)

Mathematical Induction

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

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

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

CS 125 Section #10 (Un)decidability and Probability November 1, 2016

Mathematical Induction. EECS 203: Discrete Mathematics Lecture 11 Spring

Propositional Logic. What is discrete math? Tautology, equivalence, and inference. Applications

Intro to Logic and Proofs

Sets. Introduction to Set Theory ( 2.1) Basic notations for sets. Basic properties of sets CMSC 302. Vojislav Kecman

CHAPTER 8: EXPLORING R

ASSIGNMENT 1 SOLUTIONS

Induction 1 = 1(1+1) = 2(2+1) = 3(3+1) 2

With Question/Answer Animations

PRINCIPLE OF MATHEMATICAL INDUCTION

Section Summary. Proof by Cases Existence Proofs

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

Set Theory. CSE 215, Foundations of Computer Science Stony Brook University

Math 564 Homework 1. Solutions.

1 Direct Proofs Technique Outlines Example Implication Proofs Technique Outlines Examples...

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

Properties of the Integers

Math 105A HW 1 Solutions

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

Propositional Logic, Predicates, and Equivalence

Discrete Mathematical Structures: Theory and Applications

CS173 Strong Induction and Functions. Tandy Warnow

Induction and recursion. Chapter 5

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms

Carmen s Core Concepts (Math 135)

Note that r = 0 gives the simple principle of induction. Also it can be shown that the principle of strong induction follows from simple induction.

Ch 3.2: Direct proofs

ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS

Solutions to Homework 2

a. See the textbook for examples of proving logical equivalence using truth tables. b. There is a real number x for which f (x) < 0. (x 1) 2 > 0.

CSE 105 THEORY OF COMPUTATION

Math 421, Homework #6 Solutions. (1) Let E R n Show that = (E c ) o, i.e. the complement of the closure is the interior of the complement.

Binomial Coefficient Identities/Complements

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

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

1 Sequences and Summation

Math 3000 Section 003 Intro to Abstract Math Final Exam

CISC-102 Fall 2017 Week 3. Principle of Mathematical Induction

Chapter 1 : The language of mathematics.

Problem Set 2: Solutions Math 201A: Fall 2016

Homework #1. Denote the sum we are interested in as To find we subtract the sum to find that

R1: Sets A set is a collection of objects sets are written using set brackets each object in onset is called an element or member

Discrete Mathematics. Spring 2017

Sets. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

Automata and Languages

CSE 311: Foundations of Computing. Lecture 26: Cardinality

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

CSC 344 Algorithms and Complexity. Proof by Mathematical Induction

Induction and Recursion

Functions and cardinality (solutions) sections A and F TA: Clive Newstead 6 th May 2014

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

Theorems. Theorem 1.11: Greatest-Lower-Bound Property. Theorem 1.20: The Archimedean property of. Theorem 1.21: -th Root of Real Numbers

ICS141: Discrete Mathematics for Computer Science I

Transcription:

CSE 20 DISCRETE MATH SPRING 2016 http://cseweb.ucsd.edu/classes/sp16/cse20-ac/

Today's learning goals Describe computer representation of sets with bitstrings Define and compute the cardinality of finite sets Explain the steps in a proof by mathematical induction Use mathematical induction to prove correctness of identities and inequalities properties of algorithms properties of geometric constructions

Representing sets Rosen p. 134 Set of home network components: { server, switch, workstation, wifi, iphone, laptop, Smartphone, Desktop Roommate1, Desktop Roommate2, Desktop Roommate3}

Representing sets Rosen p. 134 5 1 2 3 4 6 8 9 10 7 Set of home network components: { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

Representing sets Rosen p. 134 5 1 2 Set of home network components: { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} 3 8 9 10 4 6 How to represent the subset which contains all the desktop PCs? 7 A. {8, 9, 10} B. {10, 8, 9} C. {8, 8, 9, 10} D. None of the above. E. All of the above.

Representing sets Rosen p. 134 Alternatively: using bit strings 5 first bit is 0 if item 1 (server) is not in the set; 1 if it is 1 2 second bit is 0 if item 2 (switch) is not in the set; 1 if it is 3 4 6 How to represent the subset which contains all the desktop PCs using 8 9 bit 10 7strings? A. 0000000000 B. 0000000111 Set of home network components: C. 1110000000 { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} D. None of the above. E. All of the above.

Representing sets Rosen p. 134 Assume that universal set U is finite of size n (and n is not too big). Specify arbitrary ordering of elements of U: a 1, a 2, a 3,, a n. Represent set X by the bit string where, for each i, the ith bit in the bit string is 1 if a i is an element of X and it's 0 if a i is not an element of X. Describe, using set operations, the set described by the bit string which results from taking the bit string for A and flipping each bit 0 à 1, 1 à 0. A. The power set of A, B. The union of A with itself, C. The difference U A D. The Cartesian product E. None of the above.

Representing sets Rosen p. 134 Assume that universal set U is finite of size n (and n is not too big). Specify arbitrary ordering of elements of U: a 1, a 2, a 3,, a n. Represent set X by the bit string where, for each i, the ith bit in the bit string is 1 if a i is an element of X and it's 0 if a i is not an element of X. Describe, using set operations, the set described by the bit string which results from taking the bit string for A and flipping each bit 0 à 1, 1 à 0. may not be A. The power set of A, B. The union of A with itself, subset of U C. The difference U A D. The Cartesian product E. None of the above. Complement of A = A may not be subset of U

Operations on sets Rosen Sections 2.1, 2.2 If the set A is finite then What are the possible subsets of A? Does the power set of A depend just on the size of A? Does the size of the power set of A depend just on the size of A?

Operations on sets Rosen Sections 2.1, 2.2 If the set A is finite then What are the possible subsets of A? Represent subset X of A by the bit string where, for each i, the ith bit in the bit string is 1 if a i is an element of X and it's 0 if a i is not an element of X. Does the power set of A depend just on the size of A? Does the size of the power set of A depend just on the size of A? _ a 1 a 2 a 3 a 4 a A

Operations on sets Rosen Sections 2.1, 2.2 If the set A is finite then What are the possible subsets of A? Does the power set of A depend just on the size of A? Does the size of the power set of A depend just on the size of A? (0/1) (0/1) (0/1) (0/1)

Operations on sets Rosen Sections 2.1, 2.2 If the sets A, B are finite and disjoint then B many elements for each of the A many elements in A b 3 b 2 b 1 a 1 a 2 a 3

How do we prove these general formulas? b 3 b 2 b 1 a 1 a 2 a 3

How do we prove these general formulas? Key: how do sizes change as increase A by 1? b 3 b 2 b 1 a 1 a 2 a 3

How do we prove these general formulas? Key: how do sizes change as increase A by 1? b 3 b 2 b 1 a 1 a 2 a 3 How much does AxB change when we add one new element to A? A. Add one element. B. Add B many elements. C. Multiply number of elements by B. D. Raise number of elements to B th power. E. None of the above.

How do we prove these general formulas? Key: how do sizes change as increase A by 1? How much does P(A) change when we add one new element to A? A. Add one element. B. Add B many elements. C. Multiply number of elements by B. D. Raise number of elements to B th power. E. None of the above.

How do we prove these general formulas? b 3 b 2 b 1 a 1 a 2 a 3

How do we prove these general formulas? b 3 b 2 Recursive / Inductive definitions and induction! b 1 a 1 a 2 a 3

Induction: a road map Today What is a proof by induction? Examples: inequalities, algorithms, constructions Tuesday Strong induction Recursive definitions: functions, sets, sigma notation More examples / proofs: identities, constructions

Proof strategies so far Theorem: 8xP (x) over a given domain. Strategy (1): Let x be arbitrary element of the domain. WTS P(x) is true. Strategy (2) if domain finite: Enumerate all x in domain. WTS P(x) is true. Strategy (3) Proof by contradiction: Assume there is an x with P(x) false. WTS badness! Theorem: over a given domain. Strategy (1): Define x =. (some specific element in domain) WTS P(x) is true. Strategy (2) Proof by contradiction: Assume that for all x, P(x) is false. WTS badness! Theorem: over a given domain. Strategy (1): Toward direct proof, assume P and WTS Q. Strategy (2): Toward proof by contrapositive, assume Q is false and WTS P is also false. Strategy (3) Proof by contradiction: Assume both P is true and Q is false. WTS badness!

A new proof strategy Rosen p. 311 To show that some statement P(k) is true about all nonnegative integers k, 1. Show that it s true about 0 i.e. P(0) 2. Show P(0) à P(1) Hence conclude P(1) 3. Show P(1) à P(2) Hence conclude P(2) 4. Show P(2) à P(3) Hence conclude P(3) 5...

A new proof strategy Rosen p. 311 To show that some statement P(k) is true about all nonnegative integers k, 1. Show that it s true about 0 i.e. P(0) 2. Show P(0) à P(1) Hence conclude P(1) 3. Show P(1) à P(2) Hence conclude P(2) 4. Show P(2) à P(3) Hence conclude P(3) 5... Need both for induction to be applicable

Mathematical induction Rosen p. 311 To show that some statement P(k) is true about all nonnegative integers k, 1. Show that it s true about 0 i.e. P(0) 2. Show 8k P(k)! P (k + 1) Hence conclude P(1),

An inequality 1+ 1 n 2 1+ n 2 Theorem: This inequality is true for all nonnegative integers Proof: by Mathematical Induction. What's P(n)? A. B. C. D. E. None of the above.

An inequality 1+ 1 n 2 1+ n 2 Theorem: This inequality is true for all nonnegative integers Proof: by Mathematical Induction. 1. Basis step WTS 2. Inductive hypothesis Let k be a nonnegative integer. Assume 1+ 1 2 k 1+ k 2 1+ 1 2 0 1+ 0 2 3. Induction step WTS 1+ 1 k+1 1+ k +1 2 2

Robot Start at origin, moves on infinite 2-dimensional integer grid. At each step, move to diagonally adjacent grid point. Can it ever reach (1,0)?

Robot Lemma (Invariant): The sum of the coordinates of any state reachable by the robot is even. Proof of Lemma: by mathematical induction on the number of steps. Using proof: Sum of coordinates of (1,0) is 1 so not even!

Triangles Theorem: If start with an equilateral triangle and divide each side into n equal segments, then connect the division points with all possible line segments parallel to sides of original triangle, then many small triangles will be contained in the larger one.