Discrete Structures for Computer Science

Slides:



Advertisements
Similar presentations
Countability. The cardinality of the set A is equal to the cardinality of a set B if there exists a bijection from A to B cardinality? bijection? injection.
Advertisements

EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 10 Cardinality Uncountability of the real numbers.
Introduction to Computability Theory
Great Theoretical Ideas in Computer Science.
Functions f( ) = A B Lecture 15: Nov 4.
Sequence A list of objects arranged in a particular order.
Lecture ,3.3 Sequences & Summations Proof by Induction.
1 Lecture 6 Topics –Proof of the existence of unsolvable problems Problems/languages not in REC Proof Technique –There are more problems/languages than.
Cantor’s Legacy: Infinity And Diagonalization Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 25Apr 13, 2004Carnegie.
1 CMSC 250 Chapter 7, Functions. 2 CMSC 250 Function terminology l A relationship between elements of two sets such that no element of the first set is.
Cardinality of Sets Section 2.5.
Sequences and Summations
2.4 Sequences and Summations
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6.
Week 7 - Friday.  What did we talk about last time?  Set disproofs  Russell’s paradox  Function basics.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Functions Section 2.3. Section Summary Definition of a Function. – Domain, Cdomain – Image, Preimage Injection, Surjection, Bijection Inverse Function.
Relations, Functions, and Countability
MATH 224 – Discrete Mathematics
COMPSCI 102 Introduction to Discrete Mathematics.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 09: SEQUENCES Section 3.2 Jarek Rossignac CS1050: Understanding.
INFIINITE SETS CSC 172 SPRING 2002 LECTURE 23. Cardinality and Counting The cardinality of a set is the number of elements in the set Two sets are equipotent.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Great Theoretical Ideas in Computer Science.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CompSci 102 Discrete Math for Computer Science February 7, 2012 Prof. Rodger Slides modified from Rosen.
Lecture 4 Infinite Cardinals. Some Philosophy: What is “2”? Definition 1: 2 = 1+1. This actually needs the definition of “1” and the definition of the.
Math 51/COEN 19. Sequences and Summations - vocab An arithmetic progression is a sequence of the form a, a+d, a+2d, …, a+nd, … with fixed a, d in R and.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.3, 7.4 and 7.5.
Section 3.2: Sequences and Summations. Def: A sequence is a function from a subset of the set of integers (usually the set of natural numbers) to a set.
CS 285- Discrete Mathematics
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability.
To Infinity And Beyond! CS Lecture 11 The Ideal Computer: no bound on amount of memory Whenever you run out of memory, the computer contacts the.
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
Sequences Lecture 11. L62 Sequences Sequences are a way of ordering lists of objects. Java arrays are a type of sequence of finite size. Usually, mathematical.
1-1 Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.4, Slide 1 Chapter 2 Sets and Functions.
Great Theoretical Ideas In Computer Science
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Discrete Mathematics Lecture 6
Discrete Mathematics CS 2610
CSE 20 – Discrete Mathematics
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
2.4 Sequences and Summations
Counting Sets.
Cardinality of Sets Section 2.5.
Countable or Uncountable…That is the question!
Lecture 7 Functions.
Quiz
CSE15 Discrete Mathematics 02/27/17
Countable and Countably Infinite Sets
Lesson 5 Relations, mappings, countable and uncountable sets
Uncountable sets & fixed points
ICS 253: Discrete Structures I
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Discrete Mathematics and its Applications
Lesson 5 Relations, mappings, countable and uncountable sets
Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance
Formal Languages, Automata and Models of Computation
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Discrete Mathematics CS 2610
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Section 2.6 Infinite Sets.
Cardinality Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted |A| = |B|, if and only if there is a one-to-one correspondence.
Intro to Theory of Computation
Presentation transcript:

Discrete Structures for Computer Science Presented By: Andrew F. Conn Adapted from: Adam J. Lee Lecture #9: Functions and Sequences September 28th, 2016

Announcements Homework 2 is due next class.

Today’s Topics Sequences and Summations Cardinality of Infinite Sets Important Sequences and Summations Closed form of summations. Cardinality of Infinite Sets Countable Sets Uncountable Sets

Important sequences Geometric progressions are sequences of the form 𝑎𝑟𝑛 where 𝑎 and 𝑟 are real numbers Examples: 1, 1 2 , 1 4 , 1 8 , 1 16 , … 2,−2, 2, −2, 2, −2, … Arithmetic progressions are sequences of the form 𝑎 + 𝑛𝑑 where 𝑎 and 𝑑 are real numbers. 2, 4, 6, 8, 10, … −10, −15, −20, −25, … 𝑎=1, 𝑟=½ 𝑎=2, 𝑟=−1 𝑎=2, 𝑑=2 𝑎=−10, 𝑑=−5

Important sequences Recurrence Relations are sequences of the form 𝑓 𝑛 =𝑓( 𝑓 𝑛−1 , 𝑓 𝑛−2 ,…) Examples: 1,2,6,24,120,720,… 1,1,2,3,5,8,13,21… 𝑓 𝑛 =𝑛∗ 𝑓 𝑛−1 𝑓 𝑛 = 𝑓 𝑛−1 + 𝑓 𝑛−2

