2 Functions
2 Functions
2. Determine whether is a function from the set of all bit strings to the set of integers if
( a ) ( ) is the position of a bit in
( b ) ( ) is the number of a bits in
( c ) ( ) is the smallest integer such that the th bit of is and ( ) when is the
empty string, the string with no bits.
3. Find the domain and range of each of the following functions that assigns:
( a ) to each nonnegative integer its last digit
( b ) the next largest integer to a positive integer
( c ) to a bit string the number of one bits in the string
( d ) to each bit string the number of ones minus the number of zeros
( e ) to each bit string twice the number of zeros in that string
( f ) to each positive integer the largest perfect square not exceeding this integer
( g ) the number of bits left over when a bit string is split into bytes
4. Find the domain and range of each of the following functions that assigns to:
( a ) each pair of positive integers the first integer of the pair
( b ) each positive integer its largest decimal digit
( c ) a bit string the longest string of ones in the string
( d ) each positive integer the largest integer not exceeding the square root of the integer
( e ) each pair of positive integers the maximum of these two integers
( f ) each positive integer the number of the digits that do not appear as decimal digits of
the integer
( g ) a bit string the number of times the block appears
( h ) a bit string the numerical position of the first in the string and the value to a bit
string consisting of all s.
( ) ⌈⌊ ⌋ ⌈ ⌉ ⌉ ( )⌊ ⌈ ⌉⌋ ( )⌊ ⌊ ⌋⌋
10. Show that the function * + defined by ( ) | | is not invertible. Modify the
domain or codomain of so that it becomes invertible.
13. If and are onto, does it follow that is onto? Justify your answer.
15. Show that the function ( ) from to is invertible, where and are
constants, with and find the inverse of
26. Suppose that is an invertible function from to and is an invertible function from
to Show that the inverse of the composition is given by ( )
27. Let be subset of a universal set The characteristic function of is the function from
to the set * + such that ( ) if belongs to and ( ) if does not belong
to Let and be sets. Show that for all
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ̅( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )