Discrete Mathematics/Set theory/Page 2

Power Sets
The power set of a set A is the set of all its subsets (including, of course, itself and the empty set). It is denoted by P(A).

Using set comprehension notation, P(A) can be defined as
 * P(A) = { Q | Q &sube; A }

Example 4


 * Write down the power sets of A if:

(a) A = {1, 2, 3}

(b) A = {1, 2}

(c) A = {1}

(d) A = &oslash;

Solution

(a) P(A) = { {1, 2, 3}, {2, 3}, {1, 3}, {1, 2}, {1}, {2}, {3}, &oslash; }

(b) P(A) = { {1, 2}, {1}, {2}, &oslash; }

(c) P(A) = { {1}, &oslash; }

(d) P(A) = { &oslash; }

Cardinality of a Power Set
Look at the cardinality of the four sets in Example 4, and the cardinality of their corresponding power sets. They are:

Clearly, there's a simple rule at work here: expressed as powers of 2, the cardinalities of the power sets are 23, 22, 21 and 20.

It looks as though we have found a rule that if | A | = k, then | P(A) | = 2k. But can we see why?

Well, the elements of the power set of A are all the possible subsets of A. Any one of these subsets can be formed in the following way:


 * Choose any element of A. We may decide to include this in our subset, or we may omit it. There are therefore 2 ways of dealing with this first element of A.


 * Now choose a second element of A. As before, we may include it, or omit it from our subset: again a choice of 2 ways of dealing with this element.


 * ...and so on through all k elements of A.

Now the fundamental principle of combinatorics tells us that if we can do each of k things in 2 ways, then the total number of ways of doing them all, one after the other, is 2k.

Each one of these 2k combinations of decisions - including elements or omitting them - gives us a different subset of A. There are therefore 2k different subsets altogether.

So if | A | = k, then | P(A) | = 2k.

The Foundational Rules of Set Theory
The laws listed below can be described as the Foundational Rules of Set Theory. We derive them by going back to the definitions of intersection, union, universal set and empty set, and by considering whether a given element is in, or not in, one or more sets.

The Idempotent Laws

As an example, we'll consider the &prime;I heard you the first time&prime; Laws – more correctly called the Idempotent Laws - which say that:


 * A &cap; A = A and A &cup; A = A

This law might be familiar to you if you've studied logic. The above relationship is comparable to the tautology.

These look pretty obvious, don't they? A simple explanation for the intersection part of these laws goes something like this:

The intersection of two sets A and B is defined as just those elements that are in A and in B. If we replace B by A in this definition we get that the intersection of A and A is the set comprising just those elements that are in A and in A. Obviously, we don't need to say this twice (I heard you the first time), so we can simply say that the intersection of A and A is the set of elements in A. In other words:


 * A &cap; A = A

We can derive the explanation for A &cup; A = A in a similar way.

De Morgan's Laws

There are two laws, called De Morgan's Laws, which tell us how to remove brackets, when there's a complement symbol - &prime; - outside. One of these laws looks like this:


 * (A &cup; B) &prime; = A &prime; &cap; B &prime;