Important Sums and their Closed Forms 𝑘=0 𝑛 𝑎 𝑟 𝑘 , 𝑟≠0 𝑎 𝑟 𝑛+1 −𝑎 𝑟−1 , 𝑟≠1 𝑘=1 𝑛 𝑘 𝑛 𝑛+1 2 𝑘=1 𝑛 𝑘 2 𝑛 𝑛+1 2𝑛+1 6 𝑘=1 𝑛 𝑘 3 𝑛 2 𝑛+1 2 4 𝑘=1 ∞ 𝑥 𝑘 , 𝑥 <1 1 1−𝑥 𝑘=1 ∞ 𝑘 𝑥 𝑘−1 , 𝑥 <1 1 1−𝑥 2 `

Infinite Cardinality Problem: It is easy to reason about the cardinality of finite sets by just counting the elements. It is more difficult to reason about the cardinality of infinite sets. Intuition: If we can compare two sets to one another we can determine something about their respective cardinalities. One set that is very useful for comparison to is the Natural Numbers (ℕ).

Injective, Surjective, Bijective … 𝐴 ≤ 𝐵 iff there exists an injection 𝑓:𝐴→𝐵. Intuitively, if all the values from 𝐴 can be mapped to 𝐵 by 𝑓, then 𝐵 must be at least as large as 𝐴. 𝐴 ≥ 𝐵 iff there exists a surjection 𝑓:𝐴→𝐵 Intuitively, every element of 𝐵 is mapped by at least one element of 𝐴 by 𝑓. 𝐴 = 𝐵 iff there exists a bijection 𝑓:𝐴→𝐵. Intuitively, if all the values from 𝐵 can be uniquely mapped to from all the values in 𝐴, then the sets are the same size. 𝐴 < 𝐵 iff there exists an injection, but not a bijection, 𝑓:𝐴→𝐵 Intuitively, if there exists an element in 𝐵 that is not mapped to from 𝐴 by 𝑓, then 𝐵 is strictly larger than 𝐴.

Countable Definitions Definition: We say that a set 𝐴 is countable iff there exists a injection 𝑓:𝐴→ℕ Definition: We say that a set 𝐴 is countably infinite iff there exists a bijection 𝑓:𝐴→ℕ

Show that the set of even natural numbers is countable Proof #1: We have the following injective correspondence between ℕ and the even natural numbers: So, the even natural numbers are countable. ❏ Proof #2: We can define 𝑓:ℕ→2ℕ as 𝑓 𝑛 =2𝑛. 𝑓 is a bijection, thus 2ℕ =|ℕ| and the even positive integers are countably infinite. ❏ 1 2 3 4 5 6 7 8 9 10 … 2 4 6 8 10 12 14 16 18 20 …

Show that ℤ is countably infinite. Proof: We have the following bijective correspondence between ℕ and ℤ: So, ℤ is countably infinite. ❏ 1 2 3 4 5 6 7 8 9 10 … -1 -2 -3 -4

Is the set ℚ + countable? Perhaps surprisingly, yes! 1 2 3 4 0 1 1 1 2 1 3 1 4 1 0 2 1 2 2 2 3 2 4 2 0 3 1 3 2 3 3 3 4 3 0 4 1 4 2 4 3 4 4 4 List p+q = 1 first, then p+q = 2, p+q =3, … This yields the sequence 0 1 , 1 1 , 0 2 , 0 3 , 1 2 , 2 1 , … If we remove the duplicates, we can define a function, 𝑓: ℚ + →ℕ using this method. Since 𝑓 is a bijection, ℚ + is countable. ❏

Is ℝ countable? No, it is not. We can prove this using a proof method called diagonalization, invented by Georg Cantor. Proof: Assume that the set of real numbers is countable. Then the subset of real numbers between 0 and 1 is also countable, by definition. This implies that the real numbers can be listed in some order, say, 𝑟 1 , 𝑟 2 , 𝑟 3 ,…. Let the decimal representation these numbers be: 𝑟 1 =0.𝑑11𝑑12𝑑13𝑑14… 𝑟 2 =0.𝑑21𝑑22𝑑23𝑑24… 𝑟 3 =0.𝑑31𝑑32𝑑33𝑑34… ⋮ = ⋮. ⋮ ⋮ ⋮ ⋮ ⋱ Where 𝑑𝑖𝑗∈ 0,1,2,3,4,5,6,7,8,9 ∀𝑖,𝑗

Proof (continued) Now, form a new decimal number 𝑟=0. 𝑑 1 𝑑 2 𝑑3… where 𝑑𝑖= 0, if 𝑑 𝑖,𝑖 =9 1, if 𝑑 𝑖,𝑖 =0 ⋮ Example: 𝑟1 = 0.123456… 𝑟2 = 0.234524… 𝑟3 = 0.631234… … 𝑟 = 0.242… 𝑟 is different from all of the 𝑟 𝑖 ’s in the list, namely in the 𝑖th decimal place. We assumed that there was a listing and found an element missing from the listing, thus no such element exists. Therefore the assumption that ℝ is countably infinite is false. ❏

Final thoughts Sets are the basis of functions, which are used throughout computer science and mathematics Sequences allow us to represent (potentially infinite) ordered lists of elements Functions allow us to compare sets and their relative sizes. Infinity is crazy! Next time: Integers and division (Section 4.1)