w2 - func&range Flashcards

(14 cards)

1
Q

Injective

A

for any x1, x2 ∈A
s.t. x1≠ x2 : f(x1) = f(x2)

One to one (between domain and image)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Surjective

A

given f:A→B
for any y ∈B
there is x ∈A : y= f(x)

image=co-domain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Bijective

A

Bijective functions are both injective and surjective
* Also called permutation
* An inverse exists

If finite domain, and codomain is the same size = injection ⇒ surjection ⇒ bijection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what type of func can inverse be

A

Inverse functions exists if and only if it’s a bijection (one-to-one and onto)

Let D be the domain and C be the codomain:
f:D→C
Then the inverse is:
f^(−1):C→D

If f is a ordered pair, just reverse the pair:
{ (y,x):(x,y) belongs to f }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Let f :D→C
and |D|=m and |C|=n
How many possible functions are there?

A

General case
|C|^|D| =n^m functions

Injective (one-to-one)
n!/(n−m)!=|C|! / (|C|-|D|)!

Bijective
n!=|C|!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Reflexivity

Properties of Binary relations

A

R is reflective if R(a,a) for all a∈A

eg ≤ and ≥ (e.g., 3≤3, 5≥5)

NOT eg [< and > (e.g., 2<2 is false)]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Symmetry

Properties of Binary relations

A

R is symmetric if for any x,y∈A, then R(x,y)⇒R(y,x)

=(e.g., if x=y then y=x)

NOT eg [<, ≤, >, ≥, ⊆, ⊂, ⊃, ⊇ (e.g., 3<4 does not emply 4<3)]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Transitivity

A

If for all x,y,z∈A, then R(x,y) and R(y,z)⇒R(x,z)

= (If x=y and y=z, then x=z)
≤, ≥. (If a≤b and b≤c, then a≤c)

NOT EG OF [≠ (e.g., 1≠2 and 2≠1, but 1=1, violating transitivity)]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Transitive closure

conditions for TC to be met

A

Transitive closure can occur if condition 1 is met:

1. if x R y then x R^+ y
* MEANING: every direct relationship in R is automatically included in R^+
* e.g., If a→b is in R, then a→b is also in R^+

AND, either (2) or (3) is also met .

2. if x R^+ y and y R z then x R^+ z
* MEANING If you have a path from x to y in R^+ and a direct step from y to z in R, add a shortcut x→z to R+
* Using existing paths + new paths
* e.g., Suppose a→b is in R^+, and b→c is in R.
Then a→c is added to R+

3. if x R y and y R+ z then x R+ z
* MEANING: If you have a direct step from x→y in R and a path from y → z in R^+, add a shortcut x→z to R+
(Using new paths + existing paths)
* e.g., Suppose a→b is in R, and b→c is in R+. Then a→c is added to R+

~~~
The TC contains all pairs in R (by 1), so
* R^((1) )=R: Direct pairs (e.g., x→y)
* R^((2) ): paris connected by two steps (e.g., x→y→z)
R^((3) ): paris connected by three steps```

In graph theory, it tells us if A is connected to C (that is, if A→B→C, then A→C)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Equivalence relation

A

Equivalence when it is: Reflexive, symmetric and transitive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Equivalence classes

A

Let R be an equivalence relation on set A
i.e., R⊆A×A s.t. R is reflexive, symmetric, transitive

The equivalence class of A under R is a subset of X⊆A in which
1. Whenever x,y ∈X we have x R y
* That is, all members of X are equaivalent to each other (all elements in the equivalence class are related to each other)
* Reflexivity: every element is related to itself (x R x)
* Symmetry: If x R y then y R x
* Transitivity: if x R y and y R z then x R z

2. There are no x∈X, z∉X s.t. x R z
* i.e., all members of X are equialent to each other and no member of X is equivalent to anything in A \X
Or in simpler terms: No element in the equivalence class is related to any element outside of it

grouping when they are same

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Counting n-ary relations on finite sets

what is |P(A×B)|

A

Counting A×B
Remembering that
binary relation∈A×B

We can then say
number of possible binary relation = number of subsets of A×B

Remember P(A) gives all the possible subsets of A
So P(A×B) gives all the possible subsets of A×B

Hence, P(A×B)=2^|A×B| =2^(|A|∗|B| )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Compostion of relation

What is R o S

A

S∘R= {(x,z): ∃y s.t. xRy and ySz}

look from right to left

Informally:
If R = (a,b) and S = (c,d)
Copy c, then copy b such that a=d. Repeat for each element of a and d
We can see it like S(c,d)R(b,a) == (c,a)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is position and iterated compsition

Let f:A→B and g:B→C

A

g◦f:A→C
g◦f(x)=g(f(x))

iterated composition:
if f :A→A
f∘f :A→A is defined for all x∈A by f∘f=f(f(x))

We can write f^((n) ) for n copies of f :A→A
(only if domain=CoDomain)
f^((n) )=f∘f∘f∘…∘f
Where there are n copies of f

How well did you know this?
1
Not at all
2
3
4
5
Perfectly