Lecture 1 Flashcards
What are functions?
A process that associates one set (input) with another set (output); forms a relationship between two sets
A rule that maps a unique element of the domain to ONLY ONE other unique element of the codomain.
What are sets?
A set is an unordered collection of distinct/unique ‘objects/entities/elements’
NOTE: Cannot have any repeating elemenets, unlike an array/list
What are the notations used for sets? What do they define?
x ∈ B if x is an element of B
x ∈/ B if x is not in B
A ⊆ B is every a ∈ A lies also in B,
A is a subset of B
A ∩ B is the set of all elements that lie in A AND in B;
we say A ∩ B is the intersection of A and B.
A ∪ B is the set of ALL elements that lie in A OR in B;
we say A ∪ B is the union of A and B.
A \ B is the set of all elements in A that are NOT in B
How do you define by attributes/properties?
If S is a set and, and P is a property of elements in S, then
{x ∈ S : P(x)}
is the set all elements of S which have the property P
e.g. {x ∈ Z : −1 <= x <= 1} = {−1, 0, 1}
What are intervals?
[a, b] = {x ∈ R : a <= x <= b}
[] = closed intervals, includes a and b
(a, b) = {x ∈ R : a < x < b}
() = open intervals, excludes a and b
Can mix interval signs
[a, b) = {x ∈ R : a <= x < b}
What is Pi notation?
A shorthand notation to write out products in a more compact form.
NOTE: Empty set results in empty product = 1 BY CONVENTION
(techinically undefined)
What is Sigma notation?
A way to write sums in a more compact form.
NOTE: Empty set results in empty sum = 0 BY CONVENTION (technically undefined)
If the function is a constant, x acts as a counter only rather than affecting the value.
What are images?
The image of f : X → Y is the set f (X) = {f (x) : x ∈ X}.
It is a subset of the codomain that can be reached by elements in the domain using the applied rule; the range of the function.
What is Barber’s paradox?
What are some important sets?
{} or ∅ is the empty set
N is the set of natural numbers
{0, 1, 2, . . .}
Z is the set of integers
{. . . , −2, −1, 0, 1, 2, . . .}
R is the set of real numbers (all numbers on a
’standard’ number line,
e.g. 5,√2, 2/3, −π, . . .
What is Russel’s paradox?
True or false? a ∈ {{a, b}, {c, d}, {a}}
False
no element a
only elements {a, b}, {c, d}, {a}
List all alements of following sets
1. {x ∈ Z : x ∈ {−1, 0, 1.5}}
- {x ∈ N : x is odd and x 6 5}
- {-1, 0}
- {1, 3, 5}
Answer this by creating a set with the elements, NEEDS {}!!!
Can sigma and pi notations have multiple ways to be written down?
Yes
What is the domain and codomain?
Domain = where inputs are housed
Codomain = where outputs are housed