Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

05 0 on to

shortest path
and the

from to

all other nodes using


8
Dijkstra's algo
in what order do
p the nodes get

iffentheisited
P Q RN
V88 node

ftp
Ej.
f

iii fi f
qn

0T
weig
E
F
7C
COPPI COED
K
PIE
M Let α denote the no of
f3 min spanningtrees of a
and
such
β denote the weight
tree
a min spanning

The value of α β is_

1
Of V
c b I
T e I

2 1 4 1 2 10 f d 2
2
a b

Take smallest a
de 46
edges be
5
It should not create b d
7
ce
cycle
all the
arrange
in Ie
edges
order
WEI
5 no minimum
0 22 7 α
spanning tree
MST
Be weight of
α
p
ifs iv
m an
b h 2
order of edge weights ab.scYv
start taking the smallest edges at
t d5
db
6 ng7
g X
b C9
cd10 X
in
9 I
de

b
et 12
13

17274 7 945 11 32
3911
2 Find the shortest path from
20 node to all other nodes
the Dijkstra's algo
using

In what order will nodes


be marked as True in
the visited dictionary

91,572,470
which undee is
nce vertex
hf
a check didistance

distance
weight
distance In
distance 8 37
weight
56 B

15
4A
A
n IN
12 T
5 4
Apply Dijkstra's
from vertex A
algo
in the givenGraph
A
which of the
statements
allowing

1k
B z
5

12
ES
EDE m n a

vertex then The 5ᵗʰ visited


WIPmarked
A
vertex
is the 1ˢᵗ visited
is F

A to G is 33
cost from
D The shortest path
minimum cost from A to F
one path with
cii Tnere is
exactly
min cost are
with the same
more than
one path
to G
available from A
ftp.f fffdf fffff
Prim's algo started

construct a MST

distance
node weight
Initialize the starting
to
1
the vertex with the min weight
Lii Find
the starting vertex
that connects
to other vertex
any
Ciii Mark adjacent vestex true and set
its
weight cuor
node
I
8h

i
E
gfff

1,0
d
Is
fit
weight
33
DEN
aeoodg.hn
20 23 29
MST 1 07AN
weight
Dijk's den doode
prims den weight
feed

988
3

8
5 2 4 1
6 3
294

You might also like