Chapter 4 Introduction to Set Theory

Slides:



Advertisements
Similar presentations
Lecture 1 RMIT University, Taylor's University Learning Objectives
Advertisements

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,
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
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.
Sets 1.
Sets 1.
Chapter 2 The Basic Concepts of Set Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Mathematics.
Functions A B f( ) =. This Lecture We will define a function formally, and then in the next lecture we will use this concept in counting. We will also.
Cardinality of Sets Section 2.5.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Set theory Sets: Powerful tool in computer science to solve real world problems. A set is a collection of distinct objects called elements. Traditionally,
Sequences and Summations
INTRODUCTION TO THE THEORY OF COMPUTATION INTRODUCTION MICHAEL SIPSER, SECOND EDITION 1.
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Chapter 3 – Set Theory  .
ICS 253: Discrete Structures I
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is.
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (2)
CS201: Data Structures and Discrete Mathematics I
CompSci 102 Discrete Math for Computer Science
COMPSCI 102 Introduction to Discrete Mathematics.
Slide Section 2-1 Symbols and Terminology. SYMBOLS AND TERMINOLOGY Designating Sets Sets of Numbers and Cardinality Finite and Infinite Sets Equality.
Section 2.1. Section Summary Definition of sets Describing Sets Roster Method Set-Builder Notation Some Important Sets in Mathematics Empty Set and Universal.
Discrete Mathematical Structures 4 th Edition Kolman, Busby, Ross © 2000 by Prentice-Hall, Inc. ISBN
Mathematical Preliminaries
Set Theory Chapter 3. Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is very.
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.
Basic Structures: Sets, Functions, Sequences, and Sums.
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.
CompSci 102 Discrete Math for Computer Science February 7, 2012 Prof. Rodger Slides modified from Rosen.
ITD1111 Discrete Mathematics & Statistics STDTLP
CSCI 115 Chapter 1 Fundamentals. CSCI 115 §1.1 Sets and Subsets.
UNIT 3. OUTLINE: Sets and Subsets Set Operations the Laws of Set Theory Counting and Venn Diagrams. A First Word on Probability. The Axioms of Probability.
Section 3.2: Sequences and Summations. Def: A sequence is a function from a subset of the set of integers (usually the set of natural numbers) to a set.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
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.
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
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.
Sequences Lecture 11. L62 Sequences Sequences are a way of ordering lists of objects. Java arrays are a type of sequence of finite size. Usually, mathematical.
Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Set Theory Two's company, three is none. Chapter 3.
CPCS 222 Discrete Structures I
Dr. Ameria Eldosoky Discrete mathematics
A Universal Turing Machine
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
CSNB 143 Discrete Mathematical Structures
Set, Combinatorics, Probability & Number Theory
The Basic Concepts of Set Theory
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Cardinality of Sets Section 2.5.
Lecture 7 Functions.
Set Operations Section 2.2.
The Basic Concepts of Set Theory
INTRODUCTION TO THE THEORY OF COMPUTATION
CHAPTER 1 - Sets and Intervals
Chapter 2 The Basic Concepts of Set Theory
CHAPTER 1 - Sets and Intervals
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.
2 Chapter Numeration Systems and Sets
Chapter 2 The Basic Concepts of Set Theory
Formal Languages, Automata and Models of Computation
Cardinality Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted |A| = |B|, if and only if there is a one-to-one correspondence.
Cpt S 317: Spring 2009 Reading: Chapter 8 & 9
Two's company, three is none.
Presentation transcript:

Chapter 4 Introduction to Set Theory Discrete Mathematics: A Concept-based Approach

Set theory is considered a prerequisite for many areas in mathematics such as abstract algebra, combinatorics, relations, topology, graphs, rings, vector spaces, discrete mathematics, fuzzy sets and the like. In computer science, the set terminology is frequently used. In programming language the variables to be used is declared to belong a particular set. Also the input and output in a programming process belongs to certain sets. When we test the software, we design the test cases, which form again the sets. One can view the program to be collection of functions in turn the use of set terminology is imminent. Discrete Mathematics: A Concept-based Approach

Common set notations and description Z or I = {… -3, -2, -1, 0, 1, 2, 3, …} = the set of integers N = {1 ,2, 3, 4, …} = set of natural numbers Q = {a/b| a, b Z and b ≠ 0 } = set of rational R = set of real numbers C = set of complex numbers = { x + iy | x, y R and i= }. Discrete Mathematics: A Concept-based Approach

Continued The number of elements or members in a given set is called the cardinality or size of the set. The cardinality of a given set A is denoted as | A | or #(A). We talk about cardinality of finite sets. The sets are mapped onto the set of nonnegative integers, are termed as countable infinite sets. There is one-to-one correspondence between the member of set and integers or natural numbers. The count may never finish. It can be stated in other words as, a set is called countably infinite provided it has the same cardinality as the set of positive integers Z+. A set that is not countable is termed as uncountable or non-denumerable. Discrete Mathematics: A Concept-based Approach

by f(n) = (n/2) if n is even; = −(n − 1)/2 if n is odd. Example 4.2. We know that the set Z of integers is countably infinite. Let us define f : N → Z by f(n) = (n/2) if n is even; = −(n − 1)/2 if n is odd. Then f is a bijection from N to Z. If there is no bijection between N and a set Z, then Z is called uncountable. Discrete Mathematics: A Concept-based Approach

Russell’s Paradox Because of logic being used for the definition of sets, a paradox called Russell’s Paradox is discovered by Bertrand Russell. Mere collection of objects does not form a set. If every collection forms a set, then it leads to paradox. Consider the statement “ S be a set of all subsets which are not members of themselves”. The question is “ Does ?”. There are two possibilities. (i ) and (ii) S ∉ S. Let : From the definition of the given set, S should not belong to S. Let S ∉ S : Again from the definition of the set, S should belong to S. This means that if S ∉ S then   Discrete Mathematics: A Concept-based Approach

