(CSC 102) Lecture 13 Discrete Structures. Previous Lectures Summary  Direct Proof  Indirect Proof  Proof by Contradiction  Proof by Contra positive.

Slides:



Advertisements
Similar presentations
Introduction to Set Theory
Advertisements

Sets Lecture 11: Oct 24 AB C. This Lecture We will first introduce some basic set theory before we do counting. Basic Definitions Operations on Sets Set.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
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.
Analytical Methods in CS (CIS 505)
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
EE1J2 – Discrete Maths Lecture 7
Chapter 2 The Basic Concepts of Set Theory
Sets 1.
Sets 1.
Chapter 2 The Basic Concepts of Set Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Mathematics.
CSCI 1900 Discrete Structures
MATHEMATICS XI SETS.
Sets.
Discrete Mathematics Unit - I. Set Theory Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is very subjective)
This section will discuss the symbolism and concepts of set theory
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:
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Chapter 7 Logic, Sets, and Counting Section 2 Sets.
1 ENM 503 Block 1 Algebraic Systems Lesson 2 – The Algebra of Sets The Essence of Sets What are they?
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.
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.
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
Section 2.1. Section Summary Definition of sets Describing Sets Roster Method Set-Builder Notation Some Important Sets in Mathematics Empty Set and Universal.
ELEMENTARY SET THEORY.
Discrete Mathematical Structures 4 th Edition Kolman, Busby, Ross © 2000 by Prentice-Hall, Inc. ISBN
Module Code MA1032N: Logic Lecture for Week Autumn.
Set Notation and Description Kinds of Sets Operations on Sets By: Mr. Gerzon B. Mascariñas.
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.
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.
Discrete Mathematics Set.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Theorem By Derek Mok, Alex Yau, Henry Tsang and Tommy Lee.
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
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.
Fifteen Puzzle Move: can move a square adjacent to the empty square to the empty square.
Set. Outline Universal Set Venn Diagram Operations on Sets.
Dr. Ameria Eldosoky Discrete mathematics
Applied Discrete Mathematics Week 1: Logic and Sets
Set Definition: A set is unordered collection of objects.
Set, Combinatorics, Probability & Number Theory
The Basic Concepts of Set 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.
CSE 2353 – September 22nd 2003 Sets.
Intro to Set Theory The Math of Santa’s Bag.
… and now for something completely different…
CS100: Discrete structures
Algebra 1 Section 1.1.
The Basic Concepts of Set Theory
2.1 Sets Dr. Halimah Alshehri.
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.
Discrete Mathematics Dr.-Ing. Erwin Sitompul
Chapter 7 Logic, Sets, and Counting
… and now for something completely different…
ICOM 5016 – Introduction to Database Systems
Sets & Set Operations.
ICOM 5016 – Introduction to Database Systems
Sets, Unions, Intersections, and Complements
Foundations of Discrete Mathematics
Presentation transcript:

(CSC 102) Lecture 13 Discrete Structures

Previous Lectures Summary  Direct Proof  Indirect Proof  Proof by Contradiction  Proof by Contra positive  Relation between them contra positive and Contradiction  Classical Theorems

Introductions to Set Theory I

Today's Lecture  Why study set Theory  Sets  Operations on sets  Memberships  Notations  Venn diagrams

Why study Set Theory? Understanding set theory helps people to … 1. See things in terms of systems. 2. Organize things into groups. 3. Begin to understand logic.

Sets A set is a gathering together into a whole of definite, distinct objects of our perception and of our thought which are called elements of the set. The elements or members of a set can be anything: numbers, people, letters of the alphabet, other sets, and so on. Sets are conventionally denoted with capital letters. Note: A set should be well defined and distinct.

Examples (1) A = {tiger, lion, puma, cheetah, leopard, cougar, ocelot} (this is a set of large species of cats). (2) A = {a, b, c,..., z} (this is a set consisting of the lowercase letters of the alphabet) (3) A = {-1, -2, -3,...} (this is a set of the negative numbers) In all above examples each element of the sets is distinct and well defined.

Operations on sets Union Two sets can be "added" together. The union of A and B, denoted by A ∪ B, is the set of all things which are members of either A or B. Examples: {1, 2} ∪ {red, white} ={1, 2, red, white}. {1, 2, green} ∪ {red, white, green} ={1, 2, red, white, green}. {1, 2} ∪ {1, 2} = {1, 2}. Intersection A new set can also be constructed by determining which members two sets have "in common".

