Algebra of Sets. Aditya Ghosh. April 6, 2018 It is recommended that while reading it, sit with a pen and a paper.

Similar documents
Algebra of Sets (Mathematics & Logic A)

Chapter 3. Set Theory. 3.1 What is a Set?

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

CSE 215: Foundations of Computer Science Recitation Exercises Set #9 Stony Brook University. Name: ID#: Section #: Score: / 4

1.1 - Introduction to Sets

Sets 1. The things in a set are called the elements of it. If x is an element of the set S, we say

(Refer Slide Time 3:31)

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

LECTURE 2 An Introduction to Boolean Algebra

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

3.1 Constructions with sets

BOOLEAN ALGEBRA AND CIRCUITS

Discrete Mathematics

Introduction to Computer Architecture

Review of Sets. Review. Philippe B. Laval. Current Semester. Kennesaw State University. Philippe B. Laval (KSU) Sets Current Semester 1 / 16

CSC Discrete Math I, Spring Sets

SETS. Sets are of two sorts: finite infinite A system of sets is a set, whose elements are again sets.

3.7. Vertex and tangent

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets

MATH 271 Summer 2016 Assignment 4 solutions

Rational Numbers CHAPTER Introduction

2 Review of Set Theory

Intersection of sets *

Publication Data. Reading Options. Licence and permissions ISBN Mark Jago, 2007

The Intersection of Two Sets

An Interesting Way to Combine Numbers

Excerpt from "Art of Problem Solving Volume 1: the Basics" 2014 AoPS Inc.

Lecture 4: examples of topological spaces, coarser and finer topologies, bases and closed sets

Introduction to Boolean Algebra

Sets. {1, 2, 3, Calvin}.

Introduction to Sets and Logic (MATH 1190)


Discrete Mathematics Lecture 4. Harper Langston New York University

Sets. Sets. Subset, universe. Specifying sets, membership. Examples: Specifying a set using a predicate. Examples

This Lecture. We will first introduce some basic set theory before we do counting. Basic Definitions. Operations on Sets.

1 Sets, Fields, and Events

The set consisting of all natural numbers that are in A and are in B is the set f1; 3; 5g;

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

Proofwriting Checklist

Equations of planes in

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Algorithms For Inference Fall 2014

or else take their intersection. Now define

Starting Boolean Algebra

The Further Mathematics Support Programme

c) the set of students at your school who either are sophomores or are taking discrete mathematics

CS103 Spring 2018 Mathematical Vocabulary

Fundamental Mathematical Concepts Math 107A. Professor T. D. Hamilton

Math 187 Sample Test II Questions

Graph Theory Questions from Past Papers

Lecture - 8A: Subbasis of Topology

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

Algebraic Specifications

Introduction to Boolean Algebra

Continuous functions and homeomorphisms

5. Lecture notes on matroid intersection

Orthogonal complements

Equality for Abstract Data Types

Cantor s Diagonal Argument for Different Levels of Infinity

(Refer Slide Time: 01.26)

A GRAPH FROM THE VIEWPOINT OF ALGEBRAIC TOPOLOGY

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

Problem One: A Quick Algebra Review

CS2 Language Processing note 3

Module 11. Directed Graphs. Contents

1.2 Venn Diagrams and Partitions

CMPSCI 250: Introduction to Computation. Lecture #7: Quantifiers and Languages 6 February 2012

COMP combinational logic 1 Jan. 18, 2016

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

3 No-Wait Job Shops with Variable Processing Times

Bases of topologies. 1 Motivation

CS40-S13: Functional Completeness

11 Sets II Operations

Notes on Minimum Cuts and Modular Functions

LECTURE 8: SETS. Software Engineering Mike Wooldridge

Lecture 6,

Technische Universität München Zentrum Mathematik

1. (10 points) Draw the state diagram of the DFA that recognizes the language over Σ = {0, 1}

Binary Relations Part One

Technische Universität München Zentrum Mathematik

2. BOOLEAN ALGEBRA 2.1 INTRODUCTION

