Sets McGraw-Hill Education

Similar documents
A set is an unordered collection of objects.

Chapter Summary. Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.

Chapter Summary. Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Computability

With Question/Answer Animations. Chapter 2

Sets are one of the basic building blocks for the types of objects considered in discrete mathematics.

Sec$on Summary. Definition of sets Describing Sets

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

Propositional Logic, Predicates, and Equivalence

Discrete Mathematics. (c) Marcin Sydow. Sets. Set operations. Sets. Set identities Number sets. Pair. Power Set. Venn diagrams

Chapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60

Chapter 2 - Basics Structures

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Spring

Chapter 1 : The language of mathematics.

Mathematics Review for Business PhD Students

Background for Discrete Mathematics

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

BASIC MATHEMATICAL TECHNIQUES

Sets and Functions. MATH 464/506, Real Analysis. J. Robert Buchanan. Summer Department of Mathematics. J. Robert Buchanan Sets and Functions

Mathematics Review for Business PhD Students Lecture Notes

4. Sets The language of sets. Describing a Set. c Oksana Shatalov, Fall Set-builder notation (a more precise way of describing a set)

4. Sets The language of sets. Describing a Set. c Oksana Shatalov, Fall

Review 1. Andreas Klappenecker

CS 173: Discrete Structures. Eric Shaffer Office Hour: Wed. 1-2, 2215 SC

MATH 215 Sets (S) Definition 1 A set is a collection of objects. The objects in a set X are called elements of X.

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

CHAPTER 1. Preliminaries. 1 Set Theory

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

ICS141: Discrete Mathematics for Computer Science I

CSCE 222 Discrete Structures for Computing

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

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

Discrete Basic Structure: Sets

Discrete Mathematical Structures: Theory and Applications

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

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

Also, course highlights the importance of discrete structures towards simulation of a problem in computer science and engineering.

Notation Index. gcd(a, b) (greatest common divisor) NT-16

Foundations of Mathematics

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Sets. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

CS 2336 Discrete Mathematics

CS Discrete Mathematics Dr. D. Manivannan (Mani)

Set Theory. CPT Section D Quantitative Aptitude Chapter 7 Brijeshwar Prasad Gupta

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

Week Some Warm-up Questions

SETS AND FUNCTIONS JOSHUA BALLEW

Math Fall 2014 Final Exam Solutions

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

SETS. JEE-Mathematics

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

1 Chapter 1: SETS. 1.1 Describing a set

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant).

Equivalence of Propositions

CSE 20 DISCRETE MATH. Winter

0 Sets and Induction. Sets

n CS 160 or CS122 n Sets and Functions n Propositions and Predicates n Inference Rules n Proof Techniques n Program Verification n CS 161

Automata Theory and Formal Grammars: Lecture 1

A B is shaded A B A B

Today s topics. Introduction to Set Theory ( 1.6) Naïve set theory. Basic notations for sets

Introduction to Set Operations

COMP9020 Lecture 3 Session 2, 2014 Sets, Functions, and Sequences. Revision: 1.3

Today s Topics. Methods of proof Relationships to logical equivalences. Important definitions Relationships to sets, relations Special functions

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

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

1. SET 10/9/2013. Discrete Mathematics Fajrian Nur Adnan, M.CS

Math 42, Discrete Mathematics

HANDOUT AND SET THEORY. Ariyadi Wijaya

A Semester Course in Basic Abstract Algebra

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

1.4 Cardinality. Tom Lewis. Fall Term Tom Lewis () 1.4 Cardinality Fall Term / 9

Chapter 1. Sets and Mappings

Exclusive Disjunction

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

Set Operations. Combining sets into new sets

Intro to Logic and Proofs

CS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic:

Supplementary Material for MTH 299 Online Edition

CA320 - Computability & Complexity

0 Logical Background. 0.1 Sets

Discrete Mathematics Set Operations

Introduction to Proofs

18.S097 Introduction to Proofs IAP 2015 Lecture Notes 1 (1/5/2015)

Numbers, sets, and functions

CSI30. Chapter 2. Basic Structures: Sets, Functions, Sequences, Sums. 2.1 Sets and subsets 2.2 Sets of sets

Discrete Mathematics

Operations on Sets. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 6, 2012

Chapter 2 Sets, Relations and Functions

Functions. Definition 1 Let A and B be sets. A relation between A and B is any subset of A B.

POL502: Foundations. Kosuke Imai Department of Politics, Princeton University. October 10, 2005

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

