#Prim's Algorithm (Decision Maths)

12 messages · Page 1 of 1 (latest)

tight vine
#

can anyone help explain this, don't you always have to check for cycles?

proud timberBOT
buoyant pine
#

recall how prim's algo works

#

at each step it adds an edge that connects to a vertex not in the current tree

#

if a newly added edge had been the edge that completes a cycle, then both vertices incident to it would already have been in our tree, but by construction this cannot happen

tight vine
buoyant pine
#

i mean exactly what i said

#

it cannot happen that a newly added edge connects a vertex in the tree to another vertex in the tree

#

because it does not do that

tight vine
#

thanks again

#

.close