Sets Model Notation Sub-Sets Operations (abstract) Operations (ADT)

Slides:



Advertisements
Similar presentations
Introduction to Set Theory
Advertisements

Set Operations and Venn Diagrams 2.2 – 2.3. The intersection of sets A and B, denoted by, is the set of all elements that are common to both. That is,.
7.5 Inclusion/Exclusion. Definition and Example- 2 sets |A  B| =|A| + |B| - |A ∩ B| Ex1: |A|=9, |B|=11, |A∩B|=5, |A  B| = ?
Sets Definition of a Set: NAME = {list of elements or description of elements} i.e. B = {1,2,3} or C = {x  Z + | -4 < x < 4} Axiom of Extension: A set.
Chapter 5 Section 1 Sets Basics Set –Definition: Collection of objects –Specified by listing the elements of the set inside a pair of braces. –Denoted.
CSE115/ENGR160 Discrete Mathematics 02/14/12 Ming-Hsuan Yang UC Merced 1.
Unit 10 – Logic and Venn Diagrams
SETS A set B is a collection of objects such that for every object X in the universe the statement: “X is a member of B” Is a proposition.
5.1 Sets Sets and Elements Union and Intersection Subset and Empty Set
©1999 Indiana University Trustees Basic Set Theory Definitions A set is a collection of objects or elements An element is an object that make up a set.
Venn Diagrams/Set Theory   Venn Diagram- A picture that illustrates the relationships between two or more sets { } are often used to denote members of.
Math 021. * Interval Notation is a way to write a set of real numbers. The following are examples of how sets of numbers can be written in interval notation:
MTH 231 Section 2.1 Sets and Operations on Sets. Overview The notion of a set (a collection of objects) is introduced in this chapter as the primary way.
Sets Defined A set is an object defined as a collection of other distinct objects, known as elements of the set The elements of a set can be anything:
Copyright © 2014 Curt Hill Set Operations Now it gets fun.
Set Theory Dr. Ahmed Elmoasry. Contents Ch I: Experiments, Models, and Probabilities. Ch II: Discrete Random Variables Ch III: Discrete Random Variables.
Chapter 2 Section 1 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Sets Digital Lesson. Copyright © by Houghton Mifflin Company, Inc. All rights reserved. 2 Definition of Set A set is a collection of objects called elements.
UNIT VOCABULARY Functions. Closed Form of a Sequence (This is also known as the explicit form of a sequence.) For an arithmetic sequence, use a n = a.
Sets & venn diagrams; probability
Probability: Terminology  Sample Space  Set of all possible outcomes of a random experiment.  Random Experiment  Any activity resulting in uncertain.
Section 3.1 Sets and their operation. Definitions A set S is collection of objects. These objects are said to be members or elements of the set, and the.
Lecture 2.1: Sets and Set Operations CS 250, Discrete Structures, Fall 2014 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
Tries Data Structure. Tries  Trie is a special structure to represent sets of character strings.  Can also be used to represent data types that are.
Rosen 1.6, 1.7. Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by.
Introduction to Set theory. Ways of Describing Sets.
(CSC 102) Lecture 13 Discrete Structures. Previous Lectures Summary  Direct Proof  Indirect Proof  Proof by Contradiction  Proof by Contra positive.
Lecture 5: Set Theory 1 Dr Andrew Purkiss-Trew Cancer Research UK Mathematics for Computing.
Discrete Mathematics. Set Theory - Definitions and notation A set is an unordered collection of elements. Some examples: {1, 2, 3} is the set containing.
Unit :1 Set Theory Prof. A.J. SHAKADWIPI. Sets and Subsets A well-defined collection of objects. finite sets, infinite sets, subset A={1,3,5,7,9} B={x|x.
1 Topic Sets (5.1, 5.2, 5.3). 2 Original author of the slides: Vadim Bulitko University of Alberta Modified by.
Set Operations Section 2.2.
Section 1.2 – 1.3 Outline Intersection  Disjoint Sets (A  B=  ) AND Union  OR Universe The set of items that are possible for membership Venn Diagrams.
MATH 2311 Section 2.2. Sets and Venn Diagrams A set is a collection of objects. Two sets are equal if they contain the same elements. Set A is a subset.
Thinking Mathematically Venn Diagrams and Subsets.
Thinking Mathematically Venn Diagrams and Set Operations.
The Basic Concepts of Set Theory. Chapter 1 Set Operations and Cartesian Products.
Unions and Intersections of Sets Chapter 3 Section 8.
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.
Venn Diagrams.
Section 6.1 Set and Set Operations. Set: A set is a collection of objects/elements. Ex. A = {w, a, r, d} Sets are often named with capital letters. Order.
Sets Page 746.
Sets Finite 7-1.
Sets Section 2.1.
Counting and Probability Section 12.1: Sets and Counting IBTWW…
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
CSE 2353 – September 22nd 2003 Sets.
… and now for something completely different…
Bit Vector Linked List (Sorted and Unsorted) Hash Table Search Trees
Set and Set Operations Grab a sheet from front.
Algebra 1 Section 1.1.
Operations with Sets A = { 1, 2, 3 ,4, 5} B = { 2, 4, 6, 8, 10}
Session – 2 SETS & Operations of SETS
Set-Builder Notation.
Chapter Sets &Venn Diagrams.
Section 16 Inclusion/Exclusion
The aim of education is to teach students how to think rather than what to think. Sets The set is the fundamental discrete structure on which all other.
Lecture 2.1: Sets and Set Operations*
MCS680: Foundations Of Computer Science
More about Sets.
Definition Applications Implementations Heap Comparison
Sets A set is simply any collection of objects
… and now for something completely different…
MATH 2311 Section 2.2.
2.1 – Symbols and Terminology
Counting Elements of Disjoint Sets: The Addition Rule
SETS: Unions & Intersections
Introduction A set is a collection of objects.

MATH 2311 Section 2.2.
Presentation transcript:

Sets Model Notation Sub-Sets Operations (abstract) Operations (ADT) Specialized ADTs based on Set 4/17/2019 CS 303 – Sets Lecture 8

Sets – the Model Set: a collection of elements (members) without repetition {a, b, c, ... } Usually, there is a linear order specified on the members specified somewhere else! not based on “position” Well Defined: if a,b S, then either a < b, a = b, or b < a Transitive: if a,b,c S, then (a<b) and (b<c) implies (a<c) 4/17/2019 CS 303 – Sets Lecture 8

Set Notation {1, 2, ..., 1000} = {x | 0 < x <= 1000} {1, 4} = {4, 1} <> {1, 4, 1} (which is not a set!) Membership x A - x is an element (member) of A x A - x is not an element of A Null Set NULL 4/17/2019 CS 303 – Sets Lecture 8

Sub-Sets A is a SubSet of B A is included in B B is a SuperSet of A A is a subset of A NULL is a subset of A If A is a Subset of B and B is a Subset of A then A = B if A is a Subset of B and A <> B then A is a proper subset of B 4/17/2019 CS 303 – Sets Lecture 8

(abstract) Set Operations Union: A union B = {x | (x is in A) OR (x is in B)} Intersection: A intersect B = {x | (x is in A) AND (x is in B)} Difference: A-B = {x | (x is in a) AND (x is NOT in B)} [show Venn Diagrams] 4/17/2019 CS 303 – Sets Lecture 8

Set ADT - Operations MakeNull(A): A = NULL Member(x,A): b = (x is in A?) Union(A,B,C): C = A UNION B Intersection(A,B,C): C = A INTERSECT B Difference(A,B,C): C = A – B Equal(A,B): A == B? Assign(A,B): A = B Insert(x,A): A = A UNION {x} Delete(x,A): A = A – {x} Min(A): x = a | (a in A) and for all z in A, a <= z Merge(A,B): if A INTERSECT B is NOT NULL then C = A UNION B, else UNDEFINED! Find(x): A = Ai | x is in Ai if U = {Ai | i<>j implies Ai INTERSECT Aj = NULL} 4/17/2019 CS 303 – Sets Lecture 8

Specialized ADTs based on SET UID – Union, Intersection, Difference IDM – Insert, Delete, Member (Dictionary) I(DeleteMin) – Insert, DeleteMin (Priority Queue) ...and more...much more... 4/17/2019 CS 303 – Sets Lecture 8