Sets Definition Visualize a dictionary as a directed

  • Slides: 18
Download presentation
Sets

Sets

Definition • Visualize a dictionary as a directed graph. • Nodes represent words •

Definition • Visualize a dictionary as a directed graph. • Nodes represent words • If word w is defined in terms of word u, draw an edge from w to u. • Can the dictionary be infinite? • Can the dictionary have cycles? • Thus, some words are not formally defined. • “Set” is a primitive concept in mathematics: It is not formally defined. • A set intuitively is an unordered collection of elements. Copyright © Peter Cappello 2011 2

Preliminaries The universe of discourse, denoted U, intuitively is a set describing the context

Preliminaries The universe of discourse, denoted U, intuitively is a set describing the context for the duration of a discussion. E. g. , let U be the set of integers. (As far as I can tell, the purpose of the Universe is to ensure that the complement of a set is a set. ) Copyright © Peter Cappello 2016 3

Preliminaries A set S is well-defined when we can decide whether any particular object

Preliminaries A set S is well-defined when we can decide whether any particular object in the universe of discourse is an element of S. – S is the set of all even numbers – S is the set of all human beings Do we have a rule that lets us decide whether some blob of protoplasm is a human being? Copyright © Peter Cappello 2011 4

Definitions & Conventions • A set’s objects are called its members or elements. •

Definitions & Conventions • A set’s objects are called its members or elements. • We can describe a set with set builder notation. O = { x | x is an odd positive integer < 10 }. O = { x Z+ | x < 10 and x is odd }. • By convention: N = { 0, 1, 2, 3, … } the set of natural numbers. Z = { …, -2, -1, 0, 1, 2, … } the set of integers. Z+ = { 1, 2, 3, … } the set of positive integers. Q = { p/q | p, q Z and q 0 } the set of rationals. R = the set of real numbers. Copyright © Peter Cappello 2011 5

Definitions • Set A is a subset of set B, denoted A B, when

Definitions • Set A is a subset of set B, denoted A B, when x ( x A x B ). • Set A equals set B when they have the same elements: A = B when x ( x A x B ). • We can show A = B via 2 implications: A B B A x ( ( x A x B ) ( x B x A ) ). Copyright © Peter Cappello 2011 6

 • • • The empty set, denoted , is the set with no

• • • The empty set, denoted , is the set with no elements. Let A be an arbitrary set. True, false, or maybe? 1. 2. 3. 4. • A. A. A A. If A B then A is a proper subset of B, denoted A B. Copyright © Peter Cappello 2011 7

Venn Diagrams • Venn diagram of A B. U B A Copyright © Peter

Venn Diagrams • Venn diagram of A B. U B A Copyright © Peter Cappello 2011 8

Cardinality If S is a finite set with n elements, then its cardinality is

Cardinality If S is a finite set with n elements, then its cardinality is n, denoted |S|. Copyright © Peter Cappello 2011 9

The Power Set The power set of set S, denoted P(S), is { T

The Power Set The power set of set S, denoted P(S), is { T | T S }. • What is P( { 0, 1 } )? • What is P( P( ) )? • Let P 1( S ) = P( S ), Pn( S ) = P ( Pn-1( S ) ), for n > 1 • | Pn ( ) | = ? Copyright © Peter Cappello 2016 10

 • P 1( ) = { } • P 2( ) = {

• P 1( ) = { } • P 2( ) = { , { } } • P 3( ) = { , { }, {{ }}, { } } } • | P 1 ( ) | = 2 0 • | Pn ( ) | = 2| Pn-1 ( ) | • Express | P 5 ( ) | using only digits 2 & 0. Copyright © Peter Cappello 2011 13

 • 2 n is the number of vertices in a ndimensional cube. •

• 2 n is the number of vertices in a ndimensional cube. • Are there any connections between: – an n-dimensional cube – the power set of a set with n elements? Copyright © Peter Cappello 2011 14

Cartesian Products • The Cartesian product of sets A and B, denoted A x

Cartesian Products • The Cartesian product of sets A and B, denoted A x B, is A x B = { ( a, b ) | a A b B }. • Let S = { small, medium, large } and C = { pink, lavender }. – Enumerate the ordered pairs in S x C. – Enumerate the ordered pairs in C x S. – Enumerate the ordered pairs in x S. – |Sx. C|=? Copyright © Peter Cappello 2011 15

Cartesian Products • Generalizing Cartesian product to n sets: A 1 x A 2

Cartesian Products • Generalizing Cartesian product to n sets: A 1 x A 2 x … x An = { ( a 1, a 2, …, an ) | a 1 A 1, a 2 A 2, …, an An }. • Describe | A 1 x A 2 x … x An | in terms of the cardinalities of the component sets. • Using sets S and C as previously described, describe ( S x C ) x ( C x S ). • |(Sx. C)x(Cx. S)|=? Copyright © Peter Cappello 2011 16

Using Set Notation with Quantifiers • A shorthand for x ( x R x

Using Set Notation with Quantifiers • A shorthand for x ( x R x 2 ≥ 0 ) is x R ( x 2 ≥ 0 ) • A shorthand for x ( x Z x 2 = 1 ) is x Z ( x 2 = 1 ) • The statements above are either true or false. • What if you want the set of elements that make a proposition function true? Copyright © Peter Cappello 2011 17

Truth Sets of Proposition Functions • Let P be a proposition function and D

Truth Sets of Proposition Functions • Let P be a proposition function and D a domain. • The truth set of P with respect to D is { x D | P( x ) }. • Enumerate the truth set { x N | ( x < 20 ) ( x is prime ) }. Copyright © Peter Cappello 2016 18