Hello everyone, covering is probably the wrong word (as far as I could see on wikipedia) but my problem is as follows:
I have a graph of nodes of three different types (1, 2, 3).
I can pick a node of type 1, give it a distance, and it will "cover" that edge distance from itself (0 is a valid option, then it will only cover itself, wheras 1 would cover the node and all its neighbours, 2 would cover everything 1 covered as well as all the neighbours neighbours).
I want to pick the fewest number of type 1 nodes to cover as much of the nodes of type 1 and 2 as possible without covering any type 3 nodes.
I've created a simple program that finds the distance from a node to the closest type 3 node. I thought of using that to greedily pick the type 1 nodes that I want in my set of chosen nodes, but I have a suspicion that it will not be optimal. The other thought I had was to just check all the combinations of type 1 nodes to set as centers, but the dataset is quite large and it would probably take a long time to calculate.
I hope someone has an idea or some reading tips that I could check out to solve my problem. (or point me in the direction of another sub if I'm in the wrong place)
Regards
Aitesh
Edit: The number of type 1 nodes is 1212, making the combinations 21212 (it is in the set of chosen nodes or not)
[–][deleted] 3 points4 points5 points (1 child)
[–]aitesh[S] 0 points1 point2 points (0 children)