Introduction to Sets - Hampden-Sydney...

Post on 17-Jul-2020

7 views 0 download

Transcript of Introduction to Sets - Hampden-Sydney...

Introduction to SetsLecture 28Section 6.1

Robb T. Koether

Hampden-Sydney College

Wed, Mar 5, 2014

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 1 / 36

1 Sets

2 Proving Set Relations

3 Set Operations

4 Power Sets

5 Cartesian Products

6 Assignment

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 2 / 36

Outline

1 Sets

2 Proving Set Relations

3 Set Operations

4 Power Sets

5 Cartesian Products

6 Assignment

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 3 / 36

Sets

Definition (Set)A set is a collection of elements.

This “definition” does not really define what a set or an element is.It merely substitutes the word “collection” for “set.”But we already know what a set is, right?

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 4 / 36

Set Notation

Let S be a set and let P(x) be a predicate.Then we can define a set A to be

{x ∈ S | P(x)}.

This means that A contains every element x of S for which P(x) istrue.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 5 / 36

Subsets

Definition (Subset)A set A is a subset of a set B, denoted A ⊆ B, if x ∈ A→ x ∈ B.

Definition (Equality)A set A is equal to a set B, denoted A = B, if x ∈ A↔ x ∈ B.

That is, A ⊆ B if every element of A is also an element of B.And A = B if every element of A is an element of B and also everyelement of B is an element of A.Therefore, A = B if and only if A ⊆ B and B ⊆ A.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 6 / 36

Notation

If A ⊆ B, but A 6= B, then we write A ⊂ B and A is called a propersubset of B.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 7 / 36

Outline

1 Sets

2 Proving Set Relations

3 Set Operations

4 Power Sets

5 Cartesian Products

6 Assignment

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 8 / 36

Proving the Subset Relation

To prove that A ⊆ B,Let x be an arbitrary element (generic particular) of A.That is, write “Let x ∈ A.”Then show that x ∈ B.Conclude that A ⊆ B.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 9 / 36

Proving Set Equality

To prove that A = B,Prove first that A ⊆ B.Then prove that B ⊆ A.Conclude that A = B.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 10 / 36

Example

TheoremLet

A = {n ∈ Z | n = 6k + 3 for some k ∈ Z}

and letB = {n ∈ Z | n = 3k + 6 for some k ∈ Z}.

Then A ⊆ B.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 11 / 36

Example

Proof.Let n ∈ A.Then there exists k ∈ Z such that n = 6k + 3.Let m = 2k − 1.Then

3m + 6 = 3(2k − 1) + 6= 6k + 3= n.

So n ∈ B and therefore, A ⊆ B.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 12 / 36

Example

TheoremLet

A = {n ∈ Z | n divides 8 and n divides 12}

and letB = {n ∈ Z | n divides 4}.

Then A = B.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 13 / 36

Example

Proof.(Proof that A ⊆ B)

Let n ∈ A.Then n | 8 and n | 12.So 8 = na and 12 = nb for some integers a and b.It follows that 4 = 12− 8 = n(b − a).So n | 4.Therefore, n ∈ B and, thus, A ⊆ B.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 14 / 36

Example

Proof.(Proof that B ⊆ A)

Let n ∈ B.Then n | 4.Because 4 | 8 and 4 | 12, it follows that n | 8 and n | 12.Therefore, n ∈ A and, thus, B ⊆ A.Therefore, A = B.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 15 / 36

Outline

1 Sets

2 Proving Set Relations

3 Set Operations

4 Power Sets

5 Cartesian Products

6 Assignment

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 16 / 36

Union and Intersection

Definition (Union)The union of sets A and B, denoted A ∪ B, is the set

{x | x ∈ A or x ∈ B}.

Definition (Intersection)The intersection of sets A and B, denoted A ∩ B, is the set

{x | x ∈ A and x ∈ B}.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 17 / 36

Union and Intersection

We may define the union and intersection of sets in terms ofpredicates.Let A = {x | P(x)} and let B = {x | Q(x)} for some predicatesP(x) and Q(x).Then

A ∪ B = {x | P(x) ∨Q(x)}

andA ∩ B = {x | P(x) ∧Q(x)}

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 18 / 36

The Universal Set

DefinitionThe universal set, denoted U, in any given situation is the set of allelements under consideration.

