×

Close

- Computational Method - CM
- Note
**48 Views**- 3 Offline Downloads
- Uploaded 1 month ago

CS201: DISCRETE COMPUTATIONAL STRUCTURES Semester III Module I Lecturer: Jestin Joy Class: CSE-B Syllabus: Review of elementary set theory : Algebra of sets - Ordered pairs and Cartesian products - Countable and Uncountable sets Relations :- Relations on sets -Types of relations and their properties – Relational matrix and the graph of a relation - Partitions - Equivalence relations - Partial ordering- Posets - Hasse diagrams - Meet and Join Infimum and Supremum Functions :- Injective, Surjective and Bijective functions - Inverse of a function- Composition Disclaimer: These may be distributed outside this class only with the permission of the Instructor. Federal Institute of Science And Technology (FISAT) Contents 1.1 Sets 2 1.1.1 Algebra of sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1.1.1 Algebraic properties of set operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1.2 Ordered pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.3 Cartesian products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.4 Countable and Uncountable sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1.4.1 Diagonalization Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Relations 4 1.2.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.2 Relational matrix and the graph of a relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.3 Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.4 Equivalence Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.5 Partial Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.6 Hasse Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 Infimum and Supremum 6 1.4 Functions 6 1.4.1 Types of functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.1.1 Injective function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.1.2 Surjective function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4.1.3 Bijective function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4.2 Inverse of a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4.3 Composition of functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1

1.1 Sets Definition 1.1 A set is any well-defined collection of objects called the elements or members of the set. Examples include collection of real numbers between zero and one, collection of students with marks greater than 50%, collection of black dogs . . . . Well-defined means that it is possible to decide if a given object belongs to the collection or not. A set is represented by listing elements between braces. For example set of all positive integers that are less than 4 can be written as {1,2,3} • Order in which elements of a set are lsited is not important. • Repeated elements of a set can be ignored. For example {1,2,3} and {1,2,3,2,3,1} are same representations • Uppercase letters are used to denote set and lower case letters denote the members of the set. x is an element of set A is rpresented as x ∈ A. x is not an element of set A is rpresented as x ∈ /A 1.1.1 Algebra of sets The algebra of sets is the set-theoretic analogue of the algebra of numbers. Definition 1.2 If A and B are sets, their union is defined as the set consisting of all elements that belong to A or B and denote it by A ∪ B Let A={a,b,c,d}, B={d,e,f}, then A ∪ B is {a,b,c,d,e,f}. Definition 1.3 If A and B are sets, their intersection is defined as the set consisting of all elements that belong to both A and B and denote it by A ∩ B Let A={a,b,c,d}, B={d,e,f}, then A ∩ B is {d}. Definition 1.4 If A and B are sets, then the complement of B with respect to A is the set of all elements that belong to A but not to B. We denote it by A-B. Let A={a,b,c,d}, B={d,e,f}, then A − B is {a,b,c}. Definition 1.5 If A and B are sets, then the symmetric difference is the set of all elements that belong to A or to B, but not to both A and B. We denote it by A ⊕ B. Let A={a,b,c,d}, B={d,e,f}, then A ⊕ B is {a,b,c,e,f}. Also A ⊕ B = (A − B) ∪ (B − A) 1.1.1.1 Algebraic properties of set operations Commutative Property: A∪B =B∪A A∩B =B∩A Associative Property: (A ∪ B) ∪ C = A ∪ (B ∪ C) (A ∩ B) ∩ C = A ∩ (B ∩ C) Jestin Joy 2 CS201

Distributive Property: A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) Complement Laws: A∪A=U A∩A=∅ A∪B =A∩B A∩B =A∪B Diagrams which are used to show relationships between sets are called Venn diagram. A A∩B B ∪ The colored portion shows A ∪ B. 1.1.2 Ordered pairs An ordered pair consists of two objects in a given fixed order. • It is not a set consisting of two elements • Ordering of two objects is important • Two objects need not be distinct • Ordered pair x, y is denoted by (x, y) 1.1.3 Cartesian products Definition 1.6 For two sets A and B; the set of all ordered pairs such that first member of the ordered pair is an element of A and the second member is an element of B is called the cartesian product of A and B. Cartesian product of A and B is written as AXB. Let A={α, β} and B={1,2}. Then AXB is {(α, 1), (β, 1), (α, 2), (β, 2)} If A = φ B = {1, 2, 3}. Then AXB = φ For any two finite non empty sets |AXB| = |A| ∗ |B| Jestin Joy 3 CS201

1.1.4 Countable and Uncountable sets Definition 1.7 A set is called countable if it is finite or denumerable. A set is called uncountable if it is infinite and not denumerable. Any set which is equivalent to the set of natural numbers is called denumerable. A countable set is either a finite set or a countably infinite set. A set is countably infinite if it has one-to-one correspondence with the natural number set, N . Cantor proved that the set of real numbers is uncountable, thus showing that not all infinite sets are countable. 1.1.4.1 Diagonalization Principle Cantor’s diagonal argument, also called the diagonalisation argument is a mathematical proof that there are infinite sets which cannot be put into one-to-one correspondence with the infinite set of natural numbers. Such sets are known as uncountable sets. Proof: Real numbers uncountable Assume the set of all reals 0.a1 a2 a3 . . . are countable. Then we could form something like d1 = 0.a1 a2 a3 . . . d2 = 0.b1 b2 b3 . . . d3 = 0.c1 c2 c3 . . . . . . Since we assumed that this set is countable each of this number must appear in this list. But we can construct a real number not in the list by changing each digit of this list. For example construct a new real number 0.x1 x2 x3 . . . where x1 is 1 if a1 = 2, otherwise x1 is 2. x2 is 1 if b2 = 2, otherwise x2 is 2. Follow this process for each number. The resulting number is an infinite number containing 1’s and 2’s, but differs from any number we have constructed. This is a contradiction, since we assumed that the set is countable. Therefore it is uncountable. 1.2 Relations A relation R between sets X and Y is a subset of XxY . A relation is a set of pairs. Relations are denoted by special symbols. The relation > is > = {(x, y)|x, y are real numbers and x > y} 1.2.1 Properties Definition 1.8 • R is reflexive if xRx holds for all x in X. • R is symmetric if xRy implies yRx for all x and y in X. • R is antisymmetric ifxRy and yRx together imply that x = y for all x and y in X. • R is transitive if xRy and yRz together imply that xRz holds for all x, y, and z in X. Jestin Joy 4 CS201

## Leave your Comments