145 views
1 1 vote

Define $f(n)=\left\lfloor\frac{3n+1}{2}\right\rfloor$ for all $n\in\mathbb{Z}$. Thus $f:\mathbb{Z}\to\mathbb{Z}$. Which of the following is correct?

  1. $f$ is not a function from $\mathbb{Z}$ to $\mathbb{Z}$ because $\frac{3n+1}{2}$ is not always an integer.
     
  2. $f$ is a function and is one-to-one but not onto.
     
  3. $f$ is a function and is onto but not one-to-one.
     
  4. $f$ is a function and is both one-to-one and onto.

2 Answers

0 0 votes

First, we'll check whether $f$ a valid function from $\mathbb{Z}$ to $\mathbb{Z}$ or not.

For any integer $n$, the value $3n+1$ is an integer. Therefore, $\frac{3n+1}{2}$ is a real number. The floor function $\lfloor x \rfloor$ maps any real number $x$ to the greatest integer less than or equal to $x$. This means the output will always be an integer. Thus, $f$ is a well-defined function from $\mathbb{Z}$ to $\mathbb{Z}$. This eliminates Option A.


Now, we'll check if $f$ one-to-one (injective) or not.

Let's see how the function grows by calculating $f(n+1) - f(n)$:

$$f(n+1) = \left\lfloor \frac{3(n+1)+1}{2} \right\rfloor = \left\lfloor \frac{3n+4}{2} \right\rfloor = \left\lfloor \frac{3n+1}{2} + 1.5 \right\rfloor$$

Depending on whether $n$ is even or odd, $\frac{3n+1}{2}$ will either be an integer or end in $.5$.

  • If $\frac{3n+1}{2}$ ends in $.5$, adding $1.5$ increases the floor value by exactly $2$.

  • If $\frac{3n+1}{2}$ is an integer, adding $1.5$ increases the floor value by exactly $1$.

In all cases, $f(n+1) > f(n)$. Because the function is strictly increasing, it is impossible for two different inputs to produce the same output. Therefore, $f$ is one-to-one.

 

Now, we'll check if $f$ onto (surjective) or not.

Let's test a few consecutive integer inputs to see the sequence of outputs:

  • $f(0) = \lfloor 1/2 \rfloor = 0$

  • $f(1) = \lfloor 4/2 \rfloor = 2$

  • $f(2) = \lfloor 7/2 \rfloor = 3$

  • $f(3) = \lfloor 10/2 \rfloor = 5$

Notice that the output skips the integer $1$. Since we already established that the function is strictly increasing, it will never "go back" to hit $1$. Because there is an integer in the codomain ($y=1$) that is not mapped to by any integer $n$ in the domain, the function is not onto.


Conclusion : The function $f$ is one-to-one but not onto. The correct option is B.

0 0 votes

Correct Option: B

1. Is it a valid function?

Yes. The floor function $\lfloor x \rfloor$ by definition outputs the greatest integer less than or equal to $x$. Since $\frac{3n+1}{2}$ is a real number for any integer $n$, its floor value will always be a unique integer. Thus, $f: \mathbb{Z} \to \mathbb{Z}$ is a well-defined function

2.  One-to-One (Injective)

Proof  for injectivity:

If $n_2 \ge n_1 + 1$, then:

$$3n_2 + 1 \ge 3n_1 + 4$$

$$\frac{3n_2 + 1}{2} \ge \frac{3n_1 + 1}{2} + 1.5$$

Taking the floor of both sides guarantees that $\lfloor \frac{3n_2 + 1}{2} \rfloor > \lfloor \frac{3n_1 + 1}{2} \rfloor$. Since a strictly increasing function on integers never repeats outputs, $f$ is one-to-one.

3. Onto (Surjective)

 we generated: $0, 2, 3, 5\dots$

The integer $1$ is completely skipped.

Let's check if any $n$ can produce $1$:

$$\left\lfloor \frac{3n+1}{2} \right\rfloor = 1 \implies 1 \le \frac{3n+1}{2} < 2$$

$$2 \le 3n + 1 < 4$$

$$1 \le 3n < 3$$

$$\frac{1}{3} \le n < 1$$

Since there is no integer $n$ in the interval $[\frac{1}{3}, 1)$, the value $1$ has no pre-image. Therefore, $f$ is not onto.

Answer:
Position:
Show:

Related questions

1 1 vote
2 2 answers
150
150 views
GO Classes asked May 8
150 views
Let $g:A\to B$ and $f:B\to C$, where $A$, $B$, and $C$ are finite sets with $|A|=|C|=6$ and $|B|=8$. Suppose $f\circ g:A\to C$ is bijective. Which of the following statem...
1 1 vote
1 1 answer
107
107 views
GO Classes asked May 8
107 views
Let $X,Y,Z$ be finite sets with $|X|=|Z|=5$ and $|Y|=7$. Let $f:X\to Y$ and $g:Y\to Z$, and define $h=g\circ f:X\to Z$. Suppose $h$ is both one-to-one and onto. Which of ...
1 1 vote
2 2 answers
144
144 views
GO Classes asked May 8
144 views
The functions mapping $\mathbb{R}$ into $\mathbb{R}$ are defined as $f(x)=x^2-3x+1$, $g(x)=2x-1$, and $h(x)=\frac{(x+1)^2}{x^2+1}$. Find the value of the composite functi...
1 1 vote
1 1 answer
104
104 views
GO Classes asked May 8
104 views
Let $X$ be a finite set with $|X|\ge 2$, and let $f:X\to X$ be a function such that $f(f(x))=f(x)$ for every $x\in X$. If $f$ is not the identity function, which of the f...