Learning question: to find whether a function is injective

35 Views Asked by At

Let $F: z \to z$ such that:

$f(n)= \lfloor(1-6n)/3\rfloor$

To find injectivity i did:

suppose $f(n_1) = f(n_2)$

therefore $\lfloor(1-6n_1)/3\rfloor$ = $\lfloor(1-6n_2)/3\rfloor$

therefore $\lfloor(-6n_1)/3\rfloor$ = $\lfloor(-6n_2)/3\rfloor$

therefore $\lfloor(n_1)/3\rfloor$ = $\lfloor(n_2)/3\rfloor$

therefore n1 = n2 and therefore it is injective.

however the answer from my tutor was this:

$\lfloor(1-6n)/3\rfloor$ = $\lfloor-2n + (1/3)\rfloor = -2n$ since n and 2n are integers

similary, f(m) = -2m

so if f(n) = f(m), we have -2n = -2m, and so n=m and therefore f is injective.

my questions are:

  1. Is my answer correct?

  2. why did the tutorcome to $\lfloor -2n + (1/3)\rfloor = -2n$ (i ( I dont understand how that equation = -2n)

1

There are 1 best solutions below

0
On BEST ANSWER

The argument you use is not correct though the equalities you've written happen to be true. Consider your argument that $\lfloor n_1/3 \rfloor = \lfloor n_2/3 \rfloor$ implies $n_1 = n_2$. This need not be true in general. For example $\lfloor 1/3 \rfloor$ and $\lfloor 2/3 \rfloor$ are both equal to 0 and hence are equal to each other, but $1 \ne 2$.

To solve this problem, start with the given equality and simplify the expression inside the floor function so that it is of the form an integer plus a constant, and you can then take the integer out of the floor function: $(1-6n)/3 = (1/3) - (6n/3) = (1/3) - 2n$. The floor of $(1/3)+(-2n)$ equals $-2n$ plus the floor of $(1/3)$.