2. Let S = { :(a1a2a3a4∈ N and 0 ≤ ≤ 9 for each i = 1, 2, 3, 4}. In other words, S is the set of all 4-digit strings with each digit between 0 an 9.
(a) Show that the function f : S → S defined by f(a1a2a3a4) =a4a3a2a1 is a bijection.
(b) (Note that the function reverses the string. For example, f(9527) = 7259) Find f-1 . Specifically, what is f-1.(a1a2a3a4)?
(a) Let us show that the function "f : S \u2192 S" defined by "f(a_1a_2a_3a_4) =a_4a_3a_2a_1" is a bijection.
Let "f(a_1a_2a_3a_4) =f(b_1b_2b_3b_4)." Then "a_4a_3a_2a_1=b_4b_3b_2b_1," and hence "a_4=b_4, a_3=b_3,a_2=b_2,a_1=b_1." It follows that "a_1a_2a_3a_4=b_1b_2b_3b_4," and consequently, "f" is injective. For any "b_1b_2b_3b_4\\in S" we have that "f(b_4b_3b_2b_1)=b_1b_2b_3b_4," and hence "f" is surjective.
(b) Let us show that "f^{-1}=f," that is "f^{-1}(a_1a_2a_3a_4)=a_4a_3a_2a_1." Indeed,
"f\\circ f^{-1}(a_1a_2a_3a_4)=f(a_4a_3a_2a_1)=a_1a_2a_3a_4" and
"f^{-1}\\circ f(a_1a_2a_3a_4)=f^{-1}(a_4a_3a_2a_1)=a_1a_2a_3a_4."
Comments
Leave a comment