RU beehive logo ITEC dept promo banner
ITEC 380
2008fall
ibarland

most recent semester

lect06a
functions

Functions:
   f : A -> B
   domain, codomain.
   Example: 
     string-length
       [Note: can't include 'null' as a String and still have it be a function]
     favorite-color : Person -> Color
       [Note: we assume everybody has *some* fave color, and it doesn't change over time.]
     Integer.toString : int -> String
     Puppy.toString : Puppy -> String
       (the default, vs a version we write.)

    nextInt : java.util.Random -> int
      No: Random rng = new Random();
          rng.nextInt() == rng.nextInt()  // probably false.

     sqrt: is this really a function?  
        New set notation: intervals.
       sqrt: [0,+Infinity) -> [0,+Infinity)

     max: RxR -> R

     or consider generalizing: max set-of-R -> R
        new notation: P(S).

     Def'n of function;  the *graph* of a function.

   N.B. Constant functions.
   N.B. The identity function.
   functions on numbers: increasing; non-decreasing.
   Two particular functions: ceiling, floor.

   def'n: 1-1, onto.
     (For 1-1: give both def'n and phrase as contrapositive)


   composing functions
   Inverse.
   Function spaces.




   ---- 
   Sums 
   ----- 
   Cardinality: 
      N vs Sigma*;  N vs Primes;  N vs Odd; 
      N vs Java;
      N vs NxN
      N vs R


most recent semester


©2008, Ian Barland, Radford University
Last modified 2008.Oct.10 (Fri)
Please mail any suggestions
(incl. typos, broken links)
to iba�rlandrad�ford.edu
Powered by PLT Scheme