EXTREME POINTS AND AFFINE EQUIVALENCE

Unit 7 Number System and Bases. 7.1 Number System. 7.2 Binary Numbers. 7.3 Adding and Subtracting Binary Numbers. 7.4 Multiplying Binary Numbers

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

Greedy Algorithms 1. For large values of d, brute force search is not feasible because there are 2 d

definition. An angle is the union of two rays with a common end point.

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

One of the most important areas where quantifier logic is used is formal specification of computer programs.

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Sets and set operations. Lecture 5 ICOM 4075

Lattice Tutorial Version 1.0

Mathematics for Computer Science Exercises from Week 4

9 R1 Get another piece of paper. We re going to have fun keeping track of (inaudible). Um How much time do you have? Are you getting tired?

6. Lecture notes on matroid intersection

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

Johns Hopkins Math Tournament Proof Round: Point Set Topology

LECTURE NOTES ON SETS

Lecture 2. 1 Introduction. 2 The Set Cover Problem. COMPSCI 632: Approximation Algorithms August 30, 2017

Intermediate Algebra. Gregg Waterman Oregon Institute of Technology

Sets. Margaret M. Fleck. 15 September 2010

Transcription:

Algebra of Sets Aditya Ghosh April 6, 2018 It is recommended that while reading it, sit with a pen and a paper. 1 The Basics This article is only about the algebra of sets, and does not deal with the foundations of set theory (e.g. answering questions like Can a set contain itself? ) A brief list of symbols with their meanings: (belongs to), (implies), (if and only if), : (such that), (such that), (for all) and (there exists). These also have negations like / (does not belong to), (does not imply), (does not exist) etc. And φ denotes the empty set. Set algebra starts with union and intersection of sets 1 : A B = {x : x A or x B}, A B = {x : x A and x B} For example, if A = {1, 2, 3}, B = {2, 4} the A B = {1, 2, 3, 4} and A B = {2}. Now, some obvious facts about and are: A A = A, A A = A, A φ = A, A φ = φ Then some facts which are easy to visualise: A B = B A, A B = B A, A (B C) = (A B) C, A (B C) = (A B) C These remind us of a + b = b + a, a b = b a and a + (b + c) = (a + b) + c, a (b c) = (a b) c where a, b, c are real numbers. In algebra of real numbers, we call these laws as commutative law and associative law respectively. In algebra of sets, they have the exactly same name. You might wonder why I replaced by + and by, why not the opposite? Notice that if we identify them like above, then not only the commutative and associative laws, even the laws A φ = A, A φ = φ will remind us of a + 0 = a, a 0 = 0. However, this gives us no clue about A A = A, A A = A. Still, we pursue this understanding, because several laws of set algebra (some will come next) remind us of ordinary algebra of numbers, if you relate and to addition and multiplication. 1 Pronounciation: Call A B as A union B or A cup B and A B as A intersection B or A cap B. 1

The next law of algebra of numbers that comes in our mind is the distributive law: a (b + c) = a b + a c. In algebra of sets, this will look like A (B C) = (A B) (A C). Is this true? To see whether it is true or not, we first pick any element in LHS and see whether it belongs to RHS or not: x A (B C) x A and (x B C) x A and (x B or x C) (x A and x B) or (x A and x C) (x A B) or (x A C) x (A B) (A C) So any element of A (B C) is also included in (A B) (A C). This is not enough to say these two sets are equal, because, for instance, the first one could be {1} and the other {1, 2}. So, in order to argue they are equal, we should see whether any element in RHS belongs to LHS or not. Before watching the solution below, why do not you try it yourself? Now if you have tried it, you will find that the steps are exactly the steps shown above, this time backwards. So we can simply summarise our solution as: x A (B C) x A and (x B C) x A and (x B or x C) (x A and x B) or (x A and x C) (x A B) or (x A C) x (A B) (A C) This shows that we indeed have the distributive law: A (B C) = (A B) (A C). Now, surprising is the fact that, in algebra of sets, we have another distributive law: A (B C) = (A B) (A C). In algebra of numbers, we certainly don t have any law like a + bc = (a + b)(a + c), but in case of sets, it holds. Can you prove it? I assure you that the proof is essentially similar to the previous proof. And you should try it before moving to the next paragraph. If you are still not convinced why the last law holds, you should take some examples 2. Taking examples and working out the LHS and RHS is the best way to get convinced about any equation you come across. 2 Venn Diagram can help as well. 2

