Sets and Functions, Exercises of Pre-Calculus

The set builder notation describes all elements as a subset of a set having a certain property. Q = { p/q ∈ R | p ∈ Z, q ∈ Z, and q ≠ 0 }.

Typology: Exercises

2022/2023

Uploaded on 02/28/2023

percyval
percyval 🇺🇸

4

(13)

227 documents

1 / 45

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSCE 222
Discrete Structures for Computing
Sets and Functions
Dr. Hyunyoung Lee
Based on slides by Andreas Klappenecker
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d

Partial preview of the text

Download Sets and Functions and more Exercises Pre-Calculus in PDF only on Docsity!

CSCE 222

Discrete Structures for Computing

Sets and Functions

Dr. Hyunyoung Lee Based on slides by Andreas Klappenecker

Sets

Sets are the most fundamental discrete structure on

which all other discrete structures are built.

We use naive set theory, rather than axiomatic set theory, since this approach is more intuitive. The drawback is that one can construct paradoxes using the naive set theory approach unless one is careful. The set theoretic complications have little bearing on the subsequent material, though, since we are mostly concerned with finite and countable sets.

Much Ado about Nothing

We denote the empty set {} by ∅. A set can be an element of another set. {∅} is the set containing one element, namely ∅. Note that ∅ and {∅} are different sets, since they contain different elements (the first one none, and the second one contains the element ∅). The set {∅,{∅}} contains two elements.

Common Sets

N = {0,1,2,3,4,...} natural numbers (according to our book) [Note that in 50% of the literature N contains 0 and in the other 50% it does not. This will not change, since each view has its merits.] Z = {..., -2,-1,0,1,2,...} set of integers R , set of real numbers C , set of complex numbers

Equality of Sets

Two sets A and B are called equal if and only if they have the same elements. A = B if and only ifx ( xA xB ) [To prove A=B, it is sufficient to show that both ∀ x ( xA xB ) and ∀ x ( xB → xA ) hold. Why? ]

Subset

A set A is a subset of B, written AB, if and only if every element of A is an element of B. Thus, AB if and only ifx ( xA → xB )

Cardinality of a Set

Let S be a set with a finite number of elements. We say that the set has cardinality n if and only if S contains n elements. We write |S| to denote the cardinality of the set. For example, || = 0_._

Power Sets

Given a set S, the power set P ( S ) of S is the set of all subsets of S. Example: P ( {1} ) = { ∅ , {1} } P ( {1,2} ) = { ∅ , {1}, {2}, {1,2} } P (∅) = { ∅ } since every set contains the empty set as a subset, even the empty set. P ({∅}) = {∅, {∅}}.

Cartesian Products

Let A and B be sets. The Cartesian product of A and B, denote A x B, is the set of all pairs ( a,b ) with aA and bB. A x B = { ( a,b ) | aAbB }

Quiz

Let A= {1,2,3}. What elements does the set A x ∅ contain?

Answer: None

Union and Intersection

Let A and B be sets. The union of A and B, denoted AB, is the set that contains those elements that are in A or in B, or in both_._ The intersection of A and B, denoted A ∩ B, is the set that contains those elements that are in both A and B.

Set Difference Let A and B be sets_._ The difference between A and B, denoted A-B or A\B, is the set A-B = { xA | xB }.

Set Identities

Let U be the universal set. Identity laws: A ∩ U = A A ∪ ∅ = A Domination laws: AU = U A ∩= ∅ Idempotent laws: AA = A A ∩ A = A Also: Commutative Laws Associative Laws Distributive Laws

De Morgan Laws

A \ B = A [ B P roof : A \ B = {x | x 62 A \ B} by definition of complement = {x | ¬(x 2 A \ B)} = {x | ¬(x 2 A ^ x 2 B)} by definition of intersection = {x | ¬(x 2 A) _ ¬(x 2 B)} de Morgan’s law from logic = {x | (x 62 A) _ (x 62 B)} by definition of 62 = {x | x 2 A _ x 2 B} by definition of complement = {x | x 2 A [ B} by definition of union = A [ B