search for suitable algorithms for the space minimization problem

Viewed 80

advise me a solution idea and algorithms can help me solve this problem: there is a field on which there is a main element (red color) and additional elements (other colors), which must be connected by at least one cell of the connecting element (gray color) to the main element. goal: minimize space usage and additionally adapt to the given field framework enter image description here

most likely, the connection will need to be searched through variations of the BFS, packing most likely needs to be solved as a variation of the knapsack problems, but I did not find a suitable algorithm and I do not have a general idea of the global solution

0 Answers
Related