So, we have two distributive laws in set algebra: A (B C) = (A B) (A C), A (B C) = (A B) (A C) Observe that the any of them can be obtained from the other by interchanging the s and s. Not only that, if you interchange the s and s in the proof of any of them, you will get the proof of the other one. This not only holds for this law, but also for any other law in set theory, provided you don t forget to interchange φ with U (universal set 3 ). A task you may take now: Prove all the laws that I stated before the distributive laws. The structure of the proof will be similar (and simpler!) to the proof of distributive laws. While doing all the proofs, you have noticed that we showing any element that belongs to the LHS, also belongs to the RHS and vice-versa. And I already discussed (with the examples LHS={1} and RHS={1, 2}) that showing only one direction is not enough. This notion of x A x B has a name in set theory: if it holds, we say that A is a subset of B. For example, A = { kolkata, chennai } is a subset of B = { delhi, chennai, kolkata, bengaluru }. We denote this by A B. Note that A A for any set A and A = B if and only if A B, B A. When A B, but A B, we say A is a proper subset of B. Some books denote it as A B, while some others write it as A B. There are some more operations on sets. One is the complement operation: A = {x : x U but x / A}. (warning: A is NOT defined as {x : x / A}. Because without defining the totality, how can we see which are the objects that are not in A!) What if we take complement of union or intersections of two sets? (A B) is the set of all common elements of A and B. And thus (A B) is the set of elements that are either missing in A or in B. So these are the elements of either A or B. And this hints at the the law (A B) = A B. Can you write a proof of it? And, as I already mentioned, if you interchange the s and s, what you get will be another law. Here it wil be (A B) = A B. Can you visualise why is this true? Can you now write a proof of it? The last two laws are known as De Morgan s laws. Another operation is the difference of sets, defined as A\B = {x : x A but x / B}. So, it is just the set obtained from A, by throwing away the objects of B. You can also denote it as A B. 3 Here I mean the univeral set in any given context. For example, if you take a test of 50 marks, your marks will be in {0, 1, 2,..., 50}. So in this context, this set can be taken as the universal set U. 3

An example would be good to understand the difference operation: Say A = {1, 2}, B = {2, 3}, C = {3, 1}. Then, A B = {1}, B A = {3}, B C = {2} etc. One thing you might observe that, A B = {x : x A but x / B} = {x : x A and x B } = A B. This is very much useful, when you try to do any problem involving difference of sets. 2 How They Work Together Till now, we have seen various laws of set algebra. Now its time to see some examples to understand how they all work together to give new results. Alongside examples, some exercises are also given below. 1. We have seen commutative law and associative law for and. Are the laws valid for? Before going into sets, ask yourself, are these valid for real numbers? Is it true that a b = b a, or a (b c) = (a b) c? No, right? Now lets think about sets. A B is the set obtained after throwing away elements of B from A, that is, set of objects which are in A but not in B. Whereas B A is the set of objects which are in B but not in A. Now it can be the case that B contain some element which is not in A, so that element remains in B A, but not in A B. So it seems (strongly!) that A B B A. Lets find one 4 counter-example then. We take A = {1}, B = {1, 2}. Then A B = φ and B A = {2}. So A B = B A is false. Next, what about A (B C) = (A B) C? What do you think, is it true or false? 2. Is it true or false: A (B C) = A B A C? Again, first think of real numbers. We surely have a(b c) = ab ac for any real numbers a, b, c. So the analogy of set algebra with algebra of numbers says that it should be true. Lets try it with an example. Take the example of A = {1, 2}, B = {2, 3}, C = {3, 1}. Here A (B C) = {1, 2} {2} = {2}, and A B = {2}, A C = {1} so A B A C = {2} {1} = {2}. Okay, so it seems to be true. Then lets try for a proof. This time we will not go for the LHS=RHS type proofs, rather we will make use of the laws we learned in the previous section. 4 In mathematics, whenever you need to disprove a statement, one counter-example is enough. However, to prove a statement, even millions of examples are not sufficient! 4

