Gotta run out and get some coffee, so here are some quickie answers. "Domain" is the "goes into" of a function -- the values on which the function operates. "Range" is the "comes out of" for a function -- the values which the function yields.
crimsonheadGCN said:
4. Find the domain and range of these functions.
a. the function that assigns to each nonnegative its last digit.
b. the function that assigns the next largest integer to a positive integer.
c. the function that assigns to a bit string the number of one bits in the string.
d. the function that assigns to a bit string the number of bits in the string.
a. The function only works on certain kinds of numbers: those which are non-negative, and those which have a last digit. So, by definition, we cannot include irrational numbers. Where this gets hard is how to consider rational numbers. Some rational numbers -- say, 8/5 -- can be written as non-repeating decimals (1.6). Other rational numbers -- say, 10/9 -- can only be written as infinitely repeating decimals, which by definition do NOT have a last digit. Also, fractions don't have a "last digit" unless you convert them into a decimal. So, I would say that the domain is non-negative integers. The range would be the set of all possible last digits: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
b. There is no detail about what algorithm is used to "assign" the positive integer. But, it's clear that the doman is all integers, and the range would be positive integers.
c, d. What the heck is a "bit string" in discrete math? (Is this a pure math class, or math applied to computer science?) If you mean the binary representation of some arbitrary number, then I don't know how you'd write the domain. All bit strings are comprised only of 0s and 1s, so it might be tempting to say that the domain is {0, 1}. However, there is a difference between, say, 1011 and 1100, since they represent different values. The range for both functions would seem to be all positive integers. All bit strings must have at least one 1 in them, and there cannot be a 0-bit string by definition -- what would you output? The upper limit on the range would depend on the length restriction for the bit string -- clearly, for an n-bit string limit, the output value of each function can be no larger than n.
N is the set of all natural numbers
Z is the set of all integers
Q is the set of all rational numbers
R is the set of all real numbers
24. Let f (x) = 2x. What is
a. f (Z)?
b. f (N)?
c. f (R)?
a. The set of all even integers (both positive and negative): {..., -4, -2, 0, 2, 4, ...}
b. The set of all even natural numbers: {2, 4, 6, ...}
c. R
Hope these are right...I'm not quite awake yet.