Power set: The set of all the subsets of a given set A is called the power set of A and denoted by P(A). For example, If A = Ø. P(A) is written as under. If A = Ø then P(A) = P(Ø) = { Ø }= {{ }} and the cardinality is 1. It is 20 If A = {1} then P(A) = { Ø, {1}} and the cardinality of P(A) is 2. It is 21 If A= {1,2} then P(A) = { Ø, {1}, {2}, {1,2}} and the cardinality is 4. It is 22 If A = {1,2,3} then P(A) = { Ø, {1}, {2}, {3}, {1,2}, {1, 3}, {2,3}, {1,2,3}} and cardinality is 8. It is 23. From the above examples, we can generalize that if cardinality of |A| is n then the cardinality of |P(A)| is 2n. Discrete Mathematics: A Concept-based Approach

Laws of Set Theory. Discrete Mathematics: A Concept-based Approach

Laws of set theory continued . Discrete Mathematics: A Concept-based Approach

Principle of duality It is always interesting to note that the laws stated earlier are dual with respect to the operations  and . It deals with equality of set expressions. The two expressions involving sets and the operations are  and  only are said to be duals if we are able to get one expression from the other by replacing  by  and vice versa and Ø by U and vice versa. The sets can occur complemented in the expression. Example : Consider the laws of absorption. Let the expression s = A (A  B ) and its dual sd = A (A  B ) is obtained from replacing  by  and vice versa. Both the expressions are equal. It’s a generic case. Example : Consider s: A Ā = Ø and its dual is obtained replacing  by  and vice versa as sd : A Ā = U. Here Ø is replaced by U and vice versa. The laws listed motivate us to state the duality principle as “ if s is a law on sets involving  and  then its dual is also a law on sets”. Discrete Mathematics: A Concept-based Approach

Computer representation of sets There are different ways of representing sets on computers. One can represent sets as arrays without ordering. The set operations become difficult as these involve large amount of searching. Consider a finite universal set. Let a 1 , a 2 ,.. a n define the sets on this universal set and represent it as a bit string of length n where in the ith bit is set to 1 if the element ai is belongs to the given subset. Otherwise the corresponding bit is set to zero. Discrete Mathematics: A Concept-based Approach

Example: Consider universal set U = {1,2,3,4,5,6,7,8,9, 10} and the increasing order is imposed on the set U. What bit strings represent the subset of all odd integers in U, the subset of all even integers in U and the subset of integers not exceeding 5 in U? Solution: The bit string representing the subset of all odd integers {1,3,5,7,9} in U is given by 1010101010 The first, third, fifth, seventh, and ninth bit positions contain 1 and other positions contain zeros. Similarly, the bit string corresponding to the subset of even integers {2,4,6,8,10} is given by 0101010101 The bit string corresponding to all integers that do not exceed 5, namely, {1,2,3,4,5} is given by 1111100000 Discrete Mathematics: A Concept-based Approach

Addition Principle In case of sets, the union of two sets involves the common elements to be counted only once. When we work with cardinalities of individual sets and to find the cardinality of |A  B|, it is useful to consider the common elements. The cardinality of |A  B| is equal to arithmetic sum of cardinalities of individual sets, when the sets are disjoint. |A  B| = |A| + |B|. If the sets are not disjoint, it is written as under: |A  B| = |A| + |B| - | A  B | The elements of A  B are counted twice, once in A and another in B and hence it is deducted once. In case of disjoint sets, | A  B | = Ø. The equation (1) is called the Addition principle or the Principle of Inclusion and Exclusion. It can be extended to more than two sets. Discrete Mathematics: A Concept-based Approach

|A| = 5 , |B| = 6, |A  B| = 9 and | | = 2. Example . Consider A = {1,2,3,4,5 } and B = {3, 5, 6,8,11, 13}. The addition principle can be verified as under. |A| = 5 , |B| = 6, |A  B| = 9 and | | = 2. The sets are A B = {1,2,3,4,5,6,8,11,13} cardinality is 9. A  B = {3,5}= cardinality is 2 From the addition principle, |A  B| = |A| + |B| - | A  B| = 5 + 6 – 2 = 9, hence the principle. Discrete Mathematics: A Concept-based Approach

Addition principle is extended for three sets, is as follows Addition principle is extended for three sets, is as follows. |A  B  C| = |A| + |B| + |C| - | A  B| - | A  C| - | B  C | + |A B  C |. Discrete Mathematics: A Concept-based Approach

Regular Expressions A regular expression defines the regular language and for which regular grammar is possible to write. The regular languages are recognized by finite state automata. Regular expressions are used in Unix operating system for specifying commands and other utilities. Regular expressions are used in lex generators, text editors etc. The given regular expression defines precisely a language. The Regular expression is defined recursively. Discrete Mathematics: A Concept-based Approach

Continued 1. Є and ϕ is a regular expression. 2. Every symbol in the alphabet ∑ is a regular expression. 3. Let R1 and R2 be two regular expressions.Then R1 U R2 is also the regular expression. 4. The concatenation of R1 and R2 is also a regular expression (R1•R2). 5. The closure of R1 or R2 denoted by (R1)* or (R2)* is also a regular expression. 6. The (R1) and (R2) are also regular expressions. Discrete Mathematics: A Concept-based Approach

Summary The sets are the important concepts mainly used , relations, functions, regular expressions, coding theory etc. The coverage of the topics is more lucid. The sound knowledge of set theory fundamentals is essential for computer science students. The chapter fairly covers the essentials for reading the subsequent chapters in this book. Discrete Mathematics: A Concept-based Approach