MAT115A-21 COMPLETE LECTURE NOTES

Section 0. Sets and Relations

1.1 Introduction to Sets

COMP9020 Lecture 3 Session 2, 2016 Sets, Functions, and Sequences. Revision: 1.3

CHAPTER 1 SETS AND EVENTS

Sets, Proofs and Functions. Anton Velinov

Axioms for Set Theory

Transcription:

Sets A set is an unordered collection of objects. The objects in a set are called the elements, or members of the set. A set is said to contain its elements. The notation a A denotes that a is an element of the set A. If a is not a member of A, write a A

Describing a Set: Roster Method S = {a,b,c,d} Order not important: S = {a,b,c,d} = {b,c,a,d} Order matters for tuples: (a, b, c, d) is not the same as (b, c, a, d) Each distinct object is either a member or not; listing more than once does not change the set: S = {a,b,c,d} = {a,b,c,b,c,d} Multiset (aka bag): may have multiple instances of each object Ellipses ( ) may be used to describe a set without listing all of the members when the pattern is clear: S = {a,b,c,, z } Later, recursive definitions (to avoid the ellipses)

Some Important Sets N = natural numbers = {0,1,2,3.} Z = integers = {,-3,-2,-1,0,1,2,3, } Z+ = positive integers = {1,2,3,..} R = set of real numbers R + = set of positive real numbers C = set of complex numbers. Q = set of rational numbers

Set-Builder Notation Specify the properties that all members must satisfy S = {x x is a positive integer less than 100} O = {x x is an odd positive integer less than 10} O = {x Z+ x is odd and x < 10} A predicate may be used: S = {x P(x)} Example: S = {x Prime(x)} Positive rational numbers: Q + = {x R x = p/q, for some positive integers p,q}

Interval Notation a,b = x a x b a, { } b) = x a x < b { } ( a,b = { x a < x b} a,b ( ) = x a < x < b { } closed interval [a,b] open interval (a,b)

Universal Set and Empty Set The universal set U is the set containing everything currently under consideration. Sometimes implicit; sometimes explicitly stated. Contents depend on the context. The empty set is the set with no elements. Symbolized, but {} also used.

Definition: Two sets are equal if and only if they have the same " x xî A«xÎB elements: ( ) We write A = B if A and B are equal sets Definition: The set A is a subset of B, if and only if every element of A is also an element of B: " x xî A xîb ( ) The notation A B is used to indicate that A is a subset of B Because a is always false, S,for every set S. Because a S a S, S S, for every set S.

Proper Subsets Definition: If A B, but A B, then we say A is a proper subset of B, denoted by A B. If A B, then x( x A x B) x( x B x A) is true. Venn Diagram

Set Cardinality Definition: If there are exactly n distinct elements in S where n is a nonnegative integer, we say that S is finite. Otherwise it is infinite. Definition: The cardinality of a finite set A, denoted by A, is the number of (distinct) elements of A. Examples: 1. ø = 0 2. {1,2,3} = 3 3. {ø} = 1 4. { {1,2,3} } = 1

Power Sets Definition: The set of all subsets of a set A, denoted 2 A or P(A), is called the power set of A. Example: If A = {a,b} then 2 A = P(A) = {ø, {a},{b},{a,b}} If a set has n elements, then the cardinality of the power set is 2ⁿ.

Tuples The n-tuple (a 1,a 2,..,a n ) is the ordered collection that has a 1 as its first element and a 2 as its second element and so on until a n as its last element. Two n-tuples are equal if and only if their corresponding elements are equal. 2-tuples are called ordered pairs.

Cartesian Product Definition: The Cartesian Product of two sets A and B, denoted by A B, is the set of ordered pairs (a,b) where a A and b B. Example: {(, ) } A B= a b aîaùbîb A = {a,b} B = {1,2,3} A B = {(a,1),(a,2),(a,3), (b,1),(b,2),(b,3)} Cartesian product is associative: (A x B) x C = A x (B x C) So just write {(a,b,c) a A, b B, c C} Definition: A subset R of the Cartesian product A B is called a relation from the set A to the set B.

Truth Sets of Quantifiers Given a predicate P and a domain D, we define the truth set of P to be the set of elements in D for which P(x) is true. The truth set of P(x) is denoted by { x D P( x) } Example: The truth set of P(x) where the domain is the positive integers < 20 and P(x) is x is prime is the set {-2,3, 5, 7, 11, 13, 17, 19}

Union Definition: Let A and B be sets. The union of the sets A and B, denoted by A B, is the set: x xîaúxîb { } Venn Diagram for A B

Intersection Definition: The intersection of sets A and B, denoted by A B, is x xîaúxîb { } If the intersection is empty, then A and B are said to be disjoint Venn Diagram for A B

Complement Definition: If A is a set, then the complement of the A (with respect to U), denoted by Ā is the set U - A A= x xîu xïa { } (The complement of A is sometimes denoted by A c.) Venn Diagram for Complement

Difference Definition: Let A and B be sets. The difference of A and B, denoted by A B, is the set containing the elements of A that are not in B. A B= x xîaùxï B = AÇ B { } The difference of A and B is also called the complement of B with respect to A. Venn Diagram for A B

The Cardinality of the Union of Two Sets Inclusion-Exclusion A B = A + B A B

Set Identities 1 Identity laws AÈÆ= A AÇ U = A Domination laws Idempotent laws AÈ U = U AÇÆ= Æ AÈ A= A AÇ A= A Complementation law ( A) = A

Commutative laws Set Identities 2 AÈ B= BÈA AÇ B= BÇ A Associative laws ( ) ( ) AÈ BÈ C = AÈB ÈC ( ) ( ) AÇ BÇ C = AÇB ÇC Distributive laws ( ) ( ) ( ) AÇ BÈ C = AÇB È AÇC ( ) ( ) ( ) AÈ BÇ C = AÈB Ç AÈC

De Morgan s laws Set Identities 3 AÈ B= AÇB AÇ B= AÈ B Absorption laws AÈ( AÇ B) = A AÇ( AÈ B) = A Complement laws AÈ A= U AÇ A= Æ

Proving Set Identities Different ways to prove set identities: 1. Prove that each set (side of the identity) is a subset of the other. 2. Use set builder notation and propositional logic. 3. Membership Tables Verify that elements in the same combination of sets always either belong or do not belong to the same side of the identity. Use 1 to indicate it is in the set and a 0 to indicate that it is not

Proof of Second De Morgan Law 1 Prove that AÇ B= AÈ B Solution: We prove this identity by showing that 1 AÇBÍ AÈB and 2 ) ) AÈBÍ AÇB

