I was given a problem that in a connected, weighted graph G = (N, A), find a connected subgraph G_s = (N_s, A_s), where |N_s| <= l and A_s = {(i, j): i \in N_s, j \in N_s, (i, j) \in A}, such that the distance between any pair of nodes in G_s is mo more than a positive number, say k.
My initial thought is running dijkstra's algorithm for every node in G, remove the nodes that k hops from the node, and re-run dijkstra's algorithm for every nodes within the k-hops of the root node, but this seems not working in the sense that the distance here I use for calculation is the distance in G, not in G_s, which is the shortest distance between any pair of nodes in the subgraph G_s (i.e., the shortest path can not use the nodes that are outside of G_s).
Anyone has some thoughts on this problem, I thank and appreciate help in any form.