In a connected simple graph $G$ with $30$ edges, what is the maximum number of vertices possible?
According to me, the answer is 31, obtained in a star structured graph. But the solution manual claims that the answer should be $9$ .
Am I correct or what am I doing wrong? Please let me know.
Thanks in advance!
Idea:
You can ask what is a minimum number of vertices that graph is not connected and with 30 edges.
Then exsist partition $(A,B)$ with no edges between them. So we have $${|A|\choose 2}+{|B|\choose 2} \geq 30$$
where $n=|A|+|B|$ the number you are looking for.
Let $x=|A|$ then $|B|=n-x$ and $0<x<n$. So $$30\leq {x^2 +(n-x)^2-n\over 2}\leq {n-1\choose 2}+{1\choose 2}$$ and thus $$30\leq {n-1\choose 2}\implies n_{\min}= 9$$