I am solving the following exercise. Could someone tell me if my algorithm is correct or if there is some more efficient method?
Adapt Kruskal's algorithm to solve the connector problem with pre-assignments: given a connected graph $G$, a set $E'\subseteq E(G)$ and a cost function $c:E\rightarrow\mathbb{R^+}$, find a connected covering $H$ of $G$ such that $E'\subseteq E(H)$ and $c(H)=\sum_{e\in E(H)}c(e)$ is minimum.
My solution:
1) Define $T:=(V(G),E')$
2) Order $E(G)-E'$ so that $c(e_1)\leq\cdots\leq c(e_m)$
3) for $k$ from $1$ to $m$
if $T+e_k$ has no new cycles then $T=T+e_k$