How Can a Monotonic Spatial Function Uniquely Map 3D Integer Coordinates?

  • Context: Graduate 
  • Thread starter Thread starter intervoxel
  • Start date Start date
  • Tags Tags
    Function
Click For Summary

Discussion Overview

The discussion revolves around finding a monotonic integer function that maps three integer parameters (x, y, z) to a unique value, with the additional constraint that the values for nearest neighbor points do not exceed a small value. The maximum input value is specified as N.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant seeks a function that uniquely maps 3D integer coordinates to a single value while maintaining monotonicity.
  • Another participant questions how monotonicity applies to a function of three variables and how to determine the ordering of input tuples.
  • Several participants propose a specific function form, such as ##(N+1)^2 x + (N+1) y + z##, but note that it may not yield unique values for all triplets.
  • One participant shares an attempt at constructing a function using conditional statements but reports that it generates duplicates.
  • Another participant suggests that the function can work if the inputs are constrained to integers from 0 to N, describing a method of numbering in 3D space.
  • There is acknowledgment that using N instead of N+1 in the function led to failures in achieving uniqueness.

Areas of Agreement / Disagreement

Participants express differing views on the uniqueness of the proposed functions, with some asserting that certain formulations do not yield unique values while others believe they can work under specific conditions. The discussion remains unresolved regarding the optimal function that satisfies all constraints.

Contextual Notes

There are limitations regarding the definitions of "small value" and the conditions under which the functions are considered to be unique. The discussion also reflects uncertainty about how to effectively demonstrate monotonicity in the context of multiple variables.

intervoxel
Messages
192
Reaction score
1
I need an integer function that receives three integer parameters x,y,z and returns a unique value. An additional constraint is that the nearest neighbors points return a value that doesn't exceed a small value. The maximum value for the inputs is N.

Thank you for any help.
 
Mathematics news on Phys.org
How does monotonic figure in here? In different words you want a function f that maps ##\mathbb R^3## to ##\mathbb R##, but using integer values for the inputs.
For a real-value function g of a real variable, g is monotonically increasing provided that ##a < b \Rightarrow g(a) \le g(b)##.

For a function whose input is an ordered triple, (x, y, z) how do you determine that ##(x_1, y_1, z_1) < (x_2, y_2, z_2)## in order to show montonicity?
 
What "doesn't exceed a small value" mean?

##(x,y,z) \to (N+1)^2 x + (N+1) y + z## or something similar can work. If the return value doesn't have to be an integer you have more freedom.
 
mfb said:
What "doesn't exceed a small value" mean?

##(x,y,z) \to (N+1)^2 x + (N+1) y + z## or something similar can work. If the return value doesn't have to be an integer you have more freedom.
Thank you for the answers so far. The above function is indeed monotonic but does not return a unique value for each triplet. I tried
if(y <= z)
r = 3*N*N*x + y+N*z+1;
else
r = 3*N*N*x + 3*N*y-z;
but it generates some duplicates.
 
intervoxel said:
The above function is indeed monotonic but does not return a unique value for each triplet
It does if x,y,z are integers from 0 to N inclusively (or 1 to N, doesn't matter here).

It is a simple numbering, row by row, column by column, layer by layer in 3D space.
 
  • Like
Likes   Reactions: intervoxel
intervoxel said:
Thank you for the answers so far. The above function is indeed monotonic but does not return a unique value for each triplet. I tried
if(y <= z)
r = 3*N*N*x + y+N*z+1;
else
r = 3*N*N*x + 3*N*y-z;
but it generates some duplicates.
You're right. It works. I had tried with
mfb said:
It does if x,y,z are integers from 0 to N inclusively (or 1 to N, doesn't matter here).

It is a simple numbering, row by row, column by column, layer by layer in 3D space.

You're right. It works! I had tried with N instead of N+1 and that failed. Thank you.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
2
Views
2K
Replies
20
Views
4K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K