Say I have a 2D grid of squares, and I need to assign a unique ID value to each of the squares. I want to assign IDs such that the difference in value between any two adjacent squares is as small as possible.
Are there any rules for performing this assignment, and are there any guarantees to the upper bound of the maximum difference, given the number of assigned values? Is there a 3d analogue?
Thanks!