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.

Slides:



Advertisements
Similar presentations
More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,
Advertisements

Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Sets DISCRETE STRUCTURE ABDUL BASIT TAHIR, KAMRAN ALI, FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Sets 1.
Sets 1.
Costas Busch - RPI1 Mathematical Preliminaries. Costas Busch - RPI2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
CSE115/ENGR160 Discrete Mathematics 02/14/12 Ming-Hsuan Yang UC Merced 1.
Courtesy Costas Busch - RPI1 Mathematical Preliminaries.
Unit 10 – Logic and Venn Diagrams
Discrete Maths Objective to re-introduce basic set ideas, set operations, set identities , Semester 2, Set Basics 1.
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sets.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Homework Review notes Complete Worksheet #1. Homework Let A = {a,b,c,d}, B = {a,b,c,d,e}, C = {a,d}, D = {b, c} Describe any subset relationships. 1.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Mathematical Preliminaries. Sets Functions Relations Graphs Proof Techniques.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Mathematical Proofs. Chapter 1 Sets 1.1 Describing a Set 1.2 Subsets 1.3 Set Operations 1.4 Indexed Collections of Sets 1.5 Partitions of Sets.
CompSci 102 Discrete Math for Computer Science
SECTION 2-3 Set Operations and Cartesian Products Slide
Set Operations Chapter 2 Sec 3. Union What does the word mean to you? What does it mean in mathematics?
Mathematical Preliminaries
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 Basic Structure : Sets, Functions, Sequences, and Sums Sets Operations.
Sets 2/10/121. What is a Set? Informally, a collection of objects, determined by its members, treated as a single mathematical object Not a real definition:
Chapter 2 With Question/Answer Animations. Section 2.1.
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.
Sets.
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.
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.
Discrete Mathematics CS 2610 January 27, part 2.
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.
1 Mathematical Preliminaries. 2 Sets Functions Relations Graphs Proof Techniques.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Operations Section 2.2.
1 Set Theory Second Part. 2 Disjoint Set let A and B be a set. the two sets are called disjoint if their intersection is an empty set. Intersection of.
Notions & Notations (2) - 1ICOM 4075 (Spring 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez Spring.
Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and B = {a,b} {( 0, a), (
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Thinking Mathematically Venn Diagrams and Set Operations.
The Basic Concepts of Set Theory. Chapter 1 Set Operations and Cartesian Products.
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.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
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.
Applied Discrete Mathematics Week 1: Logic and Sets
The Language of Sets If S is a set, then
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
Chapter 1 Logic and Proofs Homework 2 Given the statement “A valid password is necessary for you to log on to the campus server.” Express the statement.
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)
CS100: Discrete structures
Set Theory A B C.
Set and Set Operations Grab a sheet from front.
Set Operations Section 2.2.
Sets. EXAMPLE 1 The set O of odd positive integers less than 10 can be expressed by O = { l, 3, 5, 7, 9}. * This way of describing a set is known as.
Lecture Sets 2.2 Set Operations.
Sets & Set Operations.
CSC102 - Discrete Structures (Discrete Mathematics) Set Operations
Introduction A set is a collection of objects.
Foundations of Discrete Mathematics
Presentation transcript:

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.

A quick review of basic notation and set operations. 1. A = {1, 2, ab, ba, 3, moshe, table}, 2.1,2, ab, ba, moshe table are “elements.” They are members of the set A or “belong” to A. Notation: ab  A a  A 3. V = {a, i, o, u, e} Set of Vowels O = {1,3,5,7,9} Odd numbers < A 1 = {2, 5, 8, 11, …, 101} A 2 = {1, 2, 3, 5, 8, 13,…} A 3 = {2, 5, 10, 17, 26, …, 101}

1. Set Builder: B = {x | P(x)} B 1 = {x | x = n 2 + 1, 1  n  10} (B 1 = A 3 ) B2 = {p | p prime, p = n! + 1, n  Special sets: N (non-negative integers, natural numbers) Q (rational numbers) Z (integers) Z + (positive integers) R (real numbers)  (the empty set) Basic notation.

Relations among sets 1. A = B: if x  A  x  B 2. Subsets: A  B A  B A  B A  B 3. For every set B:   B 4. A set may have other sets as members: A = { , {a}, {b}, {a,b}}. Note: A has 4 elements.   A and also   A, {{a}}  A, a  A, {a}  A.

Set operations Union: A  B = {x | x  A  x  B} (logic “or”) Intersection: A  B = {x | x  A  x  B} ( “and”) Set difference: A \ B = {x | x  A  x  B} Complement of A: A = {a | a  A} or if U is the “universe” then A = U \ A (“not”). Example: If U = {a,b,c,…,z} and A = {i,o,e,u,a} then A = {n | n is not a vowel}. Symmetric difference: A  B = (A \ B)  (B \ A) (“xor”)

The characteristic vector of a set (representing sets in memory): Let U = {1,2,…, 15}. Let A = { 3,5,11,13} the characteristic vector of A is the binary string The characteristic vector represents the set {1,4,7,8,10,11,15} represents . Note: with this representation the union of two sets is the OR bit operation and the intersection is the AND.

A simple application. Problem: find the smallest integer n that satisfies the following 3 conditions simultaneously: (n mod 7 = 5), (n mod 11 = 7), (n mod 17 = 9) Knowing the language “Math” can help us look for information and use various systems to solve this problem. The following exolains how to use SAGE's set operations to solve problems.

We can create three sets: 1. A = {k | k = 7n + 5, k < 4000} 2. B = {k | k = 11n + 7, k < 4000} 3. C = {k | k = 17n + 9, k < 4000} We can then ask SAGE to find the intersection of the three sets. The smallest integer in the intersection (provided there is one) will be our solution. Answer: {502, 1811, 3120,...}

Venn Diagrams Venn Diagrams : a useful tool for representing information. For instance, the various sets that can be formed by the basic set operations can be viewed by a Venn Diagram.

A B C

Proving set equalities: Either: x  A  x  B or A  B  B  A. Example: De Morgan’s law: A  B = A  B Proof: Let x  A  B. Then: x  A  B. Or: x  A and x  B Or: x  A and x  B Or: x  A  B Conversely, start from the bottom and go up. QED Assume M = {1,2,5,9} then = A 1  A 2  A 5  A 9

Notation: A 1  A 2  …  A n = {x | x  A i i = 1, 2, …, n}. A 1  A 2  …  A n = {x |  ( i, 1  i  n) x  A i. Use formula to insert intersection. Assume M = {1,2,5,9} then = A 1  A 2  A 5  A 9

The Power Set Definition: The Power set of the set A is: P(A) = {B | B  A}.  has 0 elements. P(  ) has one element: P(  ) = {  } A = {a} P(A) = { , {a}} P({  }) = { , {  }}

The cartesian product Cartesian product : A x B = {(a,b) | a  A  b  B} Can be defined using sets only: A x B = {{a}, {a,b}| a  A  b  B} Note: (a,b)  (b,a) if a  b. Cartesian product of n sets: A 1 x A 2 x … x A n = {(a 1, a 2,…, a n ) | a i  A i, i = 1,…,n}

Relations Definition 1: A relation R, (binary relation) between two sets A and B is a subset of A x B (mathematically speaking: R  A x B). Definition 2: A relation R on a set A is a subset of A x A.

Relations There are two common ways to describe relations on a set or between two sets: List all pairs belonging to the relation. Use set builders to describe the pairs. Example 1: R 0 = {(4,3), (9,2), (3,6), (7,5)} is a relation on N. It is also a relation on A x B where A = {4,9,3,7} and B = {3,2,6,5}

More examples Example 2: R 2 = {(n,k) | n  N and n + k is a prime number}. Example 3: R 3 = {(n,k) | n,k  N and |n – k| is a multiple of 19}. Example 4: R 3 = {(w,m) | w is a woman, m is a man, w dates m}

Classification of relations These definitions apply to relations on A. Definition 3: A relation R on A is reflexive if (a,a)  R  a  A. Definition 4: A relation R on A is symmetric if (a,b)  R then (b,a)  R. R is antisymmetric if (a,b)  R and (b,a)  R only if a = b. Definition 5: A relation R on a set A is transitive if (a,b)  R  (b,c)  R then (a,c)  R.

The transitive closure Observation: If R 1 and R 2 are transitive relations on a set A then so is R 1  R 2. Proof: Obvious. Definition 6: The transitive closure of a relation R on a set A is the “smallest” transitive relation R* on A such that R*  R.

I think I solved it!