Cont…. The intersection of A and B, denoted by A ∩ B, is the set of all things which are members of both A and B. If A ∩ B = ∅, then A and B are said to be disjoint. Examples {1, 2} ∩ {red, white} = ∅. {1, 2, green} ∩ {red, white, green} = {green}. {1, 2} ∩ {1, 2} = {1, 2}. Compliments Two sets can also be "subtracted". The relative complement of B in A ( also called the set-theoretic difference of A and B),

denoted by A \ B (or A − B), is the set of all elements which are members of A but not members of B. Note: That it is valid to "subtract" members of a set that are not in the set, such as removing the element green from the set {1, 2, 3}; doing so has no effect. Example:  {1, 2} \ {red, white} = {1, 2}.  {1, 2, green} \ {red, white, green} = {1, 2}.  {1, 2} \ {1, 2} = ∅.  If U is the set of integers, E is the set of even integers, and O is the set of odd integers, then E′ = O. Cont….

Cont… Cartesian products A new set can be constructed by associating every element of one set with every element of another set. The Cartesian product of two sets A and B, denoted by A × B is the set of all Ordered pairs (a, b) such that a is a member of A and b is a member of B. Examples  {1, 2} × {red, white} = {(1, red), (1, white), (2, red), (2, white)}.  {1, 2, green} × {red, white, green} = {(1, red), (1, white), (1, green), (2, red), (2, white), (2, green), (green, red), (green, white), (green, green)}.  {1, 2} × {1, 2} = {(1, 1), (1, 2), (2, 1), (2, 2)}.

There are some sets which hold great mathematical importance and are referred to with such regularity that they have acquired special names and notational conventions to identify them. One of these is the empty set, denoted { } or ∅. Another is the singleton set {x} which contains exactly one element, namely x. P or ℙ, denoting the set of all primes P = {2, 3, 5, 7,11, 13, 17,...}. N or ℕ, denoting the set of all natural numbers: N = {1, 2, 3,...}. Z or ℤ, denoting the set of all integers (whether positive, negative or zero): Z = {..., −2, −1, 0, 1, 2,...}. Q or ℚ, Q = {a/b : a, b ∈ Z, b ≠ 0}. For example, 1/4 ∈ Q and 11/6 ∈ Q. Special Sets

Cont…. R or ℝ, denoting the set of all real numbers. This set includes all rational numbers, together with all irrational numbers (that is, numbers which cannot be rewritten as fractions, such as π, e, and √2, as well as numbers that cannot be defined). C or ℂ, denoting the set of all complex numbers : C = {a + bi : a, b ∈ R}. For example, 1 + 2i ∈ C.

Finite and Infinite Sets Finite Set: A set is finite if it contains a specific (finite) number of elements, i.e., If we can count the element in a set, such sets are called finite sets. Example: Some finite numbers in a set: the number of digits on your hand, the number of seats on a bus, and the number of people on earth. Infinite Set: If we can not count the elements in a set such sets are called infinite sets. Example: Set of Natural numbers. Set of Whole numbers. Cardinality: refers to the number of elements in a set.

Finite and Infinite Set Cardinality Set Definition Cardinality A = {x | x is a lower case letter} |A| = 26 B = {2, 3, 4, 5, 6, 7} |B| = 6 C = {x | x is an even number  10} |C|= 4 A = {1, 2, 3, …} |A| = B = {x | x is a point on a line} |B| = C = {x| x is a point in a plane} |C| =

Memberships The key relation between sets is membership when one set is an element of another. If a is a member of B, this is denoted a ∈ B, while if c is not a member of B then c ∉ B. For example, With respect to the sets A = {1,2,3,4} and B = {blue, white, red}, 4 ∈ A and green ∉ B.  Universal Sets: The universal set is the set of all things relevant to a given discussion and is designated by the symbol U. i.e. it contains every set.  Subsets: If every member of set A is also a member of set B, then A is said to be a subset of B, written A ⊆ B (also pronounced A is contained in B). The relationship between sets established by ⊆ is called inclusion or containment.

