I’ve given a task and wonder if there are any better solutions.
Inputs of task are:
Distance of district pairs
Population of pairs
- Find n districts at which its population and districts x miles range districts’ population is max.
- Unique district size is tens of hundreds.
As an example, if I pick up district A, population will be A‘s population plus other districts’ population which are less than x miles far away from it. Total population will be n districts at which population is calculated as I mentioned.
What I’ve tried:
- Brute Force
- Generic Algorithms
What I planning to do:
- A* Search
My question is, there may be any other solution (optimal if possible) instead of these one. i.e. sorting districts by their population, merging x miles nearest to them into one until I get n districts.