I have a symmetric matrix S [16*16]. I don't like the way the elements are organized in it cause it doesn't reflect some physical phenomenon. From that physical view, I can construct an adjacency matrix between the elements of that S matrix. The question is: how can I re-arrange elements of S, in such a way that when I compute manhatten-distance between any two elements then I get something that is in line with what adjacency matrix says.
To put it in another way, I have 16*16 things, I want to put arrange them in a grid, in a way that respects a given distance matrix as much as possible.
Tried to think about it from optimization prespective, but it's a discrete problem. Tried to brute force my way through all the possible ways of arranging those elements and see which one has lowest "loss", but I faced a formidable factorial(16*16) ways of arranging!
Is this a known and studied problem?
Say that the given distance matrix says that for one of these "things" there are exactly five other things exactly one unit of distance away, and every other thing is further away that that. Then this arrangement cannot be placed on a 2D with the Manhattan distance without violating the given distances (every node on the grid has up to four neighbors one unit away, not five).
This simple example shows that your problem is underspecified. You need to come up with a way of determining what constitutes a "good" placement and how much you are willing to violate the given distances. In any way, you may be interested in the theory of metric embeddings with distortion.