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$

+22 votes

Best answer

- All categories
- General Aptitude 1.3k
- Engineering Mathematics 5.1k
- Digital Logic 2k
- Programming & DS 3.7k
- Algorithms 3.1k
- Theory of Computation 3.9k
- Compiler Design 1.5k
- Databases 2.9k
- CO & Architecture 2.5k
- Computer Networks 2.9k
- Non GATE 1k
- Others 1.3k
- Admissions 456
- Exam Queries 428
- Tier 1 Placement Questions 17
- Job Queries 55
- Projects 8

35,507 questions

42,829 answers

121,692 comments

42,183 users