CSCI 2824: Lecture 15This lecture will continue on
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 proper subset of (written ) iff but at the same time . 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,
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: Theorem: The power set of has elements. We can prove this claim in various ways. The one-one correspondence between elements of the power set and binary strings of bits is the easiest proof. To convince ourselves fully that such correspondences can be used to count elements in a set, we need to explore them further. 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
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-1Claim For any three sets , we have . Proof
To prove that two sets are the same, we show that each one is the subset of the other.
Example-2Claim Given two sets , holds if and only if . Notice that the claim is an if and only if claim. Such claims are actually two subclaims in disguise. We need to prove each of them.
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 Subclaim-2
For any two sets , IF then . We will attempt a proof by contradiction.
This however, contradicts our assumption that . |