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

  • Thread starter Thread starter leo255
  • Start date Start date
Click For Summary
SUMMARY

The function defined by f(n) = floor((n+1)/2) is not one-to-one, as demonstrated by the fact that f(1) = f(2) = 1. However, it is onto, since for every integer b, there exists an integer a (specifically a = 2b - 1) such that f(a) = b. This confirms that the mapping from Z to Z is complete for the range of integers. The floor function's behavior is crucial in determining these properties.

PREREQUISITES
  • Understanding of the floor function in mathematics
  • Familiarity with the concepts of one-to-one and onto functions
  • Basic knowledge of integer sets (Z)
  • Ability to manipulate algebraic equations
NEXT STEPS
  • Study the properties of the floor function in detail
  • Learn about injective (one-to-one) and surjective (onto) functions in set theory
  • Explore examples of functions mapping from Z to Z
  • Practice proving function properties with various mathematical functions
USEFUL FOR

Mathematics students, educators, and anyone studying functions and their properties, particularly in the context of discrete mathematics and algebra.

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.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
5K
Replies
2
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K