Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CSC 300: Assignment 5 - Function Analysis - Prof. Bikramjit Banerjee, Assignments of Computer Science

Assignment 5 for csc 300, due on feb-20-08. It includes questions about determining if functions are one-to-one and onto, whether a function is a function from integers to real numbers, finding the composition of functions, and writing an algorithm to find the sum of integers in a list. An extra credit question discusses the invertibility of a function.

Typology: Assignments

Pre 2010

Uploaded on 08/19/2009

koofers-user-bx0
koofers-user-bx0 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSC 300: Assignment 5
Due: Feb-20-08, in class
1. (4X3 pts) Determine whether each of these functions from {a,b,c,d} to itself is
a) one to one
b) onto
f(a)=b, f(b)=a, f(c)=c, f(d)=d
f(a)=b, f(b)=b, f(c)=d, f(d)=c
f(a)=d, f(b)=b, f(c)=c, f(d)=d
2. (2X3 pts) Determine whether f is a function from Z (set of integers) to R (set of real numbers)
a)
fn=±n
b)
fn=
n21
c)
fn=1/n24
3. (3 pts) If
fx=2x3
and
gy=3−5/y2
then what is the composition of g and f,
g(f(x)) ?
4. (5 pts) Write the pseudo-code of an algorithm that returns the sum of all integers in a list of
integers. You may use the Pascal-like pseudo-code notation in the textbook, or the C-like
notation I used in class, or any reasonable notation of your own, as long as you use its
components consistently.
5. (4 pts; Extra credits) Argue why the function
fx=ex
from the set R to R is not invertible
(i.e., its inverse does not exist), but it turns invertible if the co-domain is restricted to the set of
positive real numbers, R+

Partial preview of the text

Download CSC 300: Assignment 5 - Function Analysis - Prof. Bikramjit Banerjee and more Assignments Computer Science in PDF only on Docsity!

CSC 300: Assignment 5

Due: Feb-20-08, in class

  1. ( 4X3 pts ) Determine whether each of these functions from {a,b,c,d} to itself is a) one to one b) onto - f(a)=b, f(b)=a, f(c)=c, f(d)=d - f(a)=b, f(b)=b, f(c)=d, f(d)=c - f(a)=d, f(b)=b, f(c)=c, f(d)=d
  2. ( 2X3 pts ) Determine whether f is a function from Z (set of integers) to R (set of real numbers) a) fn =± n

b) f  n = n^2  1 

c) f^  n =^1 / n

  1. ( 3 pts ) If f^ ^ x =2x−^3 and gy = 3 − 5 / y^2  then what is the composition of g and f , g(f(x))?
  2. ( 5 pts ) Write the pseudo-code of an algorithm that returns the sum of all integers in a list of integers. You may use the Pascal-like pseudo-code notation in the textbook, or the C-like notation I used in class, or any reasonable notation of your own, as long as you use its components consistently.
  3. ( 4 pts; Extra credits ) Argue why the function fx = ex^ from the set R to R is not invertible (i.e., its inverse does not exist), but it turns invertible if the co-domain is restricted to the set of positive real numbers, R +