Typically, the universal set will be Z or Q or R.When the universal set is understood (or not relevant), we maywrite simply

{x | P(x)}

rather than{x ∈ S | P(x)}.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 19 / 36

Difference and Complement

Definition (Union)The difference of set A minus set B, denoted A− B, is the set

{x | x ∈ A and x /∈ B}.

Definition (Complement)The complement of a set A, denoted Ac , is the set

U − A = {x | x ∈ U and x /∈ A}.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 20 / 36

Difference and Complement

We may define the difference and complement of sets in terms ofpredicates.Let A = {x | P(x)} and let B = {x | Q(x)} for some predicatesP(x) and Q(x).Then

A− B = {x | P(x) ∧ ∼ Q(x)}

andAc = {x | ∼ P(x)}

(Recall that the free variable x has a “domain” D.)

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 21 / 36

Disjoint Sets

Definition (Disjoint Sets)Two sets A and B are disjoint if A ∩ B = ∅.

Definition (Mutually Disjoint Sets)Set A1, A2, A3, . . . are mutually disjoint if Ai ∩ Aj = ∅ for all i and jwhere i 6= j .

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 22 / 36

Example

Let E = {n ∈ Z | n is even}.Then the odd integers are O = Z− E .Furthermore, the sets E and O are disjoint.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 23 / 36

Example

Let

A0 = {n ∈ Z | n mod 3 = 0},A1 = {n ∈ Z | n mod 3 = 1},A2 = {n ∈ Z | n mod 3 = 2},

Then A1, A2, and A3 are mutually disjoint.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 24 / 36

Partition

Definition (Partition)A partition of a set A is a collection of nonempty subsets{A1, A2, A3, . . .} such that

A = A1 ∪ A2 ∪ A3 ∪ · · · andA1, A2, A3, . . . are mutually disjoint.

In the last example, the collection of sets {A0, A1, A2} is a partitionof Z.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 25 / 36

Outline

1 Sets

2 Proving Set Relations

3 Set Operations

4 Power Sets

5 Cartesian Products

6 Assignment

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 26 / 36

Power Sets

DefinitionThe power set of a set A, denoted P(A), is the set of all subsets of A.

The power set of A includes A itself and the empty set.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 27 / 36

Example

Let A = {a, b, c}.List the elements in P(A).

P(A) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}= {∅, {a}, {b}, {a, b}, {c}, {a, c}, {b, c}, {a, b, c}}.

What is P(∅)?What is P(P(∅))?What is P(P(P(∅)))?

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 28 / 36

The Power Set

TheoremLet A be a set with n elements. Then P(A) contains 2n elements.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 29 / 36

The Power Set

Proof.We proceed by induction on n.When n = 0, let A be a set of 0 elements, i.e., A = ∅.Also, P(A) = {∅}, which has 1 element, and 1 = 20.So the statement is true when n = 0.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 30 / 36

The Power Set

Proof.Suppose the statement is true when n = k for some integer k ≥ 0.Let A be a set with k + 1 elements.Choose an element x ∈ A and let B = A− {x}.Then B has k elements, so P(B) has 2k elements.Then A has 2k subsets that do not contain x and 2k subsets thatdo contain x .So A has 2k + 2k = 2k+1 subsets, i.e., P(A) has 2k+1 elements.Therefore, the statement is true when n = k + 1.So it is true for all n ≥ 0.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 31 / 36

Outline

1 Sets

2 Proving Set Relations

3 Set Operations

4 Power Sets

5 Cartesian Products

6 Assignment

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 32 / 36

Cartesian Products

DefinitionThe Cartesian product of sets A and B, denoted A× B, is the set of allordered pairs (a, b) where a ∈ A and b ∈ B.

We can extend the Cartesian product to any number of sets:

A× B × C = {(a, b, c) | a ∈ A, b ∈ B, c ∈ C}.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 33 / 36

Examples

What is {a, b, c} × {1, 2}?What is Z× Z?What is A×∅, for any set A?

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 34 / 36

Outline

1 Sets

2 Proving Set Relations

3 Set Operations

4 Power Sets

5 Cartesian Products

6 Assignment

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 35 / 36

Assignment

AssignmentRead Section 6.1, pages 336 - 349.Exercises 1, 2, 6, 9, 12, 17, 19, 27, 30, 31, 32, 33, page 349.

Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 36 / 36