SETS CSC 172 SPRING 2002 LECTURE 20 Sets Defined by membership relation  Atoms many not have members, but may be members ofa set Sets may also be members.

Slides:



Advertisements
Similar presentations
Set Operations. When sets are equal A equals B iff for all x, x is in A iff x is in B or … and this is what we do to prove sets equal.
Advertisements

Union Definition: The union of sets A and B, denoted by A B, contains those elements that are in A or B or both: Example: { 1, 2, 3} {3, 4, 5} = { 1,
 Union  Intersection  Relative Complement  Absolute Complement Likened to Logical Or and Logical And Likened to logical Negation.
Types of Logic Circuits
Chapter 2 Logic Circuits.
Discrete Mathematics I Lectures Chapter 6
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
(CSC 102) Discrete Structures Lecture 14.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Week 21 Basic Set Theory A set is a collection of elements. Use capital letters, A, B, C to denotes sets and small letters a 1, a 2, … to denote the elements.
Vocabulary and Properties. Determine the word or phrase described in each slide.
1 Section 1.7 Set Operations. 2 Union The union of 2 sets A and B is the set containing elements found either in A, or in B, or in both The denotation.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
Sets 1.
Sets 1.
CSE115/ENGR160 Discrete Mathematics 02/14/12 Ming-Hsuan Yang UC Merced 1.
Mathematics.
Operations on Sets – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Operations on Sets Reading: Kolman, Section 1.2.
Section Section Summary Introduction to Boolean Algebra Boolean Expressions and Boolean Functions Identities of Boolean Algebra Duality The Abstract.
Set theory Sets: Powerful tool in computer science to solve real world problems. A set is a collection of distinct objects called elements. Traditionally,
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
Chapter 3 – Set Theory  .
Michaelmas Term 2004 Discrete Mathematics CSC 141 Discrete Mathematics Dr. Corina Sas and Ms. Nelly Bencomo
Basics of Functions.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
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:
Discrete Structure Sets. 2 Set Theory Set: Collection of objects (“elements”) a  A “a is an element of A” “a is a member of A” a  A “a is not an element.
CS201: Data Structures and Discrete Mathematics I
1. Set Theory Set: Collection of objects (“elements”) a  A “a is an element of A” “a is a member of A” a  A “a is not an element of A” A = {a 1, a 2,
CompSci 102 Discrete Math for Computer Science
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
Discrete Mathematics CS 2610 September Equal Boolean Functions Two Boolean functions F and G of degree n are equal iff for all (x 1,..x n )  B.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 Basic Structure : Sets, Functions, Sequences, and Sums Sets Operations.
Chapter 2 With Question/Answer Animations. Section 2.1.
Introduction to Set theory. Ways of Describing Sets.
Discrete Mathematics SETS. What is a set? ^A set is a unordered collection of “objects”  People in a class: {A yşe, B arış, C anan }  Cities in Turkey.
Discrete Mathematics CS 2610 January 27, part 2.
ITD1111 Discrete Mathematics & Statistics STDTLP
Discrete Mathematics Set.
1 Section 1.2 Sets A set is a collection of things. If S is a set and x is a member or element of S we write x  S. Othewise we write x  S. The set with.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Operations Section 2.2.
Discrete Mathematics Lecture # 10 Venn Diagram. Union  Let A and B be subsets of a universal set U. The union of sets A and B is the set of all elements.
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.
Basic Probability. Introduction Our formal study of probability will base on Set theory Axiomatic approach (base for all our further studies of probability)
Boolean Algebra.
Thinking Mathematically Venn Diagrams and Set Operations.
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 Boolean algebra and Logic gates
Introduction to Set Theory (§1.6) A set is a new type of structure, representing an unordered collection (group, plurality) of zero or more distinct (different)
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.
Lecture 6 Set Theory.
Dr. Ameria Eldosoky Discrete mathematics
Sets Finite 7-1.
Discrete Structures – CNS 2300
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Exercises Show that (P  Q)  (P)  (Q)
Set Operations Section 2.2.
Algebra 1 Section 1.1.
Chapter 2 Notes Math 309 Probability.
MCS680: Foundations Of Computer Science
Lecture Sets 2.2 Set Operations.
CSC102 - Discrete Structures (Discrete Mathematics) Set Operations
Presentation transcript:

SETS CSC 172 SPRING 2002 LECTURE 20

Sets Defined by membership relation  Atoms many not have members, but may be members ofa set Sets may also be members of sets Membership is “only once” An element can not be a member of a set more than once Mulitsets, or bags, can contain elements more than once Sets underlie most information representation

Use of Sets Sturctured sets represent record structures, tables Relational models are used in data base systems Probability space is a kind of set Set theory underlies much (all?) mathematics Real numbers, infinities

Representing sets Extension – list the elements {1, 2, {3, 4}} set with 3 elements Abstraction – describe the elements {x | 3 <= x <= 10 and x is an integer}

Algebra of Sets Union : S  T = set of elements in S or T or both (+) Intersection : S  T = set of elements in both (*) Difference: S – T = elements in S, not T (-)

Equality of Sets Two sets are equal if they have exactly the same members Two expression involving sets are equivalent (  ) if they produce the same values regardless of what values we assign to the set-variables in the expressions

Algebraic Laws Observations about pairs of equivalent expressions Commutative laws of union, intersection The order of the operands may be reversed Associative laws of union, intersection Operations may be grouped in any order Similar law for union and difference S - (T  R)  (S – T) - R

Algebraic Laws Distributive laws like x(y+z) = xy + xz 3 different laws for distribution on sets S  (T  R)  (S  T)  (S  R) S  (T  R)  (S  T)  (S  R) (S  T) - R  (S - R)  (T – R)

Empty Set   is the identity for union S   = S  is the annihilator for intersection S   =  There is no identity for intersection or annihilator for union because no universal “set containing everything” exists S – S =   - S =  Idempotence : S  S = S and S  S = S

Proving Equivalences Three approaches 1. Manipulating known equivalences 2. Classifying elements by sets of which they are members Venn diagrams and truth-tables 3. Proving containment in both directions Using definitions of operations

Manipulating Equivlences Substituting an expression for all occurrences of some variable Replacing a subexpression by a known equivalent expression Using transitivity of equivalence If E  F and F  G then E  G Using commutativity of equivalence If E  F then F  E

Example: (S  T)  S  S S  (T  R)  (S  T)  (S  R) distributive law S  (T   )  (S  T)  (S   ) R  S   (S  T)  (S   ) Annihilation S   (S  T)  S Identity S  (S  T)  S Identity (S  T)  S  S Commutititvity of 

Enumerating Cases If there are n sets in an expession, we can divide elements into 2 n classes, dependin on whether they are in or out of the set

Example: (S  T)  S  S ST S  T RHS

Equivalence Through Containment S  T (S is contained in T) means every element of S is an element of T S = T if and only if (S  T) and (T  S) We can prove the equivalence of two expression by showing the result of each is contained in the other

Example: (S  T)  S  S  If x  S then x  (S  T) definition of “union” If x  (S  T) then x  (S  T)  S definition of “intersection”  If x  (S  T)  S then x  S definition of “intersection”