for a weight of the edge (vi,vj) is 2|i-j|

**The weight of MST will be 2(n-1)**

for a weight of the edge (vi,vj) is |i-j|

**The weight of MST will be (n-1)** // for this question, there is a typo.

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+17 votes

Consider a weighted complete graph $G$ on the vertex set $\{v_1,v_2,.....v_n\}$ such that the weight of the edge $(v_i, v_j)$ is $2|i-j|$. The weight of a minimum spanning tree of $G$ is:

- $n-1$
- $2n-2$
- $\begin{pmatrix} n \\ 2 \end{pmatrix}$
- $n^2$

+24 votes

Best answer

- All categories
- General Aptitude 1.4k
- Engineering Mathematics 5.9k
- Digital Logic 2.3k
- Programming & DS 4.3k
- Algorithms 3.7k
- Theory of Computation 4.6k
- Compiler Design 1.7k
- Databases 3.4k
- CO & Architecture 2.9k
- Computer Networks 3.4k
- Non GATE 1.2k
- Others 1.3k
- Admissions 506
- Exam Queries 482
- Tier 1 Placement Questions 22
- Job Queries 64
- Projects 15

40,903 questions

47,558 answers

146,290 comments

62,306 users