recategorized by
7,067 views
0 votes
0 votes

My Doubt is :- 

1. If n vertices are there and p are the connected components then total n-p edges will be there.

2. In a simple graph with n vertices and p connected components there are atmost (n-p)(n-p+1)/2  number of edges 

Now which to apply when Second one is given in Rosen.

Likewise:- 

1. Every connected graph has atleast n - 1 edges.

2. A simple graph with n vertices is connected if it has more then(i.e. atleast)  (n-1)(n-2)/2 edges.

Example:- A simple undirected graph ‘X’ has 10 vertices. If ‘X’ has 5 equally sized connected components, then, what is the maximum number of edges in graph ‘X’?

Now in this Question which one to apply ? Both will give different answer.

Well answer is 5 i used some example and by usual formula which we apply i.e. n-p it also gives 5 as the answer.

Solution of made easy:- (Please tell how did they approached the question and which way is the best way to do such questions)

recategorized by

2 Answers

Best answer
11 votes
11 votes

You won't get confused if you know the proofs of all these theorems and how all these theorems are connected.

First of all, see that -

  1. If a graph is connected then $e≥n−1$.
  2. If a graph has more than $\frac{(n−1)(n−2)}{2}$ then it is connected.

Both the theorems are different.
Notice that the implications in 1 and 2 are in opposite directions.
The $1^{st}theorem$ says about how few edges can you use to connect all the vertices- (this is the case when your graph does not contain any cycle ) while $2^{nd}theorem$ says that you cannot construct an undirected disconnected graph with  $\frac{(n−1)(n−2)}{2}+1$ edges. 


        3.  A graph with n vertices and p connected components contains at least n-p edges.

Proof - 
Let $1^{st}$ component contains $n_1$ vertices, $2^{nd}$ component contains $n_2$ vertices ..   $p^{th}$ component contains $n_p$ vertices
Using theorem 1- $i^{th}$ component must contain a minimum of $n_i - 1$ edges to be connected.

So minimum number of edges in a graph $G$ with n vertices and p connected components $\Rightarrow$
$n_1-1+n_2-1+n_3-1+......n_p-1 $
 $\Rightarrow$ = {$\underset{n}{\underbrace{n_1+n_2+n_3....n_p}}- $($ \underset{P times}{\underbrace{1+1+1.....+1}}$)} 

 $\Rightarrow$ $n-p$


         4. In a simple graph with n vertices and p connected components, there are at most $\frac{(n-p)(n-p+1)}{2}$  number of edges -
Proof-
If you have a connected component with $x$ nodes in it, the maximum number of edges you can have in that connected component is $\frac{x(x - 1)}{2}$. Therefore, if you have $n$ total nodes and $p$ different connected components, you can imagine distributing the nodes into the connected components in a way that maximizes the sum of $\frac{x(x - 1)}{2}$  across the connected components.
This is maximized when $p - 1$ of the connected components have 1 node and the last connected component has $n - p + 1$ nodes in it.

So under this setup, the maximum number of possible edges in the $p - 1$ singleton Components will be 0 and the maximum number of possible edges in the last  Component will be $\frac{(n-p)(n-p+1)}{2}$ .

Therefore, In a simple graph with n vertices and p connected components, there is at most $\frac{(n-p)(n-p+1)}{2}$ edges%. 


        5. If each component contains an equal number of edges then the maximum number of edges that graph can have- 
$\frac{n(n - p)}{2p}$

Proof -
Let there are p connected components and each component contains x vertices- 
The maximum number of edges you can have in a single connected component is $\frac{x(x - 1)}{2}$.
So maximum number of edges that graph G contains $p*\frac{x(x - 1)}{2}$ .
$\frac{n(x - 1)}{2}$ .    $//px=n$
 Divide both numerator and denominator by p. We will get -
$\frac{n(n - p)}{2p}$

Now, Coming to your question- 

In the question n = 10 and p = 5
so $\frac{10(10 - 5)}{2*5} = 5$

selected by

Related questions

2 votes
2 votes
1 answer
1
dd asked May 19, 2017
1,344 views
For a regular graph how much large the value of degree (for each vertices) should be such that the graph is $2$ - connected. (vertex wise).I did in this way :$\begin{alig...
0 votes
0 votes
1 answer
2
Crime Master Gogo asked May 3, 2017
3,074 views
Is every k connected graph is k-1 connected or the reverse? I always get confused. Can someone explain with the help of an example.
2 votes
2 votes
0 answers
3
Na462 asked Nov 14, 2018
1,550 views
1 votes
1 votes
1 answer
4