Examples A = {1,2,3,4}, B = {1,2,3,4,5,7}, and C = {7,9,3}, and the universal set U = {1,2,3,4,5,6,7,8,9}. Cont…

 Super Set: if we can write B ⊇ A, read as B is a superset of A, B includes A, or B contains A.  Proper Subset: If A is a subset of, but not equal to, B, then A is called a proper subset of B, written A ⊂ B (A is a proper subset of B) or B ⊃ A (B is a proper superset of A). Examples  The set of all men is a proper subset of the set of all people.  {1, 3} ⊂ {1, 2, 3, 4}.  {1, 2, 3, 4} ⊆ {1, 2, 3, 4}. Cont…

An obvious but useful identity, which can often be used to show that two seemingly different sets are equal: A = B if and only if A ⊆ B and B ⊆ A. Power set: The power set of a set A is the set containing all possible subsets of A including the empty subset. It contains 2 n elements where n is the number of elements in A. It is typically denoted by P(A) or 2 A. For example, the power set of the set A={a,b,c,d} is the set P(A)={{}, {a}, {b}, {c}, {d}, {a,b}, {a,c}, {a,d}, {b,c}, {b,d}, {c,d}, {a,b,c}, {a,b,d}, {a,c,d}, {b,c,d}, {a,b,c,d}}.

A = {x | x is a positive integer  8} set A contains: 1, 2, 3, 4, 5, 6, 7, 8 B = {x | x is a positive even integer  10} set B contains: 2, 4, 6, 8 C = {2, 4, 6, 8, 10} set C contains: 2, 4, 6, 8, 10 The universal set U = {1,2,3,4,5,6,7,8,9,10}. Subset Relationships A  AA  BA  C B  AB  BB  C C  AC  BC  C Subset Relationships

Set Equality Two sets are equal if and only if they contain precisely the same elements. The order in which the elements are listed is un important. Elements may be repeated in set definitions without increasing the size of the sets. Examples  A = {1, 2, 3, 4} B = {1, 4, 2, 3} A  B and B  A; therefore, A = B and B = A.  A = {1, 2, 2, 3, 4, 1, 2} B = {1, 2, 3, 4} A  B and B  A; therefore, A = B and B = A.

SymbolMeaning Upper casedesignates set name Lower casedesignates set elements { }enclose elements in set  (or ∉ )is (or is not) an element of  is a subset of (includes equal sets)  is a proper subset of  is not a subset of  is a superset of | or :such that (if a condition is true) | |the cardinality of a set Notations

Venn diagrams or set diagrams are diagrams that show all possible logical relations between a finite collection of sets. Venn diagrams were conceived around 1880 by John Venn. Venn diagrams show relationships between sets and their elements. Venn Diagrams Universal Set Sets A & B

Examples Set DefinitionElements A = {x | x  Z + and x  8}{1, 2,3, 4, 5, 6,7, 8} B = {x | x  Z +, x is even and  10}{2, 4, 6, 8, 10} A  B B  A

Cont… Set DefinitionElements A = {x | x  Z + and x  9} {1, 2,3, 4, 5, 6,7, 8,9} B = {x | x  Z + ; x is even and  8}{2, 4, 6, 8,} A  B B  A A  B

Cont… Set DefinitionElements A = {x | x  Z + x is even and x  10} { 2, 4, 6, 8, 9} B = {x | x  Z + ; x is odd and  10}{1, 3, 5, 7, 9} A  B B  A

Set operations and Venn diagram

A ∩ B = { x | x  A and x  B } A ∩ B

Set operations and Venn diagram A ∪ B = { x | x  A or x  B }

Set operations and Venn diagram B \ A = { x | x ∉ A and x  B }

Set operations and Venn diagram A c = U-A = { x | x ∉ A and x  U }

A = {1,2,3,4}, B = {1,3,5,7}, and C = {7,9,3}, and the universal set U = {1,2,3,4,5,6,7,8,9}. Locate all this information appropriately in a Venn diagram. Sets and Universal Set

A = {1,2,3,4}, B = {1,3,5,7}, and C = {7,9,3}, and the universal set U={1,2,3,4,5,6,7,8,9}. Locate all this information appropriately in a Venn diagram. Sets and Universal Set

Sketch the region corresponding to the set (A ∪ B c ) ∩ C Sketching Regions representing Sets

Sketch the region corresponding to the set (A ∪ B c ) ∩ C Sketching Regions representing Sets

Sketch the region corresponding to the set (A ∪ B c ) ∩ C Sketching Regions representing Sets (A ∪ B c ) ∩ C

Lecture Summary  Why study set Theory  Sets  Operations on sets  Memberships  Notations  Venn diagrams