Sunteți pe pagina 1din 7

CS 205 Quiz #5A Oct 18, 2012

NAME: __________________________________________________________________________

RUID:___________________________________________________________________________

Electronic Devices are not permitted during the quiz. These include but are not restricted to calculators, computers and cell phones. No communication between students or anyone outside of class is permitted during the quiz. Textbooks, notes and any other written materials are not permitted during the quiz.

DO NOT OPEN UNTIL INSTRUCTED TO DO SO

1. Do the following relations satisfy the definitions of the listed terms? For each blank, write True if the relation satisfies the definition, False if it does not satisfy the definition or Insufficient if there is not enough information to conclude if the relation satisfies the definition.

a) f(x) = 2x - 1, where f : R R

___________________ ___________________ ___________________

Function Surjective Function Invertible Function

___________________ ___________________ ___________________

Injective Function Bijective Function Partial Function (not a Total Function)

b) f(x) = 2x - 1, where f : Z Z

___________________ ___________________ ___________________

Function Surjective Function Invertible Function

___________________ ___________________ ___________________

Injective Function Bijective Function Partial Function (not a Total Function)

c) f(x) = x2, where f : Z Z

___________________ ___________________ ___________________

Function Surjective Function Invertible Function

___________________ ___________________ ___________________

Injective Function Bijective Function Partial Function (not a Total Function)

d) f(x) = 2x, where f : Z R

___________________ ___________________ ___________________

Function Surjective Function Invertible Function

___________________ ___________________ ___________________

Injective Function Bijective Function Partial Function (not a Total Function)

1. cont)

e) f(x) = (x + 1) / (x 2), where f : Z R

___________________ ___________________ ___________________

Function Surjective Function Invertible Function

___________________ ___________________ ___________________

Injective Function Bijective Function Partial Function (not a Total Function)

f)

f(m, n) = 2m - n, where f : Z Z Z

___________________ ___________________ ___________________

Function Surjective Function Invertible Function

___________________ ___________________ ___________________

Injective Function Bijective Function Partial Function (not a Total Function)

g) f(m, n) = m n, where f : R R R

___________________ ___________________ ___________________

Function Surjective Function Invertible Function

___________________ ___________________ ___________________

Injective Function Bijective Function Partial Function (not a Total Function)

h) f(m, n) = 5, where f : R R R

___________________ ___________________ ___________________

Function Surjective Function Invertible Function

___________________ ___________________ ___________________

Injective Function Bijective Function Partial Function (not a Total Function)

2. For each of the following, you are given some amount of information regarding a relation. The task is to determine if the relation is invertible. In each blank write True if the corresponding relation is invertible, False if it is not invertible, or Insufficient if there is not enough information to determine whether or not it is invertible. __________________ a) A bijective function from the domain of all integers to the codomain of all integers. The function is also surjective.

__________________

b) A function from the domain of all real numbers to the codomain of the positive integers less than 100.

__________________

c) A partial function from the domain of all real numbers to the codomain of the positive integers less than 100.

__________________

d) A strictly decreasing function.

__________________

e) An injective function that is not surjective. The functions domain and codomain are both the real numbers.

__________________

f)

A relation g from A to B, where: a A, g(a) = b such that b B (a1, a2) A A, a1 a2 g(a1) g(a2)

__________________

g) A relation h from A to B, where A = { 2, 1, 3 } B = { 6, 1, -2 } h(x) = x2 - 3

__________________

h) A function where every unique element in the codomain has a unique preimage.

__________________

i)

A surjective function where both the domain and codomain are the positive integers.

__________________

j)

The relation, f, from the set of U.S. states to its alphabetical ordinal rank id. (i.e. f(Alabama) = 1, f(Alaska) = 2, , f(Wyoming) = 50). The codomain is the positive integers less than or equal to 50.

3. For each of the following sets of tuples, determine if there exists a functional dependency between the first and second elements. That is: i. If R = {(a1,b1), (a2,b2), ... }, does R = {(x, f(x)) | x {a1, a2, ...} } for some function f ?

We can also say there is an inverse functional dependency if there is a functional dependency between the first and second elements as well as an inverse for that same function. That is: ii. Using R and f from (i) above, does R = {(f-1(y), y) | y {b1, b2, ...} } ?

Answer True in blanks where the corresponding definition is met, otherwise answer False.

a) { (1,1), (2,2), (3,3), (4,4) }

________________

Functional Dependency

Inverse Functional _________________ Dependency

b) { (1,1), (2,1), (3,1), (4,1) } Inverse Functional _________________ Dependency

________________

Functional Dependency

c) { (1,1), (1,2), (1,3), (1,4) } Inverse Functional _________________ Dependency

________________

Functional Dependency

d) { (4,1), (2,2), (1,3), (3,4) } Inverse Functional _________________ Dependency

________________

Functional Dependency

4. Let f be a function from A to B. Let S be a subset of B. We define the inverse image as F-1(S) = { a A | f(a) S } Answer the following questions. Example: If f: R R and f(x) = x2, what is F-1({ y R | 0 < y < 1 }) ? Answer: { a R | -1 < a < 0 0 < a < 1 } a) If f: R R and f(x) = -x, what is F-1( { 0, 1, 2 } ) ?

b) If f: R R and f(x) = x2, what is F-1( { y R | y > 4 } ) ?

c) If f: R Z and f(x) = x, what is F-1( { 0, 1, 2 } ) ?

d) If f: R R and f(x) = x mod 5, what is F-1( { 2 } ) ?

e) If f: R R and f(x) = lg x, what is F-1( { y R | 1 < y < 10 } ) ? (lg is logarithm base 2)

5. Suppose we wish to define a function f: A B where A = { 1, 2, 3, 4, 5 } and B = { 1, 2, 3, 4, 5, 6 }. (Note: If calculations are too difficult, you do not have to simplify to a single number.)

____________________ a) How many total functions are possible?

____________________ b) How many injective functions are possible?

____________________ c) How many surjective functions are possible?

6. Suppose Y is the set of all functions from A to B, where |A| = m and |B| = n. How many total functions are possible from X to Y if |X| = p ?

S-ar putea să vă placă și