Determining whether floor((n+1)/2) is 1-to-1 or onto

  • Thread starter Thread starter leo255
  • Start date Start date
AI Thread Summary
The function floor((n+1)/2) is not one-to-one since both f(1) and f(2) yield the same output of 1. However, it is onto, as for every integer b, there exists an integer a (specifically a = 2b - 1) such that f(a) equals b. The calculations confirm that f(2b-1) results in b, demonstrating the onto property. The discussion emphasizes the need to consider the floor function carefully when determining these properties. Overall, the function is not one-to-one but is onto from Z to Z.
leo255
Messages
57
Reaction score
2

Homework Statement


[/B]
floor((n+1)/2)

Find whether this function is 1-to-1 and/or onto from Z to Z.

Homework Equations

The Attempt at a Solution



This is not one-to-one because f(1) = f(2) = 1.

Regarding onto, we need to show that f(a) = b

floor((n+1)/2) = b
2b = n + 1
n = 2b - 1

f(2b-1) = floor((2b-1) + 1)/2) =

floor(2b/2) = floor(b) = b.

I'm not sure how to take the floor function into account for my onto calculations.


 
Physics news on Phys.org
Let f be the function defined by f(n)=floor((n+1)/2) (n∈ℤ).

I may be confused, but haven't you actually proved that for b∈ℤ, f(2b-1)=b?
That proves that f in onto.
 
leo255 said:

Homework Statement


[/B]
floor((n+1)/2)

Find whether this function is 1-to-1 and/or onto from Z to Z.

Homework Equations

The Attempt at a Solution



This is not one-to-one because f(1) = f(2) = 1.

Regarding onto, we need to show that f(a) = b
In more detail, you need to show that for each ##b \in Z##, there exists an ##a \in Z## such that f(a) = b.
leo255 said:
floor((n+1)/2) = b
2b = n + 1
n = 2b - 1

f(2b-1) = floor((2b-1) + 1)/2) =

floor(2b/2) = floor(b) = b.

I'm not sure how to take the floor function into account for my onto calculations.
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Essentially I just have this problem that I'm stuck on, on a sheet about complex numbers: Show that, for ##|r|<1,## $$1+r\cos(x)+r^2\cos(2x)+r^3\cos(3x)...=\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}$$ My first thought was to express it as a geometric series, where the real part of the sum of the series would be the series you see above: $$1+re^{ix}+r^2e^{2ix}+r^3e^{3ix}...$$ The sum of this series is just: $$\frac{(re^{ix})^n-1}{re^{ix} - 1}$$ I'm having some trouble trying to figure out what to...
Back
Top