Discrete Mathematics R. Johnsonbaugh

Slides:



Advertisements
Similar presentations
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Advertisements

Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
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.
Denoting the beginning
Analytical Methods in CS (CIS 505)
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.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Sets 1.
Sets 1.
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
Mathematics.
Discrete Maths Objective to re-introduce basic set ideas, set operations, set identities , Semester 2, Set Basics 1.
Operations on Sets – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Operations on Sets Reading: Kolman, Section 1.2.
MATHEMATICS XI SETS.
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.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sets.
Chapter 3 – Set Theory  .
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
R. Johnsonbaugh, Discrete Mathematics 5 th edition, 2001 Chapter 2 The Language of Mathematics.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
CS201: Data Structures and Discrete Mathematics I
Discrete Mathematics R. Johnsonbaugh
CompSci 102 Discrete Math for Computer Science
Discrete Mathematical Structures 4 th Edition Kolman, Busby, Ross © 2000 by Prentice-Hall, Inc. ISBN
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 Basic Structure : Sets, Functions, Sequences, and Sums Sets Operations.
CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –
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.
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.
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.
1 Topic Sets (5.1, 5.2, 5.3). 2 Original author of the slides: Vadim Bulitko University of Alberta Modified by.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Operations Section 2.2.
 Union Symbol ∪ If A and B are sets, their union is equal to all elements in both A & B A = {1,2,3,4} B = {2,4,5,6,7,8} A ∪ B = {1,2,3,4,5,6,7,8}
Fr: Discrete Mathematics by Washburn, Marlowe, and Ryan.
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.
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, Permutations, and Combinations. Lecture 4-1: Sets Sets: Powerful tool in computer science to solve real world problems. A set is a collection of.
Set. Outline Universal Set Venn Diagram Operations on Sets.
Dr. Ameria Eldosoky Discrete mathematics
Applied Discrete Mathematics Week 1: Logic and Sets
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
CSNB 143 Discrete Mathematical Structures
Lecture 04 Set Theory Profs. Koike and Yukita
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
CS 2210:0001 Discrete Structures Sets and Functions
(є:belongs to , є:does not belongs to)
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
… and now for something completely different…
Exercises Show that (P  Q)  (P)  (Q)
CS100: Discrete structures
Set Operations Section 2.2.
Session – 2 SETS & Operations of SETS
이산 수학 Discrete Mathematics
… and now for something completely different…
Sets & Set Operations.
CSC102 - Discrete Structures (Discrete Mathematics) Set Operations
Set – collection of objects
Sets, Unions, Intersections, and Complements
Presentation transcript:

Discrete Mathematics R. Johnsonbaugh SETS

2.1 Sets Set = a collection of distinct unordered objects Members of a set are called elements How to describe a set Listing its elements Example: A = {1,3,5,7} = {7, 5, 3, 1, 3} Listing a property needed for membership Example: B = {x | x = 2k + 1, 0 < k < 30}

Finite and infinite sets Examples: A = {1, 2, 3, 4} B = {x | x is an integer, 1 < x < 4} Infinite sets Z = {integers} = {…, -3, -2, -1, 0, 1, 2, 3,…} B={x| x is a positive, even integer}

Some important sets The empty set  = { } has no elements. Also called null set or void set. Universal set: the set of all elements about which we make assertions. Examples: Z = {all Integers} i.e. -3, 0, 2, 145 R = {all real numbers} i.e. -3, -1.766, 0, 4/15, √2, π Q = {rational numbers} i.e. -1/3, 0, 24/15

Cardinality Cardinality of a set A (in symbols |A|) is the number of elements in A Examples: If A = {1, 2, 3} then |A| = 3 If B = {x | x is a natural number and 1< x< 9} then |B| = 9 Infinite cardinality Countable (e.g., natural numbers, integers) Uncountable (e.g., real numbers)

Subsets X is a subset of Y if every element of X is also contained in Y (in symbols X  Y) Equality: X = Y if X  Y and Y  X, i.e., X = Y whenever x  X, then x  Y, and whenever x  X, then x  X X is a proper subset of Y if X  Y but Y  X Observation:  is a subset of every set

Power set The power set of X is the set of all subsets of X. In symbols P(X),i.e. P(X)= {A | A  X} Example: if X = {1, 2, 3}, then P(X) = {, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}} Theorem 2.1.4: If |X| = n, then |P(X)| = 2n. |X| = 3 and |P(X)| = 23 = 8

Set operations: Produce a new set Union and Intersection Given two sets X and Y The union of X and Y is defined as the set X  Y = { x | x  X or x  Y}  : All elements belonging to X or Y or both The intersection of X and Y is defined as the set X  Y = { x | x  X and x  Y}  : All elements belonging to both X and Y Two sets X and Y are disjoint if X  Y = 

Complement and Difference Complement: The difference of two sets X – Y = { x | x  X and x  Y} The difference is also called the relative complement of Y in X Symmetric difference X Δ Y = (X – Y)  (Y – X) The set of all elements that belong to X or to Y but not both X and Y. The complement of a set A contained in a universal set U is the set Ac = U – A = Ā

Example If X={1, 4, 7, 10}, Y={1, 2, 3, 4, 5} X  Y = X  Y = X – Y =

Example If X={1, 4, 7, 10}, Y={1, 2, 3, 4, 5} X  Y = {1, 2, 3, 4, 5, 7, 10} X  Y = {1, 4} X – Y = {7, 10} Y – X = {2, 3, 5}

Venn diagrams A Venn diagram provides a graphic view of sets Set union, intersection, difference, symmetric difference and complements can be easily and visually identified VIDEO U C A B

Properties of set operations Theorem 2.1.10: Let U be a universal set, and A, B and C subsets of U. The following properties hold: Associativity: (A  B)  C = A  (B  C) (A  B)  C = A  (B C) Commutativity: A  B = B  A A  B = B  A

Properties of set operations Distributive laws: A(BC) = (AB)(AC) A(BC) = (AB)(AC) Identity laws: AU=A A = A Complement laws: AAc = U AAc = 

Properties of set operations Idempotent laws: AA = A AA = A Bound laws: AU = U A =  Absorption laws: A(AB) = A A(AB) = A

Properties of set operations Involution law: (Ac)c = A 0/1 laws: c = U Uc =  De Morgan’s laws for sets: (AB)c = AcBc (AB)c = AcBc

Addition Principle A.K.A The Inclusion-Exclusion Principle If A and B are finite sets then, | A  B | = |A| + |B| - | A  B | U A  B A B

Addition Principle for Disjoint Sets | A  B  C | = |A| + |B| + |C| - |A  B| - |B  C| - |A  C| + |A  B  C| A = { a, b, c, d, e } B = { a, b, e, g, h } C = { b, d, e, g, h, k, m, n} A company wants to hire 25 programmers to handle systems Programming jobs and 40 programmers for applications programming. Of those hired, ten will be expected to perform jobs of both types. How many programmers must be hired?

One more example A survey was taken on methods of commuter travel. Each respondent was asked to check BUS, TRAIN, or CAR as a major mode of traveling. More than one answer is allowed. The results are: BUS 30 TRAIN 35 CAR 100 BUS and TRAIN 15 BUS and CAR 15 TRAIN and CAR 20 All three modes 5 How many people completed a survey form