Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.

Slides:



Advertisements
Similar presentations
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
Advertisements

Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
Lecture 3 Set Operations & Set Functions. Recap Set: unordered collection of objects Equal sets have the same elements Subset: elements in A are also.
CSE115/ENGR160 Discrete Mathematics 02/22/11 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 02/21/12
Sets Section 2.1. Introduction Sets are one of the basic building blocks for the types of objects considered in discrete mathematics. Important for counting.
Functions f( ) = A B Lecture 15: Nov 4.
Sets 1.
Sets 1.
Costas Busch - RPI1 Mathematical Preliminaries. Costas Busch - RPI2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
Courtesy Costas Busch - RPI1 Mathematical Preliminaries.
modified from UCI ICS/Math 6D, Fall Sets+Functions-1 Sets “Set”=Unordered collection of Objects “Set Elements”
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
1 Section 1.8 Functions. 2 Loose Definition Mapping of each element of one set onto some element of another set –each element of 1st set must map to something,
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
Chapter 7 Functions Dr. Curry Guinn. Outline of Today Section 7.1: Functions Defined on General Sets Section 7.2: One-to-One and Onto Section 7.3: The.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Relation, function 1 Mathematical logic Lesson 5 Relations, mappings, countable and uncountable sets.
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Sequences and Summations
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sifth Edition, Mc Graw-Hill, 2007 Chapter 2: Basic Structures: Sets, Functions, Sequences.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
ICS 253: Discrete Structures I
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Mathematical Preliminaries. Sets Functions Relations Graphs Proof Techniques.
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (2)
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Prof. Busch - LSU1 Mathematical Preliminaries. Prof. Busch - LSU2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
Example Prove that: “IF 3n + 2 is odd, then n is odd” Proof by Contradiction: -p = 3n + 2 is odd, q = n is odd. -Assume that ~(p  q) is true OR -(p 
2. 1 Basic structures Sets Set Operations Functions Sequences & Sums
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
A Universal Turing Machine
Functions Section 2.3. Section Summary Definition of a Function. – Domain, Cdomain – Image, Preimage Injection, Surjection, Bijection Inverse Function.
Relations, Functions, and Countability
2.1 Sets ‒Sets ‒Common Universal Sets ‒Subsets 2.2 Set Operations 2.3 Functions 2.4 Sequences and Summations 1.
CompSci 102 Discrete Math for Computer Science
Sets. Definitions (I) Collection of elements such that: There are no duplicates There is no order Special sets Universe (U or E): all elements under consideration.
Chapter 2 With Question/Answer Animations. Chapter Summary Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations.
Chapter 2 With Question/Answer Animations. Section 2.1.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
Introduction to Real Analysis Dr. Weihu Hong Clayton State University 8/27/2009.
Basic Structures: Sets, Functions, Sequences, and Sums.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
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.
Discrete Mathematics Set.
Chapter 2 With Question/Answer Animations. Section 2.1.
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.
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.
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Chapter 2 1. Chapter Summary Sets The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions and sequences.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
Chapter 2 With Question/Answer Animations. Chapter Summary Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations.
ICS 253: Discrete Structures I
A Universal Turing Machine
CS 2210:0001 Discrete Structures Sets and Functions
Discrete Math (2) Haiming Chen Associate Professor, PhD
Lecture 7 Functions.
CSE15 Discrete Mathematics 02/27/17
Formal Languages, Automata and Models of Computation
ICS 253: Discrete Structures I
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
Presentation transcript:

Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1

Sets Konstantin Busch - LSU2 A set is an unordered collection of objects English alphabet vowels: Odd positive integers less than 10: elements of set members of set

Konstantin Busch - LSU3 Other set representations Set of positive integers less than 100: Odd positive integers less than 10: omitted elements

Konstantin Busch - LSU4 Venn Diagram Universe

Konstantin Busch - LSU5 Useful sets Natural numbers Integers Positive integers Rational numbers Real numbers

Konstantin Busch - LSU6 Empty set

Konstantin Busch - LSU7 Cardinality (size) of set Number of elements infinite size Finite sets Infinite set

Konstantin Busch - LSU8 Equal sets Examples:

Konstantin Busch - LSU9 Subset Examples: For any set :

Konstantin Busch - LSU10 Proper Subset Examples:

Konstantin Busch - LSU11 is equivalent to

Konstantin Busch - LSU12 Power set The power set of contains all possible subsets of (and the empty set) Size of power set Power set Special cases

Konstantin Busch - LSU13 Ordered tuples (relations) Ordered n-tuple ordered list of elements iff Example:

Konstantin Busch - LSU14 Cartesian product Cartesian product of two sets Example: For this case: Size:

Konstantin Busch - LSU15 Cartesian product of sets Example: Size:

Konstantin Busch - LSU16 Sets and propositions shorthand for Truth set of proposition all elements of the domain which satisfy

Set operations Konstantin Busch - LSU17 Union

Konstantin Busch - LSU18 Intersection

Konstantin Busch - LSU19 Disjoint sets

Konstantin Busch - LSU20 Set difference

Konstantin Busch - LSU21 Complement

Konstantin Busch - LSU22 Size of union

Konstantin Busch - LSU23 De Morgan’s laws

Show that and Konstantin Busch - LSU24 Theorem: Proof: Part 1: De Morgan’s law from logic

Konstantin Busch - LSU25 Part 2: End of Proof De Morgan’s law from logic

Konstantin Busch - LSU26 Set identities Identity lawsDomination laws Idempotent laws Complementation law Complement laws De Morgan’s laws

Konstantin Busch - LSU27 Commutative lawsAssociative laws Absorption laws Distributive laws

Konstantin Busch - LSU28 Generalized unions and intersections

Konstantin Busch - LSU29 Example:

Konstantin Busch - LSU30 Computer representation of sets Represent sets as binary strings

Konstantin Busch - LSU31 Set operations become binary string operations Bitwise OR Bitwise AND

Konstantin Busch - LSU32 Powerset of

Functions Konstantin Busch - LSU33 Adams Chou Goodfriend Rodriguez Stevens A B C D F NamesGrades

Konstantin Busch - LSU34 DomainCodomain Image of Every element of domain has exactly one image maps to

Konstantin Busch - LSU35 Adams Chou Goodfriend Rodriguez Stevens A B C D F set of all images Domain Codomain

Konstantin Busch - LSU36

Konstantin Busch - LSU37 Equal functions same domain same codomain same mapping

Konstantin Busch - LSU38 In some programming languages, domain and codomain are explicitly defined int f(int a) { return a*a; }

Konstantin Busch - LSU39 Add and multiply functions Real numbers Example:

Konstantin Busch - LSU40 Image of set Example: Set

Konstantin Busch - LSU41 One-to-one (injection) function implies For every in domain Examples:is one-to-one is not one-to-one: a 1 2 b c d Each element of range is image of one element of domain

Konstantin Busch - LSU42 Increasing function: Strictly increasing: Strictly increasing functions are one-to-one

Konstantin Busch - LSU43 Onto (surjection) function For every there is such that Examples:is onto is not onto: a 1 2 b c d 3 Range = Codomain

Konstantin Busch - LSU44 One-to-one correspondence (bijection) function Examples:is bijection is not bijection a 1 2 b c d 3 a function which is one-to-one and onto 4 is bijectionIdentity function

Konstantin Busch - LSU45 a 1 2 b c 3 4 one-to-one not onto a 1 2 b c 3 not one-to-one onto d a 1 2 b c d 3 4 one-to-one onto a 1 2 b c d 3 4 not one-to-one not onto a 1 2 b c 3 4 not a function

Konstantin Busch - LSU46 Inverse of a bijection function when a 1 2 b c d 3 4 domaincodomain a 1 2 b c d 3 4 domain is invertible function Example:

Konstantin Busch - LSU47

Konstantin Busch - LSU48 Composition of functions Example:

Konstantin Busch - LSU49 identity function Suppose

Konstantin Busch - LSU50 Floor and Ceiling Floor function: Let be real largest integer less or equal to Ceiling function: smallest integer greater or equal to Examples:

Konstantin Busch - LSU51 Factorial function Stirling’s formula:

Sequences Konstantin Busch - LSU52 2, 4, 6, 8, 10 1,3,9,27,81,… Finite sequence Infinite sequence function from a subset of integers to a set Sequence: Alternate representation

Konstantin Busch - LSU53 Length of string: finite sequence: Empty string (null): String: all elements of sequence concatenated

Konstantin Busch - LSU54 Arithmetic progression Initial term Common difference Example:start with

Konstantin Busch - LSU55 Geometric progression Initial term Common ratio Example:start with

Konstantin Busch - LSU56 Summations Sum: Sequence: Example:

Konstantin Busch - LSU57 Theorem: Proof: End of Proof

Konstantin Busch - LSU58 Theorem:If are real numbers and, then Proof:Let

Konstantin Busch - LSU59 End of Proof

Konstantin Busch - LSU60 Useful Summation Formulas

Countable Sets Konstantin Busch - LSU61 Any finite set is countable by default An infinite set is countable if there is a one-to-one correspondence from to Countable finite set: Countable infinite set: Positive integers

Konstantin Busch - LSU62 Even positive integers: Positive integers: One-to-one Correspondence: corresponds to Theorem:Even positive integers are countable End of Proof Proof:

Konstantin Busch - LSU63 The set of rational numbers is countable all rational numbers: Theorem: Proof: We need to find a method to list

Konstantin Busch - LSU64 Naïve Approach Rational numbers: Positive integers: One-to-one correspondence: Doesn’t work: we will never list numbers with nominator 2: Start with nominator=1

Konstantin Busch - LSU65 Better Approach: scan diagonals Nomin.=1 Nomin.=2 Nomin.=3 Nomin.=4

Konstantin Busch - LSU66 first diagonal

Konstantin Busch - LSU67 second diagonal

Konstantin Busch - LSU68 third diagonal

Konstantin Busch - LSU69 Every element will be eventually scanned fourth diagonal…

Konstantin Busch - LSU70 Rational Numbers: One-to-one correspondence: Positive Integers: End of Proof Diagonal listing

Konstantin Busch - LSU71 Theorem:Set is uncountable Proof:Assume that is countable, then we can list its elements Elements of

Konstantin Busch - LSU72 List the elements of

Konstantin Busch - LSU73 Create new element based on diagonal

Konstantin Busch - LSU74 If diagonal element is 0 then set digit to 1

Konstantin Busch - LSU75 If diagonal element is not 0 then set digit to 0

Konstantin Busch - LSU76 If diagonal element is 0 then set digit to 1

Konstantin Busch - LSU77 If diagonal element is 0 then set digit to 1

Konstantin Busch - LSU78 If diagonal element is not 0 then set digit to 0

Konstantin Busch - LSU79 By repeating process we obtain new number

Konstantin Busch - LSU80 (differ on first digit)Observation:

Konstantin Busch - LSU81 (differ on second digit)Observation:

Konstantin Busch - LSU82 (differ on third digit)Observation:

Konstantin Busch - LSU83 (differ on digit)Observation: for every Contradiction! End of Proof

Konstantin Busch - LSU84 It follows that the set of real numbers is uncountable We have proven: It can be proven: Every subset of a countable set is countable

Konstantin Busch - LSU85 The previous proof technique is known as: Cantor diagonalization argument The same technique can be used in other proofs

Konstantin Busch - LSU86 Theorem:If is an infinite countable set, then the power set is uncountable Proof: Since is countable, we can list its elements Elements of

Konstantin Busch - LSU87 Elements of the power set have the form:

Konstantin Busch - LSU88 We encode each element of the powerset with a binary string of 0’s and 1’s Powerset elements Binary encoding (in arbitrary order)

Konstantin Busch - LSU89 Observation: Every infinite binary string corresponds to an element of the power set Example: Corresponds to:

Konstantin Busch - LSU90 Let’s assume (for contradiction) that the power set is countable Then: we can enumerate the elements of the powerset

Konstantin Busch - LSU91 Power set element Binary encoding suppose that this is the respective

Konstantin Busch - LSU92 Binary string: Complement of diagonal Take the binary string whose bits are the complement of the diagonal 0011

Konstantin Busch - LSU93 The binary string corresponds to an element of the power set :

Konstantin Busch - LSU94 Thus, must be equal to some : However, the i-th bit in the binary string of is different than the bit of, thus: Contradiction!!! i-th End of Proof