Set Definition: A set is unordered collection of objects.

Slides:



Advertisements
Similar presentations
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Advertisements

Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Section 1.6: Sets Sets are the most basic of discrete structures and also the most general. Several of the discrete structures we will study are built.
2.1 Sets. DEFINITION 1 A set is an unordered collection of objects. DEFINITION 2 The objects in a set are called the elements, or members, of the set.
Sets DISCRETE STRUCTURE ABDUL BASIT TAHIR, KAMRAN ALI, FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.
Analytical Methods in CS (CIS 505)
Sets 1.
CSE115/ENGR160 Discrete Mathematics 02/10/11 Ming-Hsuan Yang UC Merced 1.
Sets 1.
Sets. Copyright © Peter Cappello Definition Visualize a dictionary as a directed graph. Nodes represent words If word w is defined in terms of word.
Set Theory.
2.1 – Symbols and Terminology Definitions: Set: A collection of objects. Elements: The objects that belong to the set. Set Designations (3 types): Word.
Sets.
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
CompSci 102 Discrete Math for Computer Science
Section 2.1. Section Summary Definition of sets Describing Sets Roster Method Set-Builder Notation Some Important Sets in Mathematics Empty Set and Universal.
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.
ELEMENTARY SET THEORY.
Sets Goal: Introduce the basic terminology of set theory.
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.
Basic Structures: Sets, Functions, Sequences, and Sums.
1 Chapter Two Basic Concepts of Set Theory –Symbols and Terminology –Venn Diagrams and Subsets.
Discrete Mathematics Lecture # 10. Set Theory  A well defined collection of {distinct} objects is called a set.  The objects are called the elements.
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.
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.
Discrete Mathematics Set.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Fr: Discrete Mathematics by Washburn, Marlowe, and Ryan.
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
Section 2.1. Sets A set is an unordered collection of objects. the students in this class the chairs in this room The objects in a set are called the.
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.
CPCS 222 Discrete Structures I
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.
CSE15 Discrete Mathematics 02/13/17
Sets.
CISC1100: Sets Fall 2014 Xiaolan Zhang
Dr. Ameria Eldosoky Discrete mathematics
Applied Discrete Mathematics Week 1: Logic and Sets
The set of whole numbers less than 7 is {1, 2, 3, 4, 5, 6}
Sets Page 746.
Sets Finite 7-1.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Discrete Mathematical The Set Theory
CSNB 143 Discrete Mathematical Structures
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
CS 2210:0001 Discrete Structures Sets and Functions
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
        { } Sets and Venn Diagrams Prime Numbers Even Numbers
Algebra 1 Section 1.1.
2.1 Sets Dr. Halimah Alshehri.
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.
Discrete Mathematics CS 2610
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*
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
2.1 – Symbols and Terminology
Lecture Sets 2.2 Set Operations.
Sets & Set Operations.
Presentation transcript:

Set Definition: A set is 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. A = { a, b, c, d } B = { 1, 2, 3 } Notation: a is an element of the set: a  A f is not an element of the set: f  A

Describing a Set (1) { … } V is a set of all vowel in alphabet: {a, e, i, o, u} O is a set of odd positive integers less than 10: {1, 3, 5, 7, 9} P is a set of positive integer less than 100: {1, 2, 3, …, 99} D is a set of personal data: {Joko, student, UMN}  unrelated elements

Describing a Set (2) Set Builder O is a set of odd positive integers less than 10: O = {x | x is an odd positive integer less than 10} OR O = {x  Z+ | x is odd and x < 10} Z+ is the set of all positive integers

Set Builder: Describe the following sets {0, 3, 6, 9, 12} {-3, -2, -1, 0, 1, 2, 3} {m, n, o, p} {1, 2, 4, 8, 16}

Describing a Set: Common Notations Z = {…, -2, -1, 0, 1, 2, …} , the set of integers. Z+ = {1, 2, 3, …} , the set of positive integers. (N = {1, 2, 3, …} , the set of natural numbers) Znonneg ={0}  Z+ = {0, 1, 2, 3, …} , the set of non-negative integers. Q = {p/q | p  Z, q  Z, and q ≠ 0} , the set of rational numbers}. Q+ is the set of all positive rational numbers. Q+ = {x  R | x = p/q, for some positive integers p and q}. R = the set of real numbers, consisting of all point in a straight line.

U Describing a Set (3) Venn Diagram Rectangle: the universal set U Circle : sets, e.g. V U a •o e V •u •i

For every x, if x  A, then x  B For every x, if x  B, then x  A Equality Definition: Two sets are equal if and only if they have the same elements. That is, if A and B are sets then A and B are equal if and only if For every x, if x  A, then x  B For every x, if x  B, then x  A A = B Examples: A = {1, 3, 5} B = {5, 1, 3} C = {1, 1, 3, 3, 5} A = B ?  Yes B = C ?  Yes

Equality A = { X | X2 + X – 6 = 0 } B = { 2, 3 } A = B ? No  A ≠ B Yes