A B A C = (A B) (A C) (definition) = (A B) (A C ) (De Morgan) Which law will work now? Distributive, right? But it will look messy if we blindly write the whole thing. So let us write A B = P, and then (A B) (A C ) = P (A C ) Now, P A = (A B) A = (P A ) (P C ) (distributive law) = A (A B) (commutative law) = (A A) B (associative law) = φ B = φ and P C = (A B) C = A (B C ) (associative law) = A (B C) Hence (P A ) (P B ) = φ (A (B C)) = A (B C). Done! Just observe how all the laws worked together, as a team to give the final result! Comment: I intentionally split the proof into several parts and mentioned the names of the laws, just to illustrate how the laws worked. You could also write the proof in one go: A B A C = (A B) (A C) = (A B) (A C ) = ((A B) A ) ((A B) C ) = (A (A B)) (A (B C )) = ((A A) B) (A (B C)) = (φ B) (A (B C)) = φ (A (B C)) = A (B C). If you completely understood the solution of this problem, then try the following problem: 3. Is it true or false: A (B C) = (A B) (A C)? 5

4. Suppose A φ. Can A be non-empty? Answer: No. Because if a A then a φ which is not possible. So we must have A = φ. 5. Suppose B C = φ. What can you say about B and C? Answer. B = C = φ. Can you tell why? 6. Suppose B, C are sets such that A B = A C holds for any set A. Does this imply B = C? This is a tricky problem. Since the equation is valid for all sets A, we can just put A = φ to get φ B = φ C. Clearly, LHS is B and RHS is C. Hence B = C. 7. Suppose B, C are non-empty sets such that A B = A C holds for any set A φ. Does this imply B = C? Note that here you can not put A = φ, but can put A = something other than φ that will do the job. Why not try it yourself before looking at the solution! 8. Suppose B, C are sets such that A B = A C holds for any set A φ. Does this imply B = C? Can you see the difference between this and the previous question? 9. Suppose B, C are sets such that A B = A C holds for any set A φ. Does this imply B = C? Before going to the next problem, we define another operatio on sets, called the symmetric difference of A, B. Formally it is defined as A B = (A B) (B A). Note that RHS is the set of elements which are either in A but not in B or, are in B but not in A. So A B is the set of all things which are included in either A or B, but not in both. (This intuition is little helpful to understand why it is called symmetric difference. See 12. and 15. below for more meaning of the symmetry in it) Let us see a few examples. A = {1, 2, 3}, B = {3, 4}, C = {1, 5}. Then A B = {1, 2, 4}, B C = {1, 3, 4, 5}, C A = {2, 3, 5}. Now observe one thing, A B is the set obtained by throwing away the common elements of A, B from their union, so it seems that A B = (A B) (A B), right? Okay, then lets go for a proof of it! 6

10. Show that (A B) (B A) = (A B) (A B) This is much similar to 2. and hence I leave this for you. One hint that I can give: Start with the RHS first. Now let us try some more problems on symmetric difference. 11. Suppose X = {1, 2, 3,..., 9} and B = {1, 2, 3, 4}. How many subsets A X are there which satisfy A B = {3}? This problem is not very tough if you think intuitively what does mean. If you are still stuck, then let me give a hint: Take some subsets A of X and work out what is A B. Try to make some subsets A X such that A B = {3} holds. 12. Is it true that A B = B A? Thinking intuitively, this question should be very easy. Can you write a quick proof of it? 13. Show that, A (B C) = (A (B C)) (A B C). This is another typical problem where you need to just manipulate the laws. However, there are two definitions for B C, namely (B C) (C B) and (B C) (B C), and recall that X Y = X Y. What do you think, which one of the two definitions will make our job easier? Since we have A (B C) = A (B C) so it would be better if we get one inside (B C), which means, we want a inside B C. So let us put B C = (B C) (B C) = (B C) (B C). A (B C) = A (B C) = A ( (B C) (B C) ) Following is a similar problem. = A ( (B C) (B C) ) (using (X ) = X) = (A (B C) ) (A (B C)) = (A (B C)) (A B C). 14. Show that, (B C) A = (B (C A)) (C (A B)) 15. Is it true that A (B C) = (A B) C? This problem gives use more insight about the symmetry in symmetric difference. 7

