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

  • A
  • Thread starter Thread starter intervoxel
  • Start date Start date
  • Tags Tags
    Function
AI Thread Summary
The discussion focuses on creating a monotonic function that uniquely maps 3D integer coordinates (x, y, z) to a single integer value while ensuring that values for nearest neighbor points do not exceed a small threshold. Participants clarify the definition of monotonicity in the context of ordered triples and explore potential functions, such as using a formula that combines the coordinates in a structured way. A proposed solution involves a specific formula that generates unique values for each triplet, provided the inputs are constrained within a defined range. The conversation emphasizes the importance of avoiding duplicates in the output values while maintaining monotonicity. Overall, the goal is to establish a reliable mapping method for 3D integer coordinates.
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 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.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Back
Top