Basic Structures: Functions and Sequences

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

Lecture 15 Functions CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Prof. Shachar Lovett Clicker frequency: CA CSE 20 Discrete math Prof. Shachar Lovett
Chapter 2 The Basic Concepts of Set Theory
2.1 Sets. DEFINITION 1 A set is an unordered collection of objects. DEFINITION 2 The objects in a set are called the elements, or members, of the set.
1 Diagonalization Fact: Many books exist. Fact: Some books contain the titles of other books within them. Fact: Some books contain their own titles within.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 10 Cardinality Uncountability of the real numbers.
EE1J2 – Discrete Maths Lecture 9
Introduction to Computability Theory
1 Discrete Math CS 2800 Prof. Bart Selman Module Basic Structures: Functions and Sequences.
Sequence A list of objects arranged in a particular order.
Functions Goals Introduce the concept of function Introduce injective, surjective, & bijective functions.
Cardinality of a Set “The number of elements in a set.” Let A be a set. a.If A =  (the empty set), then the cardinality of A is 0. b. If A has exactly.
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
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.
THE NATURE OF SETS Copyright © Cengage Learning. All rights reserved. 2.
Sequences & Summations CS 1050 Rosen 3.2. Sequence A sequence is a discrete structure used to represent an ordered list. A sequence is a function from.
Sequences and Summations
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Functions. Copyright © Peter Cappello2 Definition Let D and C be nonempty sets. A function f from D to C, for each element d  D, assigns exactly 1 element.
1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6.
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
COMPSCI 102 Introduction to Discrete Mathematics.
Aim: How can the word ‘infinite’ define a collection of elements?
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.
Introduction to Real Analysis Dr. Weihu Hong Clayton State University 8/27/2009.
Basic Structures: Sets, Functions, Sequences, and Sums.
Cardinality with Applications to Computability Lecture 33 Section 7.5 Wed, Apr 12, 2006.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Great Theoretical Ideas in Computer Science.
CompSci 102 Discrete Math for Computer Science February 7, 2012 Prof. Rodger Slides modified from Rosen.
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
FUNCTIONS COSC-1321 Discrete Structures 1. Function. Definition Let X and Y be sets. A function f from X to Y is a relation from X to Y with the property.
Discrete Structures Li Tak Sing( 李德成 ) mt263f ppt 1.
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.
One of Cantor's basic concepts was the notion of the size or cardinality of a set M, denoted by |M|  M - finite sets M is an n-set or has size n, if.
1-1 Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.4, Slide 1 Chapter 2 Sets and Functions.
Cardinality with Applications to Computability
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Discrete Mathematics CS 2610
A Universal Turing Machine
CS 2210:0001 Discrete Structures Sets and Functions
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
2.4 Sequences and Summations
2.6 Infinite Sets By the end of the class you will be able calculate the cardinality of infinite sets.
Cardinality of Sets Section 2.5.
Discrete Math for Computer Science CSC 281
Discrete Math (2) Haiming Chen Associate Professor, PhD
Diagonalization Fact: Many books exist.
Discrete Structures for Computer Science
Countable and Countably Infinite Sets
ICS 253: Discrete Structures I
Discrete Mathematics CS 2610
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Section 2.6 Infinite Sets.
Basic Structures: Functions and Sequences
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.
Presentation transcript:

Basic Structures: Functions and Sequences Discrete Math CS 2800 Prof. Bart Selman selman@cs.cornell.edu Module Basic Structures: Functions and Sequences

Functions f(x) x f(x) = -(1/2)x – 1/2 Suppose we have: How do you describe the yellow function? f(x) = -(1/2)x – 1/2 What’s a function ?

Functions Note: Functions are also called mappings or transformations. More generally: B Definition: Given A and B, nonempty sets, a function f from A to B is an assignment of exactly one element of B to each element of A. We write f(a)=b if b is the element of B assigned by function f to the element a of A. If f is a function from A to B, we write f : AB. Note: Functions are also called mappings or transformations.

