FUNCTIONS Flashcards

1
Q

What is a function?

A

a special case of relation with a specific restriction on it.
where each element of A is related to exactly ONE element of b (assuming f ⊆ A X B)
! Every function is a relation, but not every relation is a function
! Everything in A maps to at most one element of B

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

What is the annotation for a function?

A

Arrow
function author =
author : BOOK –> AUTHOR
declares that author is a function from BOOK to AUTHOR

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

What is the inverse function?

A

if function age : PERSON -> N (natural number)
then age ^-1 is NOT a function

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

What is an injective function?

A

Assuming R ⊆ A X B, R is injective iff each element in B is related by R from at most ONE element from A.
- if f(a) = c and f (b) = c then a = b

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

What is an example of an injective function?

A

Each student can only have ONE student_ID number

on a graph, this means that two values from the A set cannot point to the same value in set B

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

What is surjective?

A

Assuming R ⊆ A X B, R is surjective iff each element in A involves EVERY element of B.
- if f: A > B is surjective then ran(f) = B (all of B)

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

What is an example of surjective function?

A

Every football league team relates to some players

on a graph, this means that all lines from A will connect to a value in B so that no value in B is left alone

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

What is a bijective function?

A

Assume f : A > B is bijective iff f is both injective and surjective

Each element of A maps to a different element of B, and every element of B is chosen.

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

What is an example of a bijective function?

A

every country has its own national flag

on a graph, this is shown as all values of A pointing to ONE value of B and all values of B being pointed to

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

What does bijection tell about the inverse?

A

if f : A > B is a bijection then f^-1 (inverse) : B > A is also a bijection

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

What does bijection tell about the number of elements ?

A

If f : A > B then A and B must have the same no. of elements as EVERY ELEMENT is directly mapped to another.

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

What is a total function?

A

A function where for all a in A, there exists a b in B such that (a,b) ∈ function.
Assumed that every element in A will map to some element of B

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

What is a partial function?

A

Not all elements of A have to relate to an element of B

in a mapping graph, there will be extra values in the A graph
and there will be dom(A) != A

Still a function

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

What will undefined values in a partial function return when called?

A

They will be undefined so will not return “undefined”.

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

How to fix undefined values in a partial function?

A

Lift the partial function to create a total function by using ⊥ (bottom) which all undefined elements will point to in B
this will create a new set of B⊥ which extends B with function f⊥.

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

Which values will map to elements ⊥(bottom)?

A

A \ dom(f) will go to ⊥
(so all undefined elements)

17
Q

What is a partial injective function?

A

A function where there remains undefined values for A that still point to only ONE value in B.

18
Q

What is a partial surjective?

A

A function where there remains undefined values for A that still point to ALL values in B.

19
Q

What is a partial bijective?

A

A function where there remains undefined values for A but still point only to one B and include all values for B.

20
Q

If f:A > B and g : B > C Are functions and f ; g : A > C is partial surjective what can we assume? what are the minimum restrictions?

A

f is a partial function (not all in A are used)
f is surjective (every element of b ∈ B there is element a ∈ A such that f(a) = b
g is surjective (every element of c ∈ C there is element b ∈ B where g(b) = c

21
Q

if f is a partial function and g is a total function, will f ; g be a partial function?

A

YES, as not all values in A will be used, some will be undefined.

22
Q

The inverse of a surjective function is a total function?

A

FALSE
not all B will point to a value in A