Consider an undirected graph $G = [V,E]$. Let $V$ be the set of vertices: $V = \{v_1,..,v_n\}$ and $E$ be the set of edges. Let $C$ be the connected component that contains vertex $v_1$. I want to find the connected subgraph (not sure about this terminology) with maximum number of edges, among all the connected subgraph of $C$ that satisfy the following:
- includes vertex $v_1$
- has exactly $m$ number of vertices (including $v_1$)
By connected subgraph of $C$, I mean a subgraph of $C$, such that each pair of vertices in it are connected by a path.