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.

Slides:



Advertisements
Similar presentations
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Advertisements

Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Functions Section 2.3 of Rosen Fall 2008
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/16/12 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.
modified from UCI ICS/Math 6D, Fall Sets+Functions-1 Sets “Set”=Unordered collection of Objects “Set Elements”
CS104 : Discrete Structures Chapter II Fundamental Structures.
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.
February 5, 2015Applied Discrete Mathematics Week 1: Logic and Sets 1 Homework Solution PQ  (P  Q) (  P)  (  Q)  (P  Q)  (  P)  (  Q) truetruefalsefalsetrue.
Functions.
Functions, Sequences, and Sums
Section 1.8: Functions A function is a mapping from one set to another that satisfies certain properties. We will first introduce the notion of a mapping.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
Sequences and Summations
2.1 Sets 2.2 Set Operations 2.3 Functions ‒Functions ‒ Injections, Surjections and Bijections ‒ Inverse Functions ‒Composition 2.4 Sequences and Summations.
FUNCTION Discrete Mathematics Asst. Prof. Dr. Choopan Rattanapoka.
February 12, 2015Applied Discrete Mathematics Week 2: Functions and Sequences 1Exercises Question 1: Given a set A = {x, y, z} and a set B = {1, 2, 3,
ICS 253: Discrete Structures I
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.
Fall 2002CMSC Discrete Structures1 … and the following mathematical appetizer is about… Functions.
10/26/20151 … and the following mathematical appetizer is about… Functions.
FUNCTIONS.
Functions Section 2.3 of Rosen Spring 2012 CSCE 235 Introduction to Discrete Structures Course web-page: cse.unl.edu/~cse235 Questions: Use Piazza.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
1 Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 1 The Foundations: Logic, Sets,
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 
Chapter 9 Functions Let A and B be nonempty sets. A function f from A to B, written f: A  B is a relation from A to B with the property that every element.
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
2. 1 Basic structures Sets Set Operations Functions Sequences & Sums
Basic Structures: Functions Muhammad Arief download dari
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
CompSci 102 Discrete Math for Computer Science January 31, 2012 Prof. Rodger Slides modified from Rosen AB a b c d x y z.
Functions Section 2.3. Section Summary Definition of a Function. – Domain, Cdomain – Image, Preimage Injection, Surjection, Bijection Inverse Function.
Discrete Mathematics R. Johnsonbaugh
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.
Basic Structures: Sets, Functions, Sequences, and Sums.
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.
Review 2 Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by lower.
Chapter 2 With Question/Answer Animations. Section 2.1.
CSci 2011 Discrete Mathematics Lecture 9, 10
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.
Set Operations Section 2.2.
Theory of Computing Topics Formal languages automata computability and related matters Purposes To know the foundations and principles of computer science.
Theory of Computing Topics Formal languages automata computability and related matters Purposes To know the foundations and principles of computer science.
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.
1 Lecture 5 Functions. 2 Functions in real applications Curve of a bridge can be described by a function Converting Celsius to Fahrenheit.
Section 2.3. Section Summary  Definition of a Function. o Domain, Cdomain o Image, Preimage  One-to-one (Injection), onto (Surjection), Bijection 
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.
FUNCTIONS.
ICS 253: Discrete Structures I
Sets Section 2.1.
CS 2210:0001 Discrete Structures Sets and Functions
CSE15 Discrete Mathematics 02/15/17
Functions Section 2.3.
CSE15 Discrete Mathematics 02/27/17
Set Operations Section 2.2.
CS100: Discrete structures
ICS 253: Discrete Structures I
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
Functions Section 2.3.
Presentation transcript:

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 integers less than 100 can be denoted as Definition 2. Two sets are equal if and only if they have the same elements. Example 3 A set can also consists of seemingly unrelated elements:

A set can be described by using a set builder notation. A set can be described by using a Venn diagram. Example 6 Draw a Venn diagram that presents V, the set of vowels in English alphabet. a,e,i,o,u V U

Definition 3. The set A is said to be a subset of B if and only if every element of A is also an element of B. We use the notation to indicate that A is a subset of the set B. The set that has no elements is called empty set, denoted by. A B U

Definition 4. Let S be a set. If there are exactly n distinct elements in S , where n is a nonnegative integer, we say that S is a finite set and n is the cardinality of S. The cardinality of S is denoted by |S|. Definition 5. A set is said to be infinite if it is not finite. Example 10 The set of positive integers is infinite.

The Power Set Definition 5. The power set of a set S is the set of all subsets of S, denoted by P(S). Cartesian Products

1.5 Set Operations Definition 1. Let A and B be sets. The union of the sets A and B, denoted by, is the set that contains those elements that are either A and B, or in both. That is Definition 2. Let A and B be sets. The intersection of the sets A and B, denoted by, is the set that contains those elements that are in both A and B. That is AB U B U

Definition 3 . Two sets are called disjoint if their intersection is the empty set. Definition 4. Let A and B be sets. The difference of A and B, denoted by A-B is the set containing of those elements that are in A but not in B. The difference of A and B is also called the complement of B with respect to A. That is, AB U

Definition 5. Let U be the universal set. The complement of the set A, denoted by, is the complement of A with respect to U. In other words, the complement of the set is U-A. That is, A U

Set Identities Table 1 Set Identities IdentityName Identity laws Domination laws Idempotent laws Complementation laws Commutative laws Associative laws Distributive laws De Morgan’s law

One way to prove that two sets are equal is to show that one of sets is a subset of the other and vise versa. One way to prove that two sets are equal is to use set builder and the rules of logic.

Set identities can be proved by using membership tables. Table 2. A membership table for the distributive Property A B C Set identities can be established by those that we have already proved.

1.6 Functions Definition 1. Let A and B be 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 unique element of B assigned by the function f to the element a of A. If f is a function from A to B, we write f : A B. Example 1 Let set A={Adams, Chou, Goodfriend, Rodriguez, Stevens} and B={A,B,C,D,F}. Let G be the function that assigns a grade to a student in our discrete mathematics. Adames Chou Goodfriend Rodriguez Stevens ABCDFABCDF G The domain of G is the set A={Adams, Chou, Goodfriend, Rodriguez, Stevens}, and the range of G is the set {A,B,C,F}. x y z A function x Not a function

Definition 2. If f is a function from A to B, we say that A is the domain of f and B is the codomain of f. If f(a)=b, we say that b is the image of a and a is a pre-image of b. The range of f is the set of all images of elements of A. Also, if f is a function from A to B, we say that f maps A to B. f a b=f(a) A B f The domain and codomain of f is Z, and the range of f is the set {0,1,4,9,…}.

Definition 4. Let f be a function from the set A to the set B and let S be a subset of A. The image of S is the subset of B that consists of the images of elements of S. We denote the image of S by f(S), so that S f(S) A B Example 4 Let A={a,b,c,d,e} and b={1,2,3,4} with f(a)=2, f(b)=1,f(c )=4, f(d)=1, and f(e)=1. The image of S={b,c,d} is the set f(S)={1,4}.

One-to-One and Onto Functions Definition 5. A function is said to be one-to-one, or injective, if and only if f(x)=f(y) implies that x=y for all x and y in the domain of f. A function is said to be an injection if it is one-to-one. xyxy f(x) f(y) function but not one-to-one xyxy f(x) f(y) one-to-one function Example 6 Determine whether the function f from {a,b,c,d} to {1,2,3,4,5} with f(a)=4, f(b)=5, f(c )=1, f(d)=3 is one to one. abcdabcd

Definition 6. A function f whose domain and codomain are subsets of the set of real numbers is called strictly increasing if f(x) f(y) whenever x<y and x and y are in the domain of f. A strictly increasing or strictly decreasing function must be one-to-one. Example 8 Determine whether the function f from {a,b,c,d} to {1,2,3} with f(a)=3, f(b)=2, f(c )=1, f(d)=3 is onto. abcdabcd B A onto A into B

Definition 8 . The function f is a one-to-one correspondence, or a bijection, if it is both one-to-one and onto. xyxy f(x) f(y) one-to-one AB AB onto + Example 10 one-to-one, not onto a b c onto, not one- to-one a b c a 1 one-to-one and onto b c e 1 neither one-to-one nor onto a b c e not a function a b c

Inverse Function and Compositions of fuctions f f A B A function is invertible if it is one-to-one correspondence, and it is not invertible if it is not one-to-one correspondence. Example 11 Let f be the function from the set of integers to the set of integers such that f(x)=x+1. Is f invertible, and if it is, what is its inverse?

aAaA g(a) B f(g(a)) C g f g f Example 13 Let f and g be the functions from the set of integers to the set of integers defined by f(x)=x+3 and g(x)=3x+2. What are Definition 10 . Let g be a function from set A to the set B and let f be a function from the set B to set C. The composition of the functions f and g, denoted by f g, is defined by

Let f be a one-to-one correspondence function from set A to set B and be the inverse of f. Some Important Functions Other Functions Polynomial functions logarithmic functions exponential functions

1.7 Sequences and Summations Definition 1. A sequence a is function from a subset of the set of integers to a set S. We use the notation to denote the image of the integer n. We call a term of the sequence. 1n2

Special Integer Sequences Finding a formula or a general rule for constructing the terms of a sequence. Are there are runs of the same value? Are terms obtained from previous terms by adding or multiplying a particular amount? Are the terms obtained by combining previous terms in a certain way? Example 3. What is a rule that can produce the terms of a sequence if the first 10 terms are 1,2,2,3,3,3,4,4,4,4? Example 4. What is a rule that can produce the terms of a sequence if the first 10 terms are 5,11,17,23,29,35,41,47,53,59? Solution: A reasonable guess is that the nth term is 5+6(n-1)=6n-1.

Summations