Find the domain and range of these functions. a) the function that assigns to ea
ID: 3149029 • Letter: F
Question
Find the domain and range of these functions.
a) the function that assigns to each pair of positive integers the maximum of these two integers
b) the function that assigns to each positive integer the number of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8,
9 that do not appear as decimal digits of the integer
c) the function that assigns to a bit string the number of times the block 11 appears
d) the function that assigns to a bit string the numerical position of the first 1 in the string and that
assigns the value 0 to a bit string consisting of all 0s
Explanation / Answer
a) :The domain of this function is the set of pairs of positive integers, that isZ+×Z+. The codomainof this function is the set of possible outputs, isZ+. This function isnot one-to-one: a counterexample isthe pair of distinct inputs (1,2) and (2,1) which are both mapped to 2. Alternatively, we could consider thecounterexample (1,3), (2,3), both of which are mapped to 3. This function isnot onto: the codomain isthe set of nonnegative integers (which includes 0) but the values of each of the components in the pairs arepositive. Thus, 0 is not an image of any domain element and is a counterexample to surjectivity.
B) The domain of this function is the set of positive integers,Z+. This function isnot one-to-one: a counterexample is the pair of distinct inputs 123456789 and 123456780 which are both mapped to1 (because each omits exactly one digit). This function isnot ontowhen its codomain isN: there is noelement of the domain whose image is 11 because it’s not possible to omit more digits than exist (there areonly 10 distinct digits ).
C) The domain is all bit strings. The range is the nonnegative integers. You can get 0 from the string 101010101010(or heck, from the string1, or the string0), and you can get a positiveintegernfrom the string110110110110...110, where you repeat 110n-times.
d)Thedomain is all bit strings. The range is the nonnegative integers. You can get 0 from the string0, and you can get n from the string 0....01, where there are n-1 zeros preceding the 1.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.