## CSCI 2824: Lecture 15This lecture will continue on Partitions of a set: Definition. Proving equivalences of sets (a couple of examples).
Material from book: 3.3. ## SubsetsGiven two sets , and , we say that if every element of is an element of . is said to be a Two sets are equal, i.e, if and only if and . ## Power SetsThe power set of a set is the set that contains all subsets of , including the empty set. Let us first see some examples of power sets: 1. , its power set is . 2. Take the empty set. Its power set is the set containing the empty set. What is the difference between the empty set and set containing it? It is easy to explain through code. Here is code to create empty set in C++ (you can write equivalent in Java): Empty Set
set<int> * s = new set<int>(); // Create an empty set. assert( s-> size() == 0); // s has no elements Here is how we create a set containing the empty set. Set containing the empty set
set<int> * emptySet = new set<int>(); // Create empty set. set< set<int>* > * emptyEmptySet = new set< set<int> > (); emptyEmptySet -> insert (emptySet); // Put the empty set into the empty empty. assert( emptyEmptySet -> size() == 1); // The size of the set containing the empty set is 1. As you can see from the illustration above, the sets and its power set are indeed two different beasts!! The empty set has cardinality zero whereas the power set of empty has cardinality . ## Counting the Elements of the Power SetIf set has elements, how many elements does its power-set have? Let us take a smaller example . And look at its power set. Each element of the power set is a subset of . We can visualize the power-set using the following table where a entry corresponding to column means that has been omitted from the subset.
Note: We have established a one-one correspondence between the power set of and a binary number of bits. In the example above, Every element of the power set of corresponds to a unique bit binary number. Every bit binary to an element of the power-set.
What about with elements? Every element will correspond to a bit binary number. How many bit binary numbers are there? We have derived sufficient evidence to write the following theorem:
We can prove this claim in various ways. The This naturally brings us to the topic of functions and one-to-one correspondences. Before that, we take a small diversion to define a partition here. It will be useful later when we study equivalence classes. ## PartitionA parition, formalizes the idea of dividing up the elements of a set into disjoint sets. Eg., Take a set . An example of a partition of is . Another example is . A partition of a set is a set of subsets such that None of the s are empty: for . Every pair of elements and are disjoint: for . The union of all elements gives : .
True or False: Any partition of a set is a subset of its power set . ## FactoidHere is a problem about partitions: You are given a set of numbers . The question is whether we can partition into two subsets such that the sum of elements in is the same as the sum in . This problem has applications all over the place but is known to be a hard problem (as hard as factoring integers). ## Proving Properties of SetsWe are often asked to prove certain relations between two sets: they are the same or that one is a subset of another. These proofs tend to be simple provided our approach to them is systematic. Here are a couple of examples: ## Example-1
Proof
To prove that two sets are the same, we show that each one is the subset of the other. Prove . Take any element . We will show that . We know that by definition, . In other words, or . If , . Otherwise, if , we have .
Therefore, we conclude that .
Prove . Once again, let us take any element . We will show that . We know that either or . Therefore, we conclude that or . I.e, . Putting this together, we get .
## Example-2
Notice that the claim is an Subclaim-1: For any sets , IF then . Subclaim-2: For any two sets , IF then .
Proof of Subclaim-1:
Let be any two given sets such that holds. We will show that holds. To show , we will first show that (1.) and (2.) . Proof of : Take any element of and show that it also belongs to . Let . We know that or . However, since , we know that . Therefore, we can safely conclude that . Therefore .
Proof of : Take any element of and show that it also belongs to . Let . By definition of union, we conclude that .
Proof of Subclaim-2
For any two sets , IF then . We will attempt a proof by contradiction. Let be any two sets such that . However for the sake of contadition, we assume that . Therefore, there is some element such that . However, since , we have that . However, . Therefore, we have proved that since one of the sets has in it and the other does not.
This however, contradicts our assumption that . |