Proof of Second De Morgan Law 2 To show that: AÇBÍ AÈB xîaçb xïaçb (( x A) ( x B) ) ( x A) ( x B) Î Ù Î Î Ú Î xïaúxïb xîaúxîb xîaèb by assumption defn. of complement by defn. of intersection 1st De Morgan law for Prop Logic defn. of negation defn. of complement by defn. of union

Proof of Second De Morgan Law 3 To show that: AÈBÍ AÇB xîaèb ( xîa) Ú( xîb) ( xïa) Ú( xîb) ( x A) ( x B) ( x A) ( x B) ( x A B) Î Ú Î ( ) Î Ù Î Î Ç xîaçb by assumption by defn. of union defn. of complement defn. of negation 1st De Morgan law for Prop Logic defn. of intersection defn. of complement

Set-Builder Notation: Second De Morgan Law AÇ B = xîaçb by defn. of complement ( ) { x ( x A B )} = Î Ç by defn. of does not belong symbol ( ( ) ( ) { x x A x B} = Î Ù Î by defn. of intersection { x x A x B } = Î Ú Î by 1st De Morgan law for { x x A x B} Prop Logic = Ï Ú Ï by defn. of not belong symbol { AÚxÎB} = x xî { x x A B} by defn. of complement = Î È by defn. of union = AÈ B by meaning of notation

Membership Table Example: Construct a membership table to show that the distributive law holds. ( ) ( ) ( ) AÈ BÇ C = AÈB Ç AÈC A B C BC A (BC) AB AC (AB) (AC) 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0

Functions Let A and B be nonempty sets. A function f from A to B, denoted f: A B is an assignment of each element of A to exactly one element of B. We write f(a) = b if b is the unique element of B assigned by the function f to the element a of A. Aka a mapping or transformation from A to B Domain and co-domain Image and pre-image Range

Functions Definition Terminology: aka mapping/ transformation. Domain. Co-domain. Range One-to-one/ injection/ injective Onto/ surjection/ surjective One-one-onto/ bijection/ bijective The inverse of a function Strictly increasing/ non-decreasing. Strictly decreasing/ non-increasing Composition of functions Graphs of functions Some interesting functions: floor, ceiling, factorial Partial functions are not functions