The Gateway to Computer Science Excellence
0 votes
98 views

 

in Algorithms by Loyal (5.9k points)
recategorized by | 98 views
0
Both are false?

2 Answers

+1 vote
Option C
by (113 points)
0
yes u r correct

HERE in first one n is no  of edges ? or number of vertices
0
N is number of vertices.
0 votes

Answer: C

P. False. Weight will increase by $(n-1)*k$

Q. False. Consider the below graph.

 enter image description here

MST is

(1)   (4)
  \   /
   (2)
  /   \
(3)   (5)

Shortest path from $1-4$ will be $7$ in MST but it should be $5$.

Reference: https://cs.stackexchange.com/questions/18797/minimum-spanning-tree-vs-shortest-path

 

by Boss (11.5k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,287 answers
198,192 comments
104,872 users