# Introduction to Sets - Hampden-Sydney · PDF file Robb T. Koether (Hampden-Sydney College) Introduction to Sets Wed, Mar 5, 2014 19 / 36. Difference and Complement Deﬁnition (Union)

• View
1

0

Embed Size (px)

### Text of Introduction to Sets - Hampden-Sydney · PDF file Robb T. Koether (Hampden-Sydney College)...

• Introduction to Sets Lecture 28 Section 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) is true.

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 every element 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 proper subset 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

Theorem Let

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

and let B = {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

Theorem Let

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

and let B = {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 of predicates. Let A = {x | P(x)} and let B = {x | Q(x)} for some predicates P(x) and Q(x). Then

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

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

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

• The Universal Set

Definition The universal set, denoted U, in any given situation is the set of all elements under consideration.

Typically, the universal set will be Z or Q or R. When the universal set is understood (or not relevant), we may write 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 of predicates. Let A = {x | P(x)} and let B = {x | Q(x)} for some predicates P(x) and Q(x). Then

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

and Ac = {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 j where 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 ∪ · · · and A1, A2, A3, . . . are mutually disjoint.

In the last example, the collection of sets {A0, A1, A2} is a partition of 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

Definition The 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

Theorem Let 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 ha ##### Lecture 38 Robb T. Koether - 2015...Bresenham’s Algorithm Lecture 38 Robb T. Koether Hampden-Sydney College Wed, Dec 2, 2015 Robb T. Koether (Hampden-Sydney College) Bresenham’s
Documents Documents