Monotonic spatial function

  • A
  • Thread starter intervoxel
  • Start date
  • Tags
    Function
In summary, the conversation discusses the need for an integer function that maps three integer parameters to a unique value, with the additional constraint that the nearest neighbors' points do not exceed a small value. Monotonicity is also mentioned, with a suggested function that maps an ordered triple to a unique value using a simple numbering system in 3D space.
  • #1
intervoxel
195
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
  • #2
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?
 
  • #3
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.
 
  • #4
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.
 
  • #5
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
  • #6
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.
 

1. What is a monotonic spatial function?

A monotonic spatial function is a mathematical function that either continuously increases or decreases in value as the input variable increases. In other words, as the input moves in one direction, the output also moves in the same direction without any fluctuations or reversals.

2. How is a monotonic spatial function different from a non-monotonic spatial function?

A non-monotonic spatial function does not have a consistent trend in its output as the input variable increases. It may have peaks and valleys, or even reverse directions at certain points. In contrast, a monotonic spatial function has a clear and consistent trend.

3. What are some real-world examples of monotonic spatial functions?

Examples of monotonic spatial functions can be found in various fields such as economics, physics, and biology. For instance, the relationship between the price of a product and its demand is often modeled as a monotonic spatial function, as the higher the price, the lower the demand. In physics, the force of gravity is an example of a monotonic spatial function, as it always attracts objects towards each other.

4. Can a monotonic spatial function have more than one input variable?

Yes, a monotonic spatial function can have multiple input variables. In this case, the function would still have a consistent trend in its output as each input variable increases. However, the rate of change may vary depending on the specific values of the input variables.

5. How are monotonic spatial functions useful in scientific research?

Monotonic spatial functions are useful in scientific research as they provide a simple and efficient way to model relationships between variables. They allow researchers to make predictions and analyze data, which can lead to a better understanding of complex systems and phenomena. Additionally, monotonic functions are often used in statistical analysis to determine correlations and trends in data.

Similar threads

  • General Math
Replies
1
Views
652
Replies
17
Views
2K
  • General Math
Replies
5
Views
761
Replies
5
Views
803
Replies
13
Views
1K
Replies
6
Views
1K
Replies
4
Views
281
  • General Math
Replies
1
Views
686
  • General Math
Replies
2
Views
686
Replies
2
Views
1K
Back
Top