22.6k views
1 vote
Show that the following function is a bijection and give its inverse.

f : Z → N with f (n) = 2n if n ≥ 0 and f (n) = −2n − 1 if n < 0.

User Doctorram
by
7.6k points

1 Answer

3 votes

Let's show that the given function is a bijection and give its inverse. The function is defined as:f : Z → N with f (n) = 2n if n ≥ 0 and f (n) = −2n − 1 if n < 0. Let's consider the first condition where n is greater than or equal to 0, we have:f (n) = 2nOn the other hand, if n is less than 0, we have:f (n) = −2n − 1We need to show that the given function is one-to-one and onto to prove that it is a bijection.Function is one-to-one:Let a, b ∈ Z such that a ≠ b. Then we need to prove that f(a) ≠ f(b).Case 1: a ≥ 0 and b ≥ 0Then we have:f(a) = 2af(b) = 2bSince a ≠ b, we can say that 2a ≠ 2b. Therefore, f(a) ≠ f(b).Case 2: a < 0 and b < 0Then we have:f(a) = -2a-1f(b) = -2b-1Since a ≠ b, we can say that -2a-1 ≠ -2b-1. Therefore, f(a) ≠ f(b).Case 3: a ≥ 0 and b < 0Without loss of generality, let's assume that a > b.Then we have:f(a) = 2af(b) = -2b-1We know that 2a > 2b. Therefore, 2a ≠ -2b-1. Hence, f(a) ≠ f(b).Case 4: a < 0 and b ≥ 0Without loss of generality, let's assume that a < b.Then we have:f(a) = -2a-1f(b) = 2bWe know that -2a-1 < -2b-1. Therefore, -2a-1 ≠ 2b. Hence, f(a) ≠ f(b).Since the function is one-to-one, let's check if the function is onto.Function is onto:Let y ∈ N. We need to find an integer x such that f(x) = y.Case 1: y is even (y = 2k where k is a non-negative integer)Let x = k. Then we have:f(x) = f(k) = 2k = y.Case 2: y is odd (y = 2k+1 where k is a non-negative integer)Let x = -(k+1). Then we have:f(x) = f(-(k+1)) = -2(k+1) - 1 = -2k - 3 = 2k+1 = y.Therefore, we have shown that the given function is one-to-one and onto. Hence, the given function is a bijection.The inverse of the function f is defined as follows:Let y ∈ N. Then we need to find an integer x such that f(x) = y.Case 1: y is even (y = 2k where k is a non-negative integer)Let x = k/2. Then we have:f(x) = f(k/2) = 2(k/2) = k = y.Case 2: y is odd (y = 2k+1 where k is a non-negative integer)Let x = -(k+1)/2. Then we have:f(x) = f(-(k+1)/2) = -2(-(k+1)/2) - 1 = k = y.Therefore, the inverse of the function f is given by:f^-1(y) = k/2 if y is even.f^-1(y) = -(k+1)/2 if y is odd.

User DDub
by
7.8k points