Functions Kathy Michael Toby John Chris Brad Carol Mary B A A = {Michael, Toby , John , Chris , Brad } B = { Kathy, Carla, Mary} Let f: A  B be defined as f(a) = mother(a). Michael Toby John Chris Brad Kathy Carol Mary A B

Functions - image & preimage image(S) For any set S  A, image(S) = {b : a  S, f(a) = b} So, image({Michael, Toby}) = {Kathy} image(A) = B - {Carol} range of f image(A) Michael Toby John Chris Brad Kathy Carol Mary B A image(John) = {Kathy} pre-image(Kathy) = {John, Toby, Michael}

Functions – one-to-one-correspondence or bijection A function f: A  B is bijective if it is one-to-one and onto. Every b  B has exactly 1 preimage. Anna Mark John Paul Sarah Carol Jo Martha Dawn Eve Anna Mark John Paul Sarah Carol Jo Martha Dawn Eve An important implication of this characteristic: The preimage (f-1) is a function! They are invertible.

Infinite Cardinality How can we extend the notion of cardinality to infinite sets? Definition: Two sets A and B have the same cardinality if and only if there exists a bijection (or a one-to-one correspondence) between them, A ~ B. We split infinite sets into two groups: Sets with the same cardinality as the set of natural numbers Sets with different cardinality as the set of natural numbers

Infinite Cardinality Definition: A set is countable if it is finite or has the same cardinality as the set of positive integers. Definition: A set is uncountable if it is not countable. Definition: The cardinality of an infinite set S that is countable is denotes by א0 (where א is aleph, the first letter of the Hebrew alphabet). We write |S| = א0 and say that S has cardinality “aleph null”. Note: Georg Cantor defined the notion of cardinality and was the first to realize that infinite sets can have different cardinalities. א0 is the cardinality of the natural numbers; the next larger cardinality is aleph-one א1, then, א2 and so on.

Infinite Cardinality: Odd Positive Integers Example: The set of odd positive integers is a countable set. Let’s define the function f, from Z+ to the set of odd positive numbers, f(n) = 2 n -1 We have to show that f is both one-to-one and onto. one-to-one Suppose f(n)= f(m)  2n-1 = 2m-1  n=m onto Suppose that t is an odd positive integer. Then t is 1 less than an even integer 2k, where k is a natural number. hence t=2k-1= f(k).

Infinite Cardinality: Odd Positive Integers 2

Infinite Cardinality: Integers Example: The set of integers is a countable set. Lets consider the sequence of all integers, starting with 0: 0,1,-1,2,-2,…. We can define this sequence as a function: 1 -1 2 f(n) = 2 Show at home that it’s one-to-one and onto

Infinite Cardinality: Rational Numbers Example: The set of positive rational numbers is a countable set. Hmm…

Infinite Cardinality: Rational Numbers Example: The set of positive rational numbers is a countable set Key aspect to list the rational numbers as a sequence – every positive number is the quotient p/q of two positive integers. Visualization of the proof. p+q=2 p+q=3 p+q=4 p+q=5 p+q=6 Since all positive rational numbers are listed once, the set of positive rational numbers is countable.

Real Numbers: Uncountable Example; The set of real numbers is an uncountable set. Let’s assume that the set of real numbers is countable. Therefore any subset of it is also countable, in particular the interval [0,1]. How many real numbers are in interval [0, 1]?

Real Numbers … How many real numbers are in interval [0, 1]? “Countably many! There’s part of the list!” 0.4 3 2 9 0 1 3 2 9 8 4 2 0 3 9 … 0.8 2 5 9 9 1 3 2 7 2 5 8 9 2 5 … 0.9 2 5 3 9 1 5 9 7 4 5 0 6 2 1 … … “Are you sure they’re all there?” Counterexample: Use diagonalization to create a new number that differs in the ith position of the ith number by 1. 0.5 3 6 … So we say the reals are “uncountable.”