Empty Set & Singleton Definition: Empty set or null set is a set that has no elements. Notation: , { } Ex. The set of all positive integers that are greater than their squares. Singleton set is a set with one element. Ex. the set of positive odd integers less than 3: { 1 }

Subset Definition: The set A is said to be a subset of B if and only if every element of A is also an element of B. Notation: A  B Means: for every x, if x  A then x  B U A B

Subset: Theorem   S S  S Proof: Show that: for every x, if x   then x  S) Because the empty set contains no elements, it follows that x   is always false. It means that x    x  S is always true (you will learn the truth table for conditional statements in next week’s lecture)

Proper Subset Definition: The set A is a subset of B but A ≠ B Notation: A  B Means: A is a subset of B and A does not equal B Note : proper subset pasti subset tetapi subset belum tentu proper subset.

Subset: Examples Give examples of: A  B and B  C A  B and B  C

Equality of two sets Definition: IF A  B and B  A THEN A = B Example: A= { , {a}, {b}, {a, b}} B = {x | x is a subset of the set {a, b}} A = B

Finite Set and Cardinality Definition: Let S be a set. If there are exactly n distinct elements in S where n is a nonnegative integer, we say that S is a finite set and that n is the cardinality of S. Notation: | S | A is a set of odd positive integers less than 10. |A| = 5 S is a set of letters in alphabet. |S| = 26 B = {1, 1, 3, 5, 7} | B | = 4

Infinite Set Definition: A set S is said to be infinite if it is not finite. Example: the set of positive integers.

Power Set Definition: Given a set S, the power set of S is the set of all subsets of the set S. Notation: P(S) What is the power set of the set {0, 1, 2}? P({0, 1, 2}) = {, {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}}

Cardinality of Power Set |P(S)| = 23 = 8

Set Operations (Operasi-operasi pada Himpunan)

Union Definition: Let A and B be sets. The union of the sets A and B, denoted by A  B, is the set that contains those elements that are either in A or in B, or in both. Notation: A  B = {x | x  A or x  B}

Union: Example A = {1, 3, 5} B = {1, 2, 3} A  B = {1, 2, 3, 5}

Intersection Definition: Let A and B be sets. The intersection of the sets A and B, denoted by A  B, is the set containing those elements in both A and B Notation: A  B = {x | x  A and x  B}

Intersection: Example B = {1, 2, 3} A  B = {1, 3}

Difference Definition: Let A and B be sets. The difference of A and B, denoted by A – B, is the set containing those elements that are in A but not in B. it is also called the complement of B with respect to A. Notation: A – B = {x | x  A and x  B}

Difference: Example A = {1, 3, 5} B = {1, 2, 3} A – B = { 5 } In general : A – B ≠ B – A

Disjoint Definition: Two sets are called disjoint if their intersection is the empty set. Notation: A  B =  A = {1, 3, 5} B = {2, 4, 6} A  B = 

Cardinality of Union Definition: The cardinality of a union of two finite sets A and B is | A  B | Notation: | A  B | = | A | + | B | - | A  B |

Complement Definition: Let U be the universal set. The complement of the set A, denoted by Ā, is the complement of A with respect to U or U – A. Notation: Ā = U – A ={x | x  A}

Example A = {a, e, i, o, u} U – A = all other alphabets Let A be the set of positive integers greater than 10. U is the set of all positive integers. U – A = { 1, 2, 3, …, 10}

Example A group of 165 students. 8 are taking calculus, computer science and psychology 33 are taking calculus, computer science 20 are taking calculus and psychology 24 are taking computer science and psychology 79 are taking calculus 83 are taking psychology 72 are taking computer science

Example A group of 165 students. 8 are taking calculus, computer science and psychology 25(33-8) are only taking calculus, computer science 12(20-8) are only taking calculus and psychology 16(24-8) are only taking computer science and psychology 34(79-25-12-8) are only taking calculus 47(83-12-16-8) are only taking psychology 23(72-25-16-8) are only taking computer science

Set Identities Table

Ordered n-tuple Definition: The ordered n-tuple (a1, a2, …, an) is the ordered collection that has a1 as its first element, a2 as its second element, …, and an as its nth element. Two ordered n-tuples are equal if and only if each corresponding pair of their elements is equal. (a1, a2, …, an) = (b1, b2, …, bn) if and only if ai=bi

Cartesian Products Definition: Let A and B be sets. The Cartesian product of A and B, denoted by A  B, is the set of all ordered pairs (a, b), where a  A and b  B. Notation: A  B = {(a,b) | a  A  b  B}

Cartesian Products: Example B = {1, 2} C = {0, 1, 2} A  B  C = ? {(0, 1, 0), (0, 1, 1), …, (1, 2, 2)} Students  Courses |Students| = m |Courses| = n |Students  Courses| = ?

Exercises Show that: A  (B  C) = (C  B)  A A  (A  B) = A Venn Diagram: A  (B – C) (A  B)  (A  C)

Latihan Soal & Pembagian Kelompok

Akhir Kuliah Minggu 1 Terima kasih atas perhatiannya!