Given a square grid of side length N and m objects, can I design a 1-1 relationship between each object and a unique set of coordinates in that 2-D plane?
Imagine the context being something like storing objects in a hashmap of id to object and needing to calculate the L1 norm / Manhattan distance between any two objects quickly.
My initial thought was to use the mod operator and floor division, e.g. if we have $10$ objects and a $5$ by $5$ grid, maybe the unique location of object 7 will be $(25 \% 7, 25 // 7)$ = $(4, 3)$?
I'm less interested in an answer than I am in the thinking / creative process used to come up with a solution, and how to prove the answer is correct or disprove such a function exists.