(If you've done Exercise 3, question 4, you may have spotted this law already from the Venn Diagrams.)

Look closely at how this Law works. The complement symbol after the bracket affects all three symbols inside the bracket when the brackets are removed:


 * A becomes A &prime;


 * B becomes B &prime;


 * and &cup; becomes &cap;.

To prove this law, note first of all that when we defined a subset we said that if


 * A &sube; B and B &sube; A, then A = B

So we prove:


 * (i) (A &cup; B) &prime; &sube; A &prime; &cap; B &prime;

and then the other way round:


 * (ii) A &prime; &cap; B &prime; &sube; (A &cup; B) &prime;

The proof of (i) goes like this:

Let's pick an element at random x &isin; (A &cup; B) &prime;. We don't know anything about x; it could be a number, a function, or indeed an elephant. All we do know about x, is that


 * x &isin; (A &cup; B) &prime;

So


 * x &notin; (A &cup; B)

because that's what complement means.

This means that x answers No to both questions Are you in A? and Are you in B? (otherwise it would be in the union of A and B). Therefore


 * x &notin; A and x &notin; B

Applying complements again we get


 * x &isin; A &prime; and x &isin; B &prime;

Finally, if something is in two sets, it must be in their intersection, so


 * x &isin; A &prime; &cap; B &prime;

So, any element we pick at random from (A &cup; B) &prime; is definitely in A &prime; &cap; B &prime;. So by definition


 * (A &cup; B) &prime; &sube; A &prime; &cap; B &prime;

The proof of (ii) is similar:

First, we pick an element at random from the first set, x &isin; A &prime; &cap; B &prime;

Using what we know about intersections, that means


 * x &isin; A &prime; and x &isin; B &prime;

So, using what we know about complements,


 * x &notin; A and x &notin; B

And if something is in neither A nor B, it can't be in their union, so


 * x &notin; A &cup; B

So, finally:


 * x &isin; (A &cup; B) &prime;

So:


 * A &prime; &cap; B &prime; &sube; (A &cup; B) &prime;

We've now proved (i) and (ii), and therefore:


 * (A &cup; B) &prime; = A &prime; &cap; B &prime;

This gives you a taste for what's behind these laws. So here they all are.

The Laws of Sets
Commutative Laws
 * A &cap; B = B &cap; A
 * A &cup; B = B &cup; A

Associative Laws
 * (A &cap; B) &cap; C = A &cap; (B &cap; C)
 * (A &cup; B) &cup; C = A &cup; (B &cup; C)

Distributive Laws
 * A &cap; (B &cup; C) = (A &cap; B) &cup; (A &cap; C)
 * A &cup; (B &cap; C) = (A &cup; B) &cap; (A &cup; C)

Idempotent Laws
 * A &cap; A = A
 * A &cup; A = A

Identity Laws
 * A &cup; &oslash; = A
 * A &cap; U = A
 * A &cup; U = U
 * A &cap; &oslash; = &oslash;

Involution Law (A &prime;) &prime; = A

Complement Laws
 * A &cup; A = U'
 * A &cap; A' = &oslash;
 * U &prime; = &oslash;
 * &oslash; &prime; = U

De Morgan’s Laws
 * (A &cap; B) &prime; = A &prime; &cup; B &prime;
 * (A &cup; B) &prime; = A &prime; &cap; B &prime;

Duality and Boolean Algebra
You may notice that the above Laws of Sets occur in pairs: if in any given law, you exchange &cup; for &cap; and vice versa (and, if necessary, swap U and &oslash; ) you get another of the laws. The 'partner laws' in each pair are called duals, each law being the dual of the other.


 * For example, each of De Morgan's Laws is the dual of the other.


 * The first complement law, A &cup; A &prime; = U, is the dual of the second: A &cap; A &prime; = &oslash;.


 * ... and so on.

This is called the Principle of Duality. In practical terms, it means that you only need to remember half of this table!

This set of laws constitutes the axioms of a Boolean Algebra. See Boolean Algebra for more.

Proofs using the Laws of Sets
We may use these laws - and only these laws - to determine whether other statements about the relationships between sets are true or false. Venn diagrams may be helpful in suggesting such relationships, but only a proof based on these laws will be accepted by mathematicians as rigorous.

Example 5

Using the Laws of Sets, prove that the set (A &cup; B) &cap; (A &prime; &cap; B) &prime; is simply the same as the set A itself. State carefully which Law you are using at each stage.

Before we begin the proof, a few do's and don't’s:

Solution

We have now proved that (A &cup; B) &cap; (A &prime; &cap; B) &prime; = A whatever the sets A and B contain. A statement like this – one that is true for all values of A and B – is sometimes called an identity.

Hints on Proofs

There are no foolproof methods with these proofs – practice is the best guide. But here are a few general hints.


 * Start with the more complicated side of the equation, aiming to simplify it into the other side.


 * Look for places where the Distributive Law will result in a simplification (like factorising in 'ordinary' algebra - see the third line in Example 5 above).


 * You’ll probably use De Morgan’s Law to get rid of a ' symbol from outside a bracket.


 * Sometimes you may need to 'complicate' an expression before you can simplify it, as the next example shows.

Example 6

Use the Laws of Sets to prove that A &cup; (A &cap; B) = A.

Looks easy, doesn’t it? But you can go round in circles with this one. (Try it first before reading the solution below, if you like.) The key is to 'complicate' it a bit first, by writing the first A as A &cap; U (using one of the Identity Laws).

Solution

Set Theory Exercise 4
Click link for Set Theory Exercise 4.

Ordered pair
To introduce this topic, we look first at a couple of examples that use the principle of combinatorics that we noted earlier (see Cardinality); namely, that if an event R can occur in r ways and a second event S can then occur in s ways, then the total number of ways that the two events, R followed by S, can occur is r &times; s. This is sometimes called the r-s Principle.

Example 7

How many different meals – Main Course followed by Dessert - can be chosen from the above menu?

Solution

Since we may choose the main course in four ways, and then the dessert in three ways to form a different combination each time, the answer, using the r-s Principle, is that there are 4 &times; 3 = 12 different meals.

Example 8

You're getting ready to go out. You have 5 different (clean!) pairs of underpants and two pairs of jeans to choose from. In how many ways can you choose to put on a pair of pants and some jeans?

Solution

Using the r-s Principle, there are 5 &times; 2 = 10 ways in which the two can be chosen, one after the other.

In each of the two situations above, we have examples of ordered pairs. As the name says, an ordered pair is simply a pair of 'things' arranged in a certain order. Often the order in which the things are chosen is arbitrary – we simply have to decide on a convention, and then stick to it; sometimes the order really only works one way round.

In the case of the meals, most people choose to eat their main course first, and then dessert. In the clothes we wear, we put on our underpants before our jeans. You are perfectly free to fly in the face of convention and have your dessert before the main course - or to wear your underwear on top of your trousers - but you'll end up with different sets of ordered pairs if you do. And, of course, you'll usually have a lot of explaining to do!

The two 'things' that make up an ordered pair are written in round brackets, and separated by a comma; like this:


 * (Lasagne, Gateau)

You will have met ordered pairs before if you've done coordinate geometry. For example, (2, 3) represents the point 2 units along the x-axis and 3 units up the y-axis. Here again, there's a convention at work in the order of the numbers: we use alphabetical order and put the x-coordinate before the y-coordinate. (Again, you could choose to do your coordinate geometry the other way round, and put y before x, but once again, you'd have a lot of explaining to do!)

Using set notation, then, we could describe the situation in Example 7 like this:


 * M = {main courses}, D = {desserts}, C = {complete meals}.

Then C could be written as:


 * C = { (m, d) | m &isin; M and d &isin; D }.

C is called the set product or Cartesian product of M and D, and we write:


 * C = M &times; D

(read 'C equals M cross D')

Suppose that the menu in Example 7 is expanded to include a starter, which is either soup or fruit juice. How many complete meals can be chosen now?

Well, we can extend the r-s Principle to include this third choice, and get 2 &times; 4 &times; 3 = 24 possible meals.

If S = {soup, fruit juice}, then we can write:


 * C = S &times; M &times; D

An element of this set is an ordered triple: (starter, main course, dessert). Notice, then, that the order in which the individual items occur in the triple is the same as the order of the sets from which they are chosen: S &times; M &times; D does not give us the same set of ordered triples as M &times; D &times; S.

Ordered n-tuples
In general, if we have n sets: A1, A2, ..., An, then their Cartesian product is defined by:


 * A1 &times; A2 &times; ... &times; An = { (a1, a2, ..., an) | a1 &isin; A1, a2 &isin; A2, ..., an &isin; An) }

and (a1, a2, ..., an) is called an ordered n-tuple.

Notation

A1 &times; A2 &times; ... &times; An is sometimes written:


 * $$\times_{i=1}^{n}$$ Ai

The Cartesian Plane
You probably know already the way in which a point in a plane may be represented by an ordered pair. The diagram in Fig. 8 illustrates a Cartesian Plane, showing the point represented by the ordered pair (5, 2).

The lines are called axes: the x-axis and the y-axis. The point where they meet is called the origin. The point (5, 2) is then located as follows: start at the origin; move 5 units in the direction of the x-axis, and then 2 units in the direction of the y-axis.

Using set notation:

If X = {numbers on the x-axis} and Y = {numbers on the y-axis}, then:


 * (5, 2) &isin; X &times; Y

and, indeed, if X = {all real numbers}, and Y = {all real numbers} then X &times; Y as a whole represents all the points in the x-y plane.

(This is why you will sometimes see the x-y plane referred to as R2, where R = {real numbers}.) Example 9

It is believed that, if A, B, P and Q are sets where B &sub; A and Q &sub; P, then:


 * B &times; Q &sub; A &times; P

Use a carefully shaded and labelled Cartesian diagram to investigate this proposition.

Solution

Bearing in mind what we said above about the ordered pairs in X &times; Y corresponding to points in the x-y plane, if we want to represent a Cartesian product like A &times; P on a diagram, we shall need to represent the individual sets A and P as sets of points on the x- and y- axes respectively.

The region representing the Cartesian product A &times; P is then represented by the points whose x- and y-coordinates lie within these sets A and P. Like this:



The same can also be said about B and Q: B must lie on the x-axis, and Q on the y-axis.

In addition, since B &sub; A, then we must represent B as a set chosen from within the elements of A. Similarly, since Q &sub; P, the elements of Q must lie within the elements of P.

When we add these components on to the diagram it looks like this:

Finally, when we represent the set B &times; Q as a rectangle whose limits are determined by the limits of B and Q, it is clear that this rectangle will lie within the rectangle representing A &times; P:



So, the proposition B &times; Q &sub; A &times; P appears to be true.

Set Theory Exercise 5
Click link for Set Theory Exercise 5.