{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 31 - 2 Let A = cfw_1 2 3 and B = cfw_a b Let f A B be dened...

This preview shows page 1. Sign up to view the full content.

2. Let A = { 1 , 2 , 3 } and B = { a, b } . Let f A × B be defined by f = { (1 , a ) , (1 , b ) , (2 , b ) , (3 , a ) } . This f is not a well-defined function, since one element of A is related to two elements in B as is evident from the diagram: A B 1 2 3 a b 3. The following are examples of functions with infinite domains and co- domains: (a) the function f : N × N N defined by f ( x, y ) = x + y ; (b) the function f : N N defined by f ( x ) = x 2 ; (c) the function f : R R defined by f ( x ) = x + 3 . The binary relation R on the reals defined by x R y if and only if x = y 2 is not a function, since for example 4 relates to both 2 and - 2 . P ROPOSITION 4.3 (F INITE C ARDINALITY ) Let A B denote the set of all functions from A to B , where A and B are finite sets. If | A | = m and | B | = n , then | A B | = n m . Sketch proof For each element of A , there are m independent ways of map- ping it to B . You do not need to remember this proof. 4.2 Partial Functions Recall that it is easy to write Haskell functions which return run-time errors
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online