To first guess whether this is true or not, draw Venn diagrams 5 to see what are contained in the LHS and what are contained in the RHS. You will find that both the LHS and RHS contain the elements which belong to exactly one the sets A, B, C or all of them. And hence the answer is Yes. We shall prove it, but before that, can you observe the symmetry in A B C? Here are the outlines of the proof, the rest have to be filled by you: A (B C) = ( A (B C) ) ( (B C) A ) I hope now you can understand why I put the problems 13. and 14. above. Just use them to find that LHS is just the set (B (C A)) (C (A B)) (A (B C)) (A B C). Next, do similar things for the RHS. (Again you have to use 13. and 14.) Finally, note that RHS is the union of the same 4 sets as above, possibly in some other ordering. 16. Prove that there exists a set O which satisfy A O = A for all sets A. Is this choice of O unique? 17. For any set A, prove that there exists a set B which satisfy A B = O. Is this choice of B unique? Both these questions are tricky, you have to guess what can be O and what can be B. To prove the uniqueness part in 16., assume that there are two such O, lets call them O 1 and O 2. Then O 1 O 2 = O 1 and O 2 O 1 = O 2. And of course O 1 O 2 = O 2 O 1. Do something similar for the uniqueness part of 17. I end this section with the next problem. 18. For any set X, let P (X) denote the set of all subsets of X (called the power set of X). Show that A B if and only if P (A) P (B). Note that the definition of power-set says Y P (X) if and only if Y X. This is the main tool we need for this problem. If A B, then for any C P (A), we have C A. So C A B. Now, C B implies C P (B). This proves the only if part. For the if part, we have to show that P (A) P (B) implies A B. Note that A A, so A P (A). As P (A) P (B), we get A P (B). This implies A B. 5 But Venn diagrams are not proofs, you need to always write a proof if it holds and give at least one counter-example if it is false. To argue why Venn diagram is less helpful as proofs, I suggest you to draw a general Venn digram for say 5 sets or 8 sets. Can you draw it? 8

3 More Problems Here are some more problems on algebra of sets. For problems of the form Is it true that, if the answer is yes then you have to prove it, and if the answer is no then you need to give just one counter-example. I emphasize on the fact that by giving examples we can not prove any statement. 1. Prove that A A B and A B A for any sets A and B. 2. For any set A, what are A A, A φ, φ A? 3. If A C and B C then show that A B C. 4. If C A and C B then show that C A B. 5. Prove that A (A B) = A B. 6. Is it true that A (B C D) = (A B) (A C) (A D)? Can you make this more general? What about A (B C D)? 7. Is it true that (A B C) = A B C? Can you make it more general? What about (A B C)? 8. Is it true that C (A B) = (C A) (C B)? 9. Is it true that C (A B) = (C A) (C B)? 10. Is it true that C (A B) = (C A) (C B)? 11. Prove that (B A) C = (B C) A = B (C A) 12. Is it true that (B A) C = (B C) (A C)? 13. Show that (X A) B if and only if A B = X. 14. Prove that A (B C) = (A B) C if and only if C A. 15. If A C = B C, then is it necessary that A = B? 16. Prove that A (B C) = (A B) (A C). 17. Show that (A B) C = A (B C) holds if and only if A C. 18. If C B A then is it true that A C = (A B) (B C)? 19. If A C = B C and A C = B C then is it necessary that A = B? 20. Let A, B, C be any three sets. Prove that C (A B) if and only if C (A